Open Bug 1206484 Opened 4 years ago Updated 2 months ago

Firefox for Android build error: js/src/frontend/Parser.cpp:6834: error: undefined reference to 'js::frontend::TokenStream::Operand'

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

Unspecified
macOS
defect
Not set

Tracking

(Not tracked)

People

(Reporter: jwatt, Unassigned)

Details

Attachments

(1 file)

Attached file tail of build log
I've been trying to build Firefox for Android for the first time in several months, but encountered several build errors. To cut a long story short in the process of working through a string of build errors I ended up uninstalling macports, installing homebrew, and generally switching my system over to the setup that is now recommended under:

  https://wiki.mozilla.org/Mobile/Fennec/Android
  https://wiki.mozilla.org/Mobile/Fennec/Android/Detailed_build_instructions

Specifically, I'm now using |./mach bootstrap| and the toolchains that that installs. The latest fun errors are a linker error linking libxul.so, and some weird error claiming a references to undefined variables in js/src/frontend/Parser.cpp at a line where there is no reference to those variables:

 6:44.24 /usr/local/Cellar/android-ndk/r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: ../../js/src/libjs_static.a(Parser.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
 6:44.24 /usr/local/Cellar/android-ndk/r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: ../../js/src/libjs_static.a(Parser.o): requires unsupported dynamic reloc R_ARM_REL32; recompile with -fPIC
 6:44.24 /usr/local/Cellar/android-ndk/r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: read-only segment has dynamic relocations
 6:44.24 /Users/jw/moz/trees/f/js/src/frontend/Parser.cpp:6834: error: undefined reference to 'js::frontend::TokenStream::Operand'
 6:44.24 /Users/jw/moz/trees/f/js/src/frontend/Parser.cpp:6834: error: undefined reference to 'js::frontend::TokenStream::None'
 6:44.24 /Users/jw/moz/trees/f/js/src/frontend/Parser.cpp:6834: error: undefined reference to 'js::frontend::TokenStream::Operand'
 6:44.24 /Users/jw/moz/trees/f/js/src/frontend/Parser.cpp:6834: error: undefined reference to 'js::frontend::TokenStream::None'

The nearest references to "Operand" are on lines 6708 and 7104. The error is blamed on the closing brace of the function |Parser<ParseHandler>::statement(YieldHandling yieldHandling, bool canHaveDirectives)|.
For anyone trying to repro this by setting up a build environment on a fresh OS install, also note that you're going to bump into bug 1205405.
I should also mention that the Parser.cpp errors occur even with changesets going back a few weeks, with various -j values including 1, and both with and without --disable-unified-compilation.
OS: Unspecified → Mac OS X
Component: General → Build Config & IDE Support
I get this only when I turn on `--disable-optimize`
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.