Closed
Bug 72766
Opened 25 years ago
Closed 23 years ago
Shared libraries must be explicitly linked against libc
Categories
(SeaMonkey :: Build Config, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: jes, Assigned: netscape)
Details
Attachments
(2 files)
|
1.16 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.66 KB,
patch
|
wtc
:
review+
|
Details | Diff | Splinter Review |
Hi
The current build system does not link shared libraries against libc when
building under Linux. Instead it relies on the other shared objects to pull in
libc.
The problem is that on some architectures functions such as fstat() and
fstat64() are inline functions which are only available in libc_nonshared.a.
Hence in order to be able to get a real function version included it is
necessary to explicitly link against libc which will also include
libc_nonshared.a.
Please change the Makefiles to explicitly link against libc `-lc' when linking
any of the shared libraries.
Thanks
Jes
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → mozilla0.9
Comment 1•25 years ago
|
||
Hello I am having a simular if not the same problem.
I have edited the Makefile, with no luck.
Love to look at another Makefile.
Comment 3•25 years ago
|
||
The patch in the attachment seems to solve the problem for me.
Comment 4•25 years ago
|
||
The patch worked for me too, took me a little while, had to do a clobber after.
:)
Comment 7•23 years ago
|
||
The fix is actually wrong and may break binary backwards compatibility (seen on Linux/PPC). On Linux there are 2 possibilities to correctly link against libc: 1. Use gcc/g++ for linking (that's what mozilla does) which will autoadd the correct -l options for ld 2. Use ld for linking and add -lgcc -lc -lgcc for C and g++2, or add -lgcc_s -lc -lgcc_s for g++3 The bug Jes was reporting is probably some Makefile using ld directly instead of linking with gcc/g++.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment 8•23 years ago
|
||
| Assignee | ||
Comment 9•23 years ago
|
||
.
Assignee: cls → seawood
Status: REOPENED → NEW
Target Milestone: mozilla0.9 → mozilla1.2alpha
Comment 10•23 years ago
|
||
Comment on attachment 91271 [details] [diff] [review]
Fixup wrong -lc uses
r=wtc. This patch looks correct to me. What do you think, cls?
Attachment #91271 -
Flags: review+
| Assignee | ||
Comment 11•23 years ago
|
||
Looks fine to me. Looking back, when jes reported this bug, we were using $(LD)
to link shared libs on NSPR so adding -lc was correct then. The weird glibc/gcc
interaction makes me glad that we switched to using $(CC) to link. :)
Status: NEW → ASSIGNED
| Assignee | ||
Comment 12•23 years ago
|
||
This patch has been checked into the NSPR trunk, the
NSPRPUB_PRE_4_2_CLIENT_BRANCH branch & the mozilla trunk.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•