"./mach run" fails with readelf from ELF ToolChain

RESOLVED FIXED in Firefox -esr52

Status

defect
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: jbeich, Assigned: jbeich)

Tracking

Trunk
mozilla54
Unspecified
FreeBSD

Firefox Tracking Flags

(firefox-esr45 affected, thunderbird_esr45 affected, thunderbird_esr52 affected, firefox51 wontfix, firefox52 wontfix, firefox-esr52 fixed, firefox53 fixed, firefox54 fixed)

Details

Attachments

(2 attachments)

FreeBSD since 11.0 replaced some tools from GNU binutils with ELF ToolChain equivalents. However, their output isn't always identical to GNU which breaks logic dependentlibs.list logic.

$ ./mach build
$ ./mach run
 0:00.12 objdir/dist/bin/firefox -no-remote -profile objdir/tmp/scratch_user
XPCOMGlueLoad error for file objdir/dist/bin/libxul.so:
Shared object "liblgpllibs.so" not found, required by "libxul.so"
Couldn't load XPCOM.

$ cat objdir/dist/bin/dependentlibs.list
libxul.so
OS: Unspecified → FreeBSD
Comment on attachment 8833734 [details]
Bug 1336791 - Allow readelf to print types without parentheses.

https://reviewboard.mozilla.org/r/109916/#review111414

::: toolkit/library/dependentlibs.py:58
(Diff revision 1)
>          # Each line has the following format:
>          #  tag (TYPE)          value

Can you add a note here about the variant of output you're seeing?
Attachment #8833734 - Flags: review?(mh+mozilla)
ELF Tool Chain ticket for this issue: https://sourceforge.net/p/elftoolchain/tickets/544/

Example output:
% readelf -d /bin/ls

Dynamic section at offset 0x7028 contains 23 entries:
  Tag                Type                  Name/Value
 0x0000000000000001 NEEDED               Shared library: [libutil.so.9]
 0x0000000000000001 NEEDED               Shared library: [libncurses.so.8]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x000000000000000c INIT                 0x4018c8
 0x000000000000000d FINI                 0x405dd8
...
Comment on attachment 8833734 [details]
Bug 1336791 - Allow readelf to print types without parentheses.

https://reviewboard.mozilla.org/r/109916/#review111832
Attachment #8833734 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/478a60d64023
Allow readelf to print types without parentheses. r=glandium
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/478a60d64023
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Comment on attachment 8833734 [details]
Bug 1336791 - Allow readelf to print types without parentheses.

I'd like this backported to Firefox 53.0 and 52.1.0 ESR. The merge date is close, so one of approval* flags maybe redundant.

Approval Request Comment
[ESR consideration]: Easier testing on FreeBSD without having to embed RPATH or pass LD_LIBRARY_PATH
[Feature/Bug causing the regression]: bug 763893 feature
[User impact if declined]: Broken startup on FreeBSD 11.0 or later unless GNU readelf (from binutils) is installed and precede in PATH
[Is this code covered by automated tests?]: No, tests always pass LD_LIBRARY_PATH from environment
[Has the fix been verified in Nightly?]: Yes, by myself for both GNU and BSD readelf including backport to Firefox 52.
[Needs manual test from QE? If yes, steps to reproduce]: Probably not
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Can only break startup on Linux similar to comment 0 which would be quickly noticed by users
[String changes made/needed]: None
Attachment #8833734 - Flags: approval-mozilla-esr52?
Attachment #8833734 - Flags: approval-mozilla-beta?
Attachment #8833734 - Flags: approval-mozilla-aurora?
Comment on attachment 8833734 [details]
Bug 1336791 - Allow readelf to print types without parentheses.

Happy to take this for aurora so builds don't break for FreeBSD.
Attachment #8833734 - Flags: approval-mozilla-beta?
Attachment #8833734 - Flags: approval-mozilla-beta-
Attachment #8833734 - Flags: approval-mozilla-aurora?
Attachment #8833734 - Flags: approval-mozilla-aurora+
Assignee: nobody → jbeich
Comment on attachment 8833734 [details]
Bug 1336791 - Allow readelf to print types without parentheses.

handle bsd readelf's output, for esr52.1.0
Attachment #8833734 - Flags: approval-mozilla-esr52? → approval-mozilla-esr52+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.