Closed Bug 490813 Opened 15 years ago Closed 15 years ago

Linker error with --as-needed in browser/components/build

Categories

(Firefox Build System :: General, defect)

3.5 Branch
All
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nirbheek.chauhan, Assigned: vlad)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3) Gecko/20090426 Gentoo Firefox/3.1b3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3) Gecko/20090426 Gentoo Firefox/3.1b3

While building with LDFLAGS="-Wl,--as-needed", the build fails with "undefined reference to `PL_strcat'". 

Please see the build log at http://bugs.gentoo.org/attachment.cgi?id=189877&action=view and the downstream (Gentoo) bug for the full details.

The workaround is a simple append of 'EXTRA_DSO_LDOPTS += -lplc4' to browser/components/build/Makefile.in before building

Reproducible: Always
An addition: this happens with 3.5_beta4, and is a regression from 3.1_beta3
Version: unspecified → 3.5 Branch
The link line already has -L/usr/lib64/nspr -lplds4 -lplc4, but it's just listed before mozreg_s... you just need to reorder http://mxr.mozilla.org/mozilla-central/source/browser/components/build/Makefile.in#80 earlier in the makefile (before the MOZ_COMPONENT_LIBS hunk).

This is a regression from http://hg.mozilla.org/mozilla-central/rev/be1b0898ed40 which is bug 477727
Blocks: 477727
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #2)
> This is a regression from
> http://hg.mozilla.org/mozilla-central/rev/be1b0898ed40 which is bug 477727

hey Vlad, can you have a look at this?
Attached patch fixSplinter Review
Once again, I'm all for killing libreg :)  Something like this should fix it, though.
Attachment #375212 - Flags: review?(benjamin)
Attachment #375212 - Flags: review?(benjamin) → review+
Checked in.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee: nobody → vladimir
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: