Closed Bug 1684291 Opened 3 years ago Closed 3 years ago

dependentlibs.py generates an incorrect dependentlibs.list when using llvm-readelf

Categories

(Firefox Build System :: General, defect, P3)

Firefox 84
defect

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: sna, Assigned: mhentges)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

Attempt to build Firefox with binutils provided from LLVM. (The command readelf resolves to llvm-readelf in the build environment.)

Actual results:

It builds, but dependentlibs.list is generated with it only containing libxul.so, this causes an XPCOMGlueLoad error when trying to run Firefox.

Expected results:

dependentlibs.list should have been properly generated. What seems to happen is llvm-readelf inserts a double space in the beginning of their NEEDED lines, while GNU binutils readelf uses a single space. I have attached a patch which should fix the issue and continue compatibility with GNU binutils readelf.

For what it is worth llvm-readelf is supposed to default to "GNU style output". In the chance LLVM decides to accept a patch for making their output use a single space this patch continues to work. So this patch could be considered as making dependentlibs.py more robust.

Assignee: nobody → mhentges
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3

Hey, thanks for the patch! Sorry for the delay, last week was a little busy :)
I was able to reproduce the issue as described, and I'm just doing a test run with your patch for full confirmation I can confirm that the patch works as described.
Would you mind submitting this patch via Phabricator (create an account and submit via moz-phab)?

Flags: needinfo?(NordinAbouzahra+BMO)

Call strip on the returned output to account for the whitespace differing
between llvm-readelf and GNU's readelf, also update the tmp variable index to
account for stripping the leading whitespace.

No worries, glad you could confirm and test. I have submitted the patch via Phabricator as requested, hopefully I did everything correctly. If there is anything else I need to do, please let me know.

Flags: needinfo?(NordinAbouzahra+BMO)
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fdff20c37be3
Correct generation of dependentlibs.list when using llvm-readelf. r=mhentges
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: