-
Notifications
You must be signed in to change notification settings - Fork 272
doc: Minor details to documentation for building A-S #7477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,11 @@ a number of hours to complete. | |
| ```shell | ||
| PYPATH=$(which python3); ln -s $PYPATH `dirname $PYPATH`/python | ||
| ``` | ||
| 1. Recent brew installations of Python may create unversioned symlinks but not add them to your `PATH`. You can instead run `brew info python` to see their installation locations, and add the corresponding location to your `PATH`. For example: | ||
| ```shell | ||
| export PATH="/opt/homebrew/opt/python@3.14/libexec/bin:$PATH" | ||
| ``` | ||
|
|
||
| 1. Install gyp: | ||
| ```shell | ||
| wget https://bootstrap.pypa.io/ez_setup.py -O - | python3 - | ||
|
|
@@ -66,6 +71,14 @@ a number of hours to complete. | |
| export PATH="~/tools/gyp:$PATH" | ||
| ``` | ||
| 1. If you have additional questions, consult [this guide](https://github.com/mogemimi/pomdog/wiki/How-to-Install-GYP). | ||
| 1. If you encounter a `ModuleNotFoundError`, try installing setuptools on your system. For example: | ||
| ```shell | ||
| brew install python-setuptools | ||
| ``` | ||
| 1. Similarly, recent brew installations may result in **externally-managed-environment** errors. This can be addressed with `brew install pipx` and replacing the last line with `pipx install .` | ||
|
|
||
|
|
||
|
|
||
| 1. Make sure your homebrew python's bin folder is on your path by updating your bash/zsh profile with the following: | ||
| ```shell | ||
| export PATH="$PATH:$(brew --prefix)/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin" | ||
|
|
@@ -107,8 +120,12 @@ The following instructions assume that you are building `application-services` f | |
| 1. NDK (Side by side) version 29.0.14206865 [as configured](https://github.com/mozilla/application-services/blob/bb8cde8a5/taskcluster/docker/linux/Dockerfile#L25) | ||
| 1. Android SDK Command-line Tools (latest) | ||
| 1. Set environment variables based on the boostrapped code and the downloaded NDK. Add it to your rc file (either `.zshrc` or `.bashrc` depending on your shell) to make it permanent | ||
| 1. Set `JAVA_HOME` to point to the bootstraped JDK 17 installation directory. Ex: `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/` | ||
| 1. Set `ANDROID_HOME` to the bootstraped Android SDK. Ex: `export ANDROID_HOME=~/.mozbuild/android-sdk-linux` | ||
| 1. Set `JAVA_HOME` to point to the bootstraped JDK 17 installation directory. Ex: `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/` (or `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/Contents/Home` on Mac). | ||
| 1. Set `ANDROID_HOME` to the bootstraped Android SDK. As an example: | ||
| ```shell | ||
| export ANDROID_HOME=~/.mozbuild/android-sdk-linux | ||
| ``` | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not actually totally sure if the In the codebase I don't see any other uses of ANDROID_SDK_ROOT (aside from documentation or CI setting it) so I assume its deprecated/unused. If so, I can instead adjust the other step to remove the reference to this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I never set |
||
|
|
||
| 1. Set `NSS_STATIC` to 1. Ex: `export NSS_STATIC=1` | ||
| 1. Set `NSS_DIR` to your local NSS folder. Ex: `export NSS_DIR=~/Mozilla/application-services/libs/desktop/linux-x86-64/nss` | ||
| 1. Set `ANDROID_NDK_ROOT` to the NDK you downloaded via Android Studio, Ex: `export ANDROID_NDK_ROOT=~/.mozbuild/android-sdk-linux/ndk/29.0.14206865` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,6 +86,12 @@ for example, from the root of your application-services directory: | |
| cp ./megazords/ios-rust/Sources/MozillaRustComponentsWrapper/Generated/*.swift ../firefox-ios/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/. | ||
| ``` | ||
|
|
||
| 4. Remove the copied over `glean_sym.swift` file. This exists to make glean-sym work in Rust, but is not needed in linking. From the same directory: | ||
|
|
||
| ```bash | ||
| rm ../firefox-ios/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/Generated/glean_sym.swift | ||
| ``` | ||
|
|
||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added this step per recent discussion. We could also the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, I like this way of presenting it better as well. |
||
| ## Step 3 — Reset caches and build | ||
|
|
||
| In Xcode: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure I've seen this same issue, how about making this a bit more generic? I'm thinking something like "If you encounter a ModuleNotFoundError, then install setuptools on your system (for example
brew install python-setuptools)"