From ec93889c8b4fe320cfc0977b017ae2aad04b1ff3 Mon Sep 17 00:00:00 2001 From: Wyatt Verchere Date: Wed, 15 Jul 2026 13:15:42 -0700 Subject: [PATCH 1/3] doc: Adding details to out of date documentation for building application services --- docs/building.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/building.md b/docs/building.md index ea24e44b03..82a818a5a2 100644 --- a/docs/building.md +++ b/docs/building.md @@ -54,6 +54,12 @@ a number of hours to complete. ```shell PYPATH=$(which python3); ln -s $PYPATH `dirname $PYPATH`/python ``` + 1. Recent brew installations of Python do not contain a `python`/`pip` symlink. You may be able to run the following to create them: + ```shell + brew uninstall python3 + brew install python3 + ``` + 1. Install gyp: ```shell wget https://bootstrap.pypa.io/ez_setup.py -O - | python3 - @@ -66,6 +72,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. More recent version of Python (3.12+) have deprecated `distutils`, a dependency of the above script. If you encounter a ModuleNotFoundError, you can run first: + ```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 +121,13 @@ 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` and `ANDROID_SDK_ROOT` to the bootstraped Android SDK. As an example: + ```shell + export ANDROID_HOME=~/.mozbuild/android-sdk-linux + export ANDROID_SDK_ROOT=~/.mozbuild/android-sdk-linux + ``` + 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` From 1fb56bf2fa82fafbd9e668af0e317393c1b4b805 Mon Sep 17 00:00:00 2001 From: Wyatt Verchere Date: Thu, 16 Jul 2026 09:49:39 -0700 Subject: [PATCH 2/3] fix: review and glean_sym step added --- docs/building.md | 10 ++++------ docs/howtos/locally-published-components-in-fenix.md | 2 +- .../locally-published-components-in-firefox-ios.md | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/building.md b/docs/building.md index 82a818a5a2..16c85ced66 100644 --- a/docs/building.md +++ b/docs/building.md @@ -54,10 +54,9 @@ a number of hours to complete. ```shell PYPATH=$(which python3); ln -s $PYPATH `dirname $PYPATH`/python ``` - 1. Recent brew installations of Python do not contain a `python`/`pip` symlink. You may be able to run the following to create them: + 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 - brew uninstall python3 - brew install python3 + export PATH="/opt/homebrew/opt/python@3.14/libexec/bin:$PATH" ``` 1. Install gyp: @@ -72,7 +71,7 @@ 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. More recent version of Python (3.12+) have deprecated `distutils`, a dependency of the above script. If you encounter a ModuleNotFoundError, you can run first: + 1. If you encounter a `ModuleNotFoundError`, try installing setup tools on your system. For example: ```shell brew install python-setuptools ``` @@ -122,10 +121,9 @@ The following instructions assume that you are building `application-services` f 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/` (or `export JAVA_HOME=~/.mozbuild/jdk/jdk-17.0.18+8/Contents/Home` on Mac). - 1. Set `ANDROID_HOME` and `ANDROID_SDK_ROOT` to the bootstraped Android SDK. As an example: + 1. Set `ANDROID_HOME` to the bootstraped Android SDK. As an example: ```shell export ANDROID_HOME=~/.mozbuild/android-sdk-linux - export ANDROID_SDK_ROOT=~/.mozbuild/android-sdk-linux ``` 1. Set `NSS_STATIC` to 1. Ex: `export NSS_STATIC=1` diff --git a/docs/howtos/locally-published-components-in-fenix.md b/docs/howtos/locally-published-components-in-fenix.md index fa96becd14..53d093dbf9 100644 --- a/docs/howtos/locally-published-components-in-fenix.md +++ b/docs/howtos/locally-published-components-in-fenix.md @@ -29,7 +29,7 @@ In the root of the app-services repo: Please be sure you have read [our guide to building Fenix](../building.md#building-for-fenix) and successfully built using the instructions there. In particular, this may lead you to adding `sdk.dir` and `ndk.dir` properties, and/or -set environment variables `ANDROID_SDK_ROOT` and `ANDROID_HOME`. +set environment variable `ANDROID_HOME`. In addition to those instructions, you will need: diff --git a/docs/howtos/locally-published-components-in-firefox-ios.md b/docs/howtos/locally-published-components-in-firefox-ios.md index 4cbd20324c..3ae748c4aa 100644 --- a/docs/howtos/locally-published-components-in-firefox-ios.md +++ b/docs/howtos/locally-published-components-in-firefox-ios.md @@ -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 +``` + ## Step 3 — Reset caches and build In Xcode: From 154a94a799e2e1258ef2d3c3db316cf5443bf8ca Mon Sep 17 00:00:00 2001 From: Wyatt Verchere Date: Thu, 16 Jul 2026 12:16:12 -0700 Subject: [PATCH 3/3] Update docs/building.md Co-authored-by: bendk --- docs/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/building.md b/docs/building.md index 16c85ced66..190ad3c7b0 100644 --- a/docs/building.md +++ b/docs/building.md @@ -71,7 +71,7 @@ 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 setup tools on your system. For example: + 1. If you encounter a `ModuleNotFoundError`, try installing setuptools on your system. For example: ```shell brew install python-setuptools ```