Closed Bug 658251 Opened 14 years ago Closed 14 years ago

Wrong DT_NEEDED entries in libxul.so and libxpcom.so on Android fennec builds

Categories

(Firefox Build System :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla7

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

Taken from a nightly: For libxpcom.so: 0x00000001 (NEEDED) Shared library: [liblog.so] 0x00000001 (NEEDED) Shared library: [libmozalloc.so] 0x00000001 (NEEDED) Shared library: [libmozutils.so] 0x00000001 (NEEDED) Shared library: [../../dist/lib/libxul.so] 0x00000001 (NEEDED) Shared library: [libplds4.so] 0x00000001 (NEEDED) Shared library: [libplc4.so] 0x00000001 (NEEDED) Shared library: [libnspr4.so] 0x00000001 (NEEDED) Shared library: [libdl.so] 0x00000001 (NEEDED) Shared library: [../../dist/lib/libmozalloc.so] 0x00000001 (NEEDED) Shared library: [libm.so] 0x00000001 (NEEDED) Shared library: [libc.so] For libxul.so: 0x00000001 (NEEDED) Shared library: [liblog.so] 0x00000001 (NEEDED) Shared library: [libmozalloc.so] 0x00000001 (NEEDED) Shared library: [libmozutils.so] 0x00000001 (NEEDED) Shared library: [../../dist/lib/libmozsqlite3.so] 0x00000001 (NEEDED) Shared library: [libsmime3.so] 0x00000001 (NEEDED) Shared library: [libssl3.so] 0x00000001 (NEEDED) Shared library: [libnss3.so] 0x00000001 (NEEDED) Shared library: [libnssutil3.so] 0x00000001 (NEEDED) Shared library: [libz.so] 0x00000001 (NEEDED) Shared library: [libplds4.so] 0x00000001 (NEEDED) Shared library: [libplc4.so] 0x00000001 (NEEDED) Shared library: [libnspr4.so] 0x00000001 (NEEDED) Shared library: [libdl.so] 0x00000001 (NEEDED) Shared library: [../../dist/lib/libmozalloc.so] 0x00000001 (NEEDED) Shared library: [libGLESv2.so] 0x00000001 (NEEDED) Shared library: [libm.so] 0x00000001 (NEEDED) Shared library: [libc.so] Our dynamic linker might be permissive, but this is still wrong (the ../../dist/lib paths)
Blocks: 584474
It turns out the problem is that libxul.so, libmozalloc.so and libmozsqlite3.so don't have an soname.
And this is due to --enable-wrap-malloc.
Attachment #534751 - Flags: review?(ted.mielczarek)
Assignee: nobody → mh+mozilla
I don't really understand what's broken here. Can you expound?
(In reply to comment #5) > I don't really understand what's broken here. Can you expound? The DT_NEEDED entries in libxul.so and libxpcom.so contain paths (to the dist directory) instead of sonames for libxul.so, libmozsqlite3 and libmozalloc.so. DT_NEEDED is what the dynamic linker uses to know what libraries to load. It searches the DT_NEEDED values in the ld.so.config paths and LD_LIBRARY_PATH. I haven't looked why exactly it doesn't care about the fact that some values contain a path already. I'd actually expect something similar to fail on a desktop environment. This happens because these libraries are linked without the necessary -Wl,-h,$SONAME option passed to the linker, and this in turn happens because --enable-wrap-malloc resets the MKSHLIB value instead of adding what it wants to it.
Comment on attachment 534751 [details] [diff] [review] Fix MK{,C}SHLIB when using wrap-malloc Review of attachment 534751 [details] [diff] [review]: ----------------------------------------------------------------- Okay, thanks. I apparently failed to parse your changes the first time.
Attachment #534751 - Flags: review?(ted.mielczarek) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: