Closed
Bug 767403
Opened 11 years ago
Closed 11 years ago
Fix dependent libs generation on *BSD after bug 763893
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla16
People
(Reporter: gaston, Assigned: gaston)
References
Details
Attachments
(1 file, 2 obsolete files)
1.40 KB,
patch
|
glandium
:
review+
|
Details | Diff | Splinter Review |
dependentlibs.py has the following snippet : if ext == '.dll': func = dependentlibs_dumpbin elif ext == '.so': func = dependentlibs_readelf elif ext == '.dylib': func = dependentlibs_otool This doesnt take into account all bsd platforms where configure.in sets DLL_SUFFIX to .so.1.0 (or to our controlled-versionning lib variable .so.${SO_VERSION} on OpenBSD), so this breaks with cryptic messages : Traceback (most recent call last): File "/home/buildslave/mozilla-central-i386/build/xpcom/stub/dependentlibs.py", line 102, in <module> main() File "/home/buildslave/mozilla-central-i386/build/xpcom/stub/dependentlibs.py", line 99, in main print '\n'.join(dependentlibs(lib, options.libpaths, func)) UnboundLocalError: local variable 'func' referenced before assignment I'd suggest matching elf platforms with elif ext[0:3] == '.so':, which i'm testing right now and will post a patch for if it works.
Assignee | ||
Comment 1•11 years ago
|
||
Actually it's a bit more complicated since splitext returns .0 as ext...
Assignee | ||
Comment 2•11 years ago
|
||
re.match on lib.*\.so\..* fixes the issue for me and probably netbsd/freebsd
Assignee: nobody → landry
Attachment #635884 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 3•11 years ago
|
||
New patch rebased after #767024
Attachment #635884 -
Attachment is obsolete: true
Attachment #635884 -
Flags: review?(mh+mozilla)
Attachment #636154 -
Flags: review?(mh+mozilla)
Comment 4•11 years ago
|
||
Comment on attachment 636154 [details] [diff] [review] also match libname on lib.*.so.* Review of attachment 636154 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/stub/dependentlibs.py @@ +94,5 @@ > lib = args[0] > ext = os.path.splitext(lib)[1] > if ext == '.dll': > func = dependentlibs_dumpbin > + elif ext == '.so' or re.match('lib.*\.so\..*',lib): Please use fnmatch.fnmatch instead.
Attachment #636154 -
Flags: review?(mh+mozilla) → review-
Assignee | ||
Comment 5•11 years ago
|
||
Sure, that also works and is nicer (my python fu is weak)
Attachment #636154 -
Attachment is obsolete: true
Attachment #636817 -
Flags: review?(mh+mozilla)
Comment 6•11 years ago
|
||
Comment on attachment 636817 [details] [diff] [review] use fnmatch to match lib*.so.* Review of attachment 636817 [details] [diff] [review]: ----------------------------------------------------------------- ::: xpcom/stub/dependentlibs.py @@ +95,5 @@ > lib = args[0] > ext = os.path.splitext(lib)[1] > if ext == '.dll': > func = dependentlibs_dumpbin > + elif ext == '.so' or fnmatch.fnmatch(lib,'lib*.so.*'): Please add a whitespace after the comma. I think you can lift the lib prefix and just use *.so.*
Attachment #636817 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Right, pushed it that way. https://hg.mozilla.org/integration/mozilla-inbound/rev/c7b0713958d6
Comment 8•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c7b0713958d6
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Updated•5 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•