Closed
Bug 135027
Opened 23 years ago
Closed 23 years ago
Invalid Flag Passed To ld on NetBSD/i386 using TOT source
Categories
(Directory :: LDAP C SDK, defect, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.0.1
People
(Reporter: scott, Assigned: dmosedale)
References
()
Details
(Keywords: topembed-)
Attachments
(1 file, 5 obsolete files)
2.41 KB,
patch
|
dmosedale
:
review+
dbaron
:
approval+
|
Details | Diff | Splinter Review |
Using "top-of-tree" source checked out 04-02-2002, a NetBSD/i386 fails building
because of an attempt to pass a C/C++ compiler option to /usr/bin/ld while
building libldap50.so
Repro steps:
1.Get top-of-tree source from CVS using gmake -f client.mk checkout
2. Set up a "snapshot" build environment per the instructions for "Building a
Mozilla Release" on mozilla.org
3. gmake -f client.mk build
Actual result:
======= making ./libldap50.so
/usr/bin/ld -shared -Wl,-soname,libldap50.so -o libldap50.so ./abandon.o
./add.o ./bind.o ./cache.o ./charray.o ./charset.o ./compare.o ./compat.o
./control.o ./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o
./extendop.o ./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o
./getdxbyname.o ./getentry.o ./getfilter.o ./getoption.o ./getvalues.o
./memcache.o ./message.o ./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o
./psearch.o ./referral.o ./regex.o ./rename.o ./request.o ./reslist.o ./result.o
./saslbind.o ./sbind.o ./search.o ./setoption.o ./sort.o ./sortctrl.o
./srchpref.o ./tmplout.o ./ufn.o ./unbind.o ./unescape.o ./url.o ./utf8.o
./vlistctrl.o
/usr/bin/ld: unrecognized option `-Wl,-soname,libldap50.so'
gmake[6]: *** [libldap50.so] Error 1
gmake[6]: Leaving directory
`/usr/local/src/mozilla/directory/c-sdk/ldap/libraries/libldap'
gmake[5]: *** [install] Error 2
gmake[5]: Leaving directory `/usr/local/src/mozilla/directory/c-sdk/ldap/libraries'
gmake[4]: *** [install] Error 2
gmake[4]: Leaving directory `/usr/local/src/mozilla/directory/c-sdk/ldap'
gmake[3]: *** [install] Error 2
gmake[3]: Leaving directory `/usr/local/src/mozilla/directory/c-sdk'
gmake[2]: *** [ldap] Error 2
gmake[2]: Leaving directory `/usr/local/src/mozilla'
gmake[1]: *** [default] Error 2
gmake[1]: Leaving directory `/usr/local/src/mozilla'
gmake: *** [build] Error 2
Expected result:
A successful build with no errors.
Additional information:
1. I am running NetBSD/i386 1.5.3_ALPHA. Don't let the ALPHA fool you. This
is along the NetBSD 1.5 branch, where very few changes are made, and the code is
always kept in a high-quality state. I'm fairly certain that this would repro
on NetBSD/i386 1.5.2.
2. I set BUILD_OFFICIAL=1 and MOZILLA_OFFICIAL=1
3. My .mozconfig
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-optimize
ac_add_options --enable-crypto
ac_add_options --without-system-jpeg
ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --without-system-zlib
ac_add_options --without-system-nspr
4. This exact same source code builds fine on Linux, which is using a later
version of GNU ld (2.11.2 vs 2.9.1 on NetBSD). As the later version of ld
doesn't appear to take the "-Wl" flag, either, I'm assuming the configure script
hosed up, and generated a makefile that uses ld for linking shared objects
instead of cc/c++, as the -Wl flag is actually an option to the compiler,
telling it to pass a flag along to the linker.
5. A full build log, along with any other information, is available upon request.
Comment 1•23 years ago
|
||
More LDAP bustage. We should really use the same defaults that were copied over
from NSPR.
Assignee: seawood → mcs
Status: UNCONFIRMED → NEW
Component: Build Config → LDAP C SDK
Ever confirmed: true
Product: Browser → Directory
QA Contact: granrose → nobody
Assignee | ||
Comment 3•23 years ago
|
||
Fix.
Comment 4•23 years ago
|
||
Comment on attachment 77517 [details] [diff] [review]
update config/NetBSD.mk to latest nsprpub version
sr=sspitzer
Attachment #77517 -
Flags: superreview+
Assignee | ||
Comment 5•23 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 6•23 years ago
|
||
Per bug 138532, this fix needs to also go onto the 1.0 branch.
Comment 7•23 years ago
|
||
Is this needed for the MachV beta, or can it be checked in after MachV branches
from 1.0.
Keywords: topembed
Comment 8•23 years ago
|
||
Per drivers, this can wait until after MachV branches.
Comment 9•23 years ago
|
||
adding adt1.0.0- since this can wait until after Mach V branches.
Comment 10•23 years ago
|
||
Comment on attachment 77517 [details] [diff] [review]
update config/NetBSD.mk to latest nsprpub version
a=asa (on behalf of drivers) for checkin to the 1.0 branch
Attachment #77517 -
Flags: approval+
Assignee | ||
Updated•23 years ago
|
Whiteboard: [fixed on ldapcsdk_50_client_branch, trunk]
Target Milestone: --- → mozilla1.0
Assignee | ||
Updated•23 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Updated•23 years ago
|
Keywords: mozilla1.0 → mozilla1.0+
Comment 11•23 years ago
|
||
topembed- since this has no impact on embedding customers.
Comment 12•23 years ago
|
||
Scott, can you verify that this patch fixed your build problem on the trunk? (I
thought that we didn't use the <arch>.mk files any longer but I could be
mistaken wrt ldap.)
Comment 13•23 years ago
|
||
*** Bug 143990 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 14•23 years ago
|
||
I tried building the trunk, pulled today 05/13/2002 on NetBSD/i386 (1.5.3_RC2),
and got the same error:
/usr/bin/ld -shared -Wl,-soname,libldap50.so -o libldap50.so ./abandon.o
./add.o ./bind.o ./cache.o ./charray.o ./charset.o ./compare.o ./compat.o
./control.o ./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o
./extendop.o ./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o
./getdxbyname.o ./getentry.o ./getfilter.o ./getoption.o ./getvalues.o
./memcache.o ./message.o ./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o
./psearch.o ./referral.o ./regex.o ./rename.o ./request.o ./reslist.o ./result.o
./saslbind.o ./sbind.o ./search.o ./setoption.o ./sort.o ./sortctrl.o
./srchpref.o ./tmplout.o ./ufn.o ./unbind.o ./unescape.o ./url.o ./utf8.o
./vlistctrl.o
/usr/bin/ld: unrecognized option `-Wl,-soname,libldap50.so'
Assignee | ||
Comment 15•23 years ago
|
||
Doh! Alright, I'll take another run at this.
Whiteboard: [fixed on ldapcsdk_50_client_branch, trunk]
Assignee | ||
Comment 16•23 years ago
|
||
OK, this patch tweaks configure.in. Scott, can you try it out?
Specifically, you'll need to apply the patch to
cd mozilla/directory/c-sdk
patch < patch2.txt
autoconf
Then re-run the toplevel (mozilla/) configure, which will cause this configure
to re-run, and then rebuild.
Attachment #77517 -
Attachment is obsolete: true
Comment 17•23 years ago
|
||
I attempted to build with a clean RC2 tarball with the second proposed patch. I
ran autoconf in the directory/c-sdk directory after applying the patch and
configure in the mozilla/ directory. On make and got further problems:
======= making ./libldap50.so
/usr/bin/ld -soname,libldap50.so -o libldap50.so ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
./abandon.o: In function `do_abandon':
./abandon.o(.text+0x3eb): undefined reference to `ber_printf'
./abandon.o(.text+0x47c): undefined reference to `ber_free'
./add.o: In function `ldap_add_ext':
./add.o(.text+0x323): undefined reference to `ber_printf'
./add.o(.text+0x373): undefined reference to `ber_printf'
./add.o(.text+0x394): undefined reference to `ber_printf'
./add.o(.text+0x3bd): undefined reference to `ber_free'
./add.o(.text+0x3fe): undefined reference to `ber_free'
./cache.o: In function `nsldapi_add_result_to_cache':
./cache.o(.text+0x135): undefined reference to `ber_free'
./cache.o(.text+0x1ac): undefined reference to `time'
./cache.o(.text+0x1bf): undefined reference to `sprintf'
<snip 150 to 200 lines of undefined referances>
Assignee | ||
Comment 18•23 years ago
|
||
Sounds like we're getting closer. This latest patch may fix the liblber
problem; can someone with NetBSD give it a try? Thanks!
Attachment #83801 -
Attachment is obsolete: true
Reporter | ||
Comment 19•23 years ago
|
||
The second hunk of patch v3 didn't apply cleanly to my tree, which is still from
5/13. I patched the three added lines in to the right spot in
directory/c-sdk/ldap/libraries/libldap/Makefile.in myself, ran autoconf, and did
a gmake -f client.mk build from the top of the tree, and this time I got:
======= making ./libldap50.a
rm -f libldap50.a; /usr/bin/ar cr libldap50.a ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o; ranlib libldap50.a
-L/usr/local/src/mozilla/dist/lib -llber50
ranlib: -L/usr/local/src/mozilla/dist/lib: No such file or directory
That looks really weird, so I'm going to pull a whole new tree and take it home
with me tonight (I pay for bandwidth by the KB so large transfers go over
sneakernet) and see if I can get the patch to apply cleanly.
Comment 20•23 years ago
|
||
Well, that patch made a difference, but it appears that there are still
problems. The first time I did a make I got this:
======= making ./libldap50.a
rm -f libldap50.a; /usr/bin/ar cr libldap50.a ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o; ranlib libldap50.a
-L/usr/chris/compile/mozilla/dist/lib -llber50
ranlib: -L/usr/chris/compile/mozilla/dist/lib: No such file or directory
gmake[5]: *** [libldap50.a] Error 9
gmake[5]: Leaving directory
`/usr/chris/compile/mozilla/directory/c-sdk/ldap/libraries/libldap'
But interestingly the second time I ran make to reproduce the output, I got:
======= making ./libldap50.so
/usr/bin/ld -soname,libldap50.so -o libldap50.so ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o
-L/usr/chris/compile/mozilla/dist/lib -llber50
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048074
./cache.o: In function `nsldapi_add_result_to_cache':
./cache.o(.text+0x1ac): undefined reference to `time'
./cache.o(.text+0x1bf): undefined reference to `sprintf'
./charray.o: In function `ldap_charray_inlist':
./charray.o(.text+0x1c0): undefined reference to `strcasecmp'
./charray.o: In function `ldap_str2charray':
./charray.o(.text+0x2ad): undefined reference to `strchr'
./charray.o(.text+0x333): undefined reference to `strtok'
./charray.o: In function `ldap_charray_position':
./charray.o(.text+0x378): undefined reference to `strcasecmp'
./control.o: In function `ldap_control_copy_contents':
./control.o(.text+0x73b): undefined reference to `memmove'
<Snip about 200 lines of undefined references>
All of this was done on a clean RC2 tree.
Assignee | ||
Comment 21•23 years ago
|
||
This time for sure! :-)
Attachment #83852 -
Attachment is obsolete: true
Assignee | ||
Comment 22•23 years ago
|
||
OK, added libc into the linkage. If someone could test, that'd be great...
Comment 23•23 years ago
|
||
Well, that helped in a way. I am still getting the following:
======= making ./libldap50.a
rm -f libldap50.a; /usr/bin/ar cr libldap50.a ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o; ranlib libldap50.a
-L/usr/chris/compile/mozilla/dist/lib -llber50 -lc
ranlib: -L/usr/chris/compile/mozilla/dist/lib: No such file or directory
gmake[5]: *** [libldap50.a] Error 9
gmake[5]: Leaving directory
`/usr/chris/compile/mozilla/directory/c-sdk/ldap/libraries/libldap'
If I attempt to make it again, I end up with undefined referances again. This
time only about 5 of them showed up which all appear to be in libcompat. I went
ahead and added -lcompat and got different errors: (keep in mind that this is
the 2nd time I tried to run make, not the first)
======= making ./libldap50.so
/usr/bin/ld -soname,libldap50.so -o libldap50.so ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o
./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o ./regex.o ./rename.o
./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o ./search.o
./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o ./unbind.o
./unescape.o ./url.o ./utf8.o ./vlistctrl.o
-L/usr/chris/compile/mozilla/dist/lib -llber50 -lc -lcompat
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 08048d50
/usr/lib/libc.so: undefined reference to `environ'
/usr/lib/libc.so: undefined reference to `__progname'
gmake[5]: *** [libldap50.so] Error 1
gmake[5]: Leaving directory
`/usr/chris/compile/mozilla/directory/c-sdk/ldap/libraries/libldap'
Assignee | ||
Comment 24•23 years ago
|
||
Comment on attachment 83949 [details] [diff] [review]
patch v4
OK, a friend set me up with an account on his NetBSD machine, and I think I see
what's going on here. The short answer is that on NetBSD we should really be
linking with $(CC), not $(LD). I'll try and poke at this more tommorrow.
Attachment #83949 -
Flags: needs-work+
Reporter | ||
Comment 25•23 years ago
|
||
I'm still getting the same error with patch v4:
======= making ./libldap50.a
rm -f libldap50.a; /usr/bin/ar cr libldap50.a ./abandon.o ./add.o ./bind.o
./cache.o ./charray.o ./charset.o ./compare.o ./compat.o ./control.o
./countvalues.o ./delete.o ./disptmpl.o ./dsparse.o ./error.o ./extendop.o
./free.o ./freevalues.o ./friendly.o ./getattr.o ./getdn.o ./getdxbyname.o
./getentry.o ./getfilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o
./modify.o ./open.o ./os-ip.o ./proxyauthctrl.o ./psearch.o ./referral.o
./regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o
./search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o
./unbind.o ./unescape.o ./url.o ./utf8.o ./vlistctrl.o; ranlib libldap50.a
-L/usr/local/src/mozilla/dist/lib -llber50 -lc
ranlib: -L/usr/local/src/mozilla/dist/lib: No such file or directory
and since Chirs Ewert is getting that, as well, I guess it's a real problem and
not just that crack I've been smoking.
Assignee | ||
Comment 26•23 years ago
|
||
This one compiles for me; more testing would be appreciated.
Attachment #83949 -
Attachment is obsolete: true
Comment 27•23 years ago
|
||
I was able to successfuly build with this patch on NetBSD-1.5.2
Comment 28•23 years ago
|
||
Comment on attachment 84092 [details] [diff] [review]
patch v5
r=cls
Attachment #84092 -
Flags: review+
Comment 29•23 years ago
|
||
Removing adt1.0.0 as there is no sr= for the latest patch.
Keywords: adt1.0.0
Comment 30•23 years ago
|
||
Discussed in mail news bug meeting. Decided to minus this bug because it is not
required, strictly speaking. If you have a fix we can try to get it in.
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0 → mozilla1.0.1
Assignee | ||
Updated•23 years ago
|
Priority: -- → P4
Assignee | ||
Comment 31•23 years ago
|
||
Merged to CVS tip.
Attachment #84092 -
Attachment is obsolete: true
Assignee | ||
Comment 32•23 years ago
|
||
Comment on attachment 87572 [details] [diff] [review]
patch v6
Carrying forward r=
Attachment #87572 -
Flags: review+
Assignee | ||
Comment 33•23 years ago
|
||
Fix checked into the ldapcsdk_50_client_branch and the trunk. Still needs to
land on the 1.0.1 branch.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment on attachment 87572 [details] [diff] [review]
patch v6
Please land this on the 1.0.1 branch. Once there, replace the
"mozilla1.0.1+" keyword with the "fixed1.0.1" keyword.
Attachment #87572 -
Flags: approval+
Keywords: mozilla1.0.1 → mozilla1.0.1+
Assignee | ||
Comment 36•23 years ago
|
||
Fix checked into the branch. I had to check version 5 into the branch, because
cls' OpenBSD has not (yet?) landed there.
Keywords: mozilla1.0.1+ → fixed1.0.1
You need to log in
before you can comment on or make changes to this bug.
Description
•