Closed Bug 333640 Opened 15 years ago Closed 15 years ago

Use -z defs when linking on linux

Categories

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

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: Biesinger, Assigned: Biesinger)

References

Details

(Keywords: fixed1.8.1)

Attachments

(4 files, 2 obsolete files)

-z defs (or its equivalent --no-undefined) disallows undefined symbols when creating .so files, so that this problem can be caught at compile time rather than runtime.

the attached patch makes the build process use it.
Attached patch patch (obsolete) — Splinter Review
Attachment #218096 - Flags: review?(benjamin)
Attachment #218096 - Flags: approval-branch-1.8.1?(benjamin)
Comment on attachment 218096 [details] [diff] [review]
patch

Why aren't we adding this flag to, say, DSO_LDOPTS?
Comment on attachment 218096 [details] [diff] [review]
patch

I think that munging DSO_LDOPTS is the correct solution.
Attachment #218096 - Flags: review?(benjamin)
Attachment #218096 - Flags: review-
Attachment #218096 - Flags: approval-branch-1.8.1?(benjamin)
this is needed too - various modules were missing libraries in their linking list, which is fatal with -z defs.
Attachment #219049 - Flags: review?(benjamin)
Attachment #219049 - Flags: review?(benjamin) → review+
Comment on attachment 219049 [details] [diff] [review]
add missing libraries (checked in)

Checking in gfx/src/thebes/Makefile.in;
/cvsroot/mozilla/gfx/src/thebes/Makefile.in,v  <--  Makefile.in
new revision: 1.16; previous revision: 1.15
done
Checking in gfx/thebes/src/Makefile.in;
/cvsroot/mozilla/gfx/thebes/src/Makefile.in,v  <--  Makefile.in
new revision: 1.25; previous revision: 1.24
done
Checking in toolkit/components/gnome/Makefile.in;
/cvsroot/mozilla/toolkit/components/gnome/Makefile.in,v  <--  Makefile.in
new revision: 1.6; previous revision: 1.5
done
Attachment #219049 - Attachment description: add missing libraries → add missing libraries (checked in)
Comment on attachment 219049 [details] [diff] [review]
add missing libraries (checked in)

I want both of these patches on the branch if possible, so requesting approval for this one.-
Attachment #219049 - Flags: approval-branch-1.8.1?(benjamin)
Comment on attachment 219049 [details] [diff] [review]
add missing libraries (checked in)

er, nevermind, this patch doesn't apply to that branch
Attachment #219049 - Flags: approval-branch-1.8.1?(benjamin)
Attached patch patch v2Splinter Review
now in DSO_LDOPTS

note: I can't test the solaris changes here; I'll back them out should the solaris tinderboxes go red.
Attachment #218096 - Attachment is obsolete: true
Attachment #219079 - Flags: review?(benjamin)
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.8.1
Attachment #219079 - Flags: review?(benjamin) → review+
Checking in configure.in;
/cvsroot/mozilla/configure.in,v  <--  configure.in
new revision: 1.1660; previous revision: 1.1659
done
Is the thunderbird bustage I get:

../../../../mozilla/mail/components/shell/nsMailGNOMEIntegration.cpp:112: undefined reference to `g_filename_from_utf8'

etc.

a result of this checkin?
jprof bustage:
...mozilla/tools/jprof/stub/libmalloc.c:148:undefined reference to _r_debug

(_r_debug appears to be exported by libc.a)
(In reply to comment #14)
> (_r_debug appears to be exported by libc.a)

turns out that the dynamic library this is in is actually /lib/ld-linux.so.2...
Depends on: 335568
Attached patch patch for 1_8_BRANCH (obsolete) — Splinter Review
Attachment #225738 - Flags: review?(benjamin)
Attachment #225738 - Flags: approval-branch-1.8.1?(benjamin)
the previous version was missing a few fixes
Attachment #225738 - Attachment is obsolete: true
Attachment #225784 - Flags: review?(benjamin)
Attachment #225784 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #225738 - Flags: review?(benjamin)
Attachment #225738 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #225784 - Flags: review?(benjamin)
Attachment #225784 - Flags: review+
Attachment #225784 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #225784 - Flags: approval-branch-1.8.1+
please file a new bug on comment 14/comment 16

checked in on MOZILLA_1_8_BRANCH (both patches)
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.