dependentlibs.py generates an incorrect dependentlibs.list when using llvm-readelf
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(firefox86 fixed)
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: sna, Assigned: mhentges)
Details
Attachments
(2 files)
575 bytes,
patch
|
Details | Diff | Splinter Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
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 | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
•
|
||
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
)?
Reporter | ||
Comment 2•3 years ago
|
||
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.
Reporter | ||
Comment 3•3 years ago
|
||
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.
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fdff20c37be3 Correct generation of dependentlibs.list when using llvm-readelf. r=mhentges
Comment 5•3 years ago
|
||
bugherder |
Description
•