Closed Bug 811501 Opened 12 years ago Closed 12 years ago

Local fennec builds fail to start on Android 4.2 with 4.6.3 toolchain

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kats, Assigned: glandium)

References

Details

Attachments

(2 files)

Starting it up reports the following error:

11-13 14:35:55.875 D/dalvikvm( 3602): Trying to load lib /data/app-lib/org.mozilla.fennec_kats-1/libmozglue.so 0x41b41c08
11-13 14:35:55.875 E/dalvikvm( 3602): dlopen("/data/app-lib/org.mozilla.fennec_kats-1/libmozglue.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end" referenced by "libmozglue.so"...
11-13 14:35:55.875 D/AndroidRuntime( 3602): Shutting down VM
11-13 14:35:55.875 W/dalvikvm( 3602): threadid=1: thread exiting with uncaught exception (group=0x4129f930)
11-13 14:35:55.875 D/GeckoProfile( 3602): Found profile dir: /data/data/org.mozilla.fennec_kats/files/mozilla/fmvwqybb.default
11-13 14:35:55.882 D/dalvikvm( 3602): GC_CONCURRENT freed 252K, 3% free 9084K/9360K, paused 4ms+3ms, total 33ms
11-13 14:35:55.882 D/dalvikvm( 3602): WAIT_FOR_CONCURRENT_GC blocked 7ms
11-13 14:35:55.882 D/dalvikvm( 3602): WAIT_FOR_CONCURRENT_GC blocked 2ms
11-13 14:35:55.882 E/GeckoAppShell( 3602): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
11-13 14:35:55.882 E/GeckoAppShell( 3602): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end" referenced by "libmozglue.so"...
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at java.lang.Runtime.loadLibrary(Runtime.java:371)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at java.lang.System.loadLibrary(System.java:535)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at org.mozilla.gecko.GeckoAppShell.loadMozGlue(GeckoAppShell.java:480)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at org.mozilla.gecko.GeckoApp.onCreate(GeckoApp.java:1468)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:205)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at android.app.Activity.performCreate(Activity.java:5104)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-13 14:35:55.882 E/GeckoAppShell( 3602): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)

Release/beta/aurora/nightly work fine presumably because they were built with the 4.4.3 toolchain.

Using "nm" on the libmozglue.so files extracted from the various APKs seems to confirm that the 4.4.3 builds have the symbols defined, e.g:

00021450 A __exidx_end
00021358 A __exidx_start
         w __gnu_Unwind_Find_exidx

whereas the libmozglue.so from my local 4.6.3 build doesn't have symbols.
I think this would work. Will r? when confirmed to work.
Assignee: nobody → mh+mozilla
That patch doesn't seem to fix the problem. I still get the same behaviour on startup:

11-14 00:49:29.140 I/ActivityManager(  386): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.mozilla.fennec_kats/.App bnds=[200,785][360,985]} from pid 591
11-14 00:49:29.250 D/dalvikvm( 1735): Trying to load lib /data/app-lib/org.mozilla.fennec_kats-2/libmozglue.so 0x41a27b38
11-14 00:49:29.250 E/dalvikvm( 1735): dlopen("/data/app-lib/org.mozilla.fennec_kats-2/libmozglue.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end" referenced by "libmozglue.so"...
11-14 00:49:29.250 D/AndroidRuntime( 1735): Shutting down VM
11-14 00:49:29.250 W/dalvikvm( 1735): threadid=1: thread exiting with uncaught exception (group=0x41185930)
11-14 00:49:29.257 E/GeckoAppShell( 1735): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
11-14 00:49:29.257 E/GeckoAppShell( 1735): java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "__exidx_end" referenced by "libmozglue.so"...
11-14 00:49:29.257 E/GeckoAppShell( 1735): 	at java.lang.Runtime.loadLibrary(Runtime.java:371)

In case it helps, this is what gets run when I do a make -C objdir/mozglue/build after touching that makefile.

Makefile is unchanged
make export
make[1]: Nothing to be done for `export'.
make libs
BionicGlue.cpp
/opt/local/bin/ccache /Users/kats/android/ndk/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -o BionicGlue.o -c  -fvisibility=hidden -DNO_NSPR_10_SUPPORT  -I/Users/kats/zspace/mozilla-git/mozglue/build -I. -I../../dist/include  -I/Users/kats/zspace/mozilla-git/obj-android/dist/include/nspr -I/Users/kats/zspace/mozilla-git/obj-android/dist/include/nss      -fPIC -isystem /Users/kats/android/ndk/platforms/android-5/arch-arm/usr/include  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -mandroid -fno-short-enums -fno-exceptions -Wno-psabi -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -I/Users/kats/zspace/mozilla-git/obj-android/build/stlport -I/Users/kats/android/ndk/sources/cxx-stl/stlport/stlport -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pipe  -DDEBUG -D_DEBUG -DTRACING -g -Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer -funwind-tables  -isystem /Users/kats/android/ndk/platforms/android-5/arch-arm/usr/include  -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/BionicGlue.o.pp  /Users/kats/zspace/mozilla-git/mozglue/build/BionicGlue.cpp
rm -f libmozglue.so
/Users/kats/zspace/mozilla-git/obj-android/_virtualenv/bin/python /Users/kats/zspace/mozilla-git/config/pythonpath.py -I../../config /Users/kats/zspace/mozilla-git/config/expandlibs_exec.py --depend .deps/libmozglue.so.pp --target libmozglue.so --uselist --  /opt/local/bin/ccache /Users/kats/android/ndk/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++ -isystem /Users/kats/android/ndk/platforms/android-5/arch-arm/usr/include  -pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -mandroid -fno-short-enums -fno-exceptions -Wno-psabi -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -I/Users/kats/zspace/mozilla-git/obj-android/build/stlport -I/Users/kats/android/ndk/sources/cxx-stl/stlport/stlport -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -std=gnu++0x -pipe  -DDEBUG -D_DEBUG -DTRACING -g -Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer -funwind-tables -fPIC -shared -Wl,-z,defs -Wl,-h,libmozglue.so -o libmozglue.so  BionicGlue.o    -mandroid -L/Users/kats/android/ndk/platforms/android-5/arch-arm/usr/lib -Wl,-rpath-link=/Users/kats/android/ndk/platforms/android-5/arch-arm/usr/lib --sysroot=/Users/kats/android/ndk/platforms/android-5/arch-arm -llog -Wl,--allow-shlib-undefined  -mthumb -L/Users/kats/zspace/mozilla-git/obj-android/build/stlport -L/Users/kats/android/ndk/sources/cxx-stl/stlport/libs/armeabi-v7a/ -Wl,-z,noexecstack -Wl,--icf=safe   -Wl,-rpath-link,/Users/kats/zspace/mozilla-git/obj-android/dist/bin -Wl,-rpath-link,/usr/local/lib   ../../memory/build/libmemory.a ../../other-licenses/android/libandroid.a ../android/libandroid.a ../linker/liblinker.a ../../mfbt/libmfbt.a -lz -Wl,--wrap=pthread_atfork -Wl,-version-script,/Users/kats/zspace/mozilla-git/mozglue/build/arm-eabi-filter  -lstlport_static   
chmod +x libmozglue.so
make tools
make[1]: Nothing to be done for `tools'.
if test -d ../../dist/bin ; then touch ../../dist/bin/.purgecaches ; fi
Can you add a DSO_LDOPTS += -Wl,--verbose and attach the resulting output?
I can't reproduce with either ndk r8b or r8c, what are you using?
I can't reproduce with an old build of the ndk r6b with gcc 4.6.3 either.
I reproduced with Mozilla-repackaged NDK r7 using gold.

I couldn't reproduce with stock NDK r6b, stock NDK r8b using ld/bfd, and stock NDK r8b using gold.
Looks like we should deploy r8c on the build slaves, then.
Attached file Output with verbose
This is with DSO_LDOPTS += -Wl,--verbose
Verified that this works fine with r8c and gold as well. Seems to just be an issue with the mozilla-repackaged NDK, then.
Wontfixing this based on https://bugzilla.mozilla.org/show_bug.cgi?id=769099#c3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: