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

RESOLVED FIXED in Firefox -esr52

Status

RESOLVED FIXED
2 years ago
8 months ago

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)

(Assignee)

Description

2 years ago
Created attachment 8833733 [details] [diff] [review]
readelf -d libxul.so output (as diff)

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
(Assignee)

Updated

2 years ago
OS: Unspecified → FreeBSD
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
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)
Comment hidden (mozreview-request)

Comment 4

2 years ago
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 5

2 years ago
mozreview-review
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+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 6

2 years ago
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

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/478a60d64023
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
(Assignee)

Comment 8

2 years ago
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?
(Assignee)

Updated

2 years ago
status-firefox51: --- → wontfix
status-firefox52: --- → wontfix
status-firefox53: --- → affected
status-firefox-esr45: --- → affected
status-firefox-esr52: --- → affected
status-thunderbird_esr45: --- → affected
status-thunderbird_esr52: --- → affected
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 10

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/809356dad7f4
status-firefox53: affected → fixed
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+

Comment 12

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-esr52/rev/53b327c4fea1
status-firefox-esr52: affected → fixed

Updated

8 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.