Closed
Bug 39452
Opened 24 years ago
Closed 21 years ago
SUNWspro5.0 link bustage with new string APIs
Categories
(SeaMonkey :: Build Config, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: tor, Assigned: tor)
Details
With the patches from bug 39424, the build progresses along until netwerk/build, where it bombs with multiply defined symbols from the new string API: rm -f libnecko.so CC -library=iostream -mt -O -DNDEBUG -DTRIMMED -G -h libnecko.so -o libnecko.so nsNetModule.o -xildoff -z allextract ../../dist/lib/libneckobase_s.a ../../dist/lib/libneckodns_s.a ../../dist/lib/libneckosocket_s.a ../../dist/lib/libnkconv_s.a ../../dist/lib/libnkcnvts_s.a ../../dist/lib/libnkcachemgr_s.a ../../dist/lib/libnkfilecache_s.a ../../dist/lib/libnkmemcache_s.a ../../dist/lib/libmozdbm_s.a ../../dist/lib/libnkmime_s.a ../../dist/lib/libnkhttp_s.a ../../dist/lib/libnkfile_s.a ../../dist/lib/libnkdata_s.a ../../dist/lib/libnkjar_s.a ../../dist/lib/libnkres_s.a ../../dist/lib/libnkabout_s.a ../../dist/lib/libnkkwd_s.a ../../dist/lib/libzlib.a -L../../dist/bin -lplds4 -lplc4 -lnspr4 -lpthread -L../../dist/bin -lxpcom -lw -lposix4 -lintl -lelf -lnsl -lsocket -lresolv -liostream -lCrun -ldl -lm ld: fatal: symbol `int Compare<char>(const basic_nsAReadableString<__type_0>&,const basic_nsAReadableString<__type_0>&)' is multiply defined: (file ../../dist/lib/libneckobase_s.a(W-T2dGWVdkRa2a86qYuW.o) and file ../../dist/lib/libnkconv_s.a(W-T2dGWVdkRa2a86qYuW.o)); ld: fatal: symbol `basic_nsLiteralString<char>::__vtbl' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkcnvts_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1nVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkcnvts_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpnVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkcnvts_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpknVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkcnvts_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `const char*basic_nsLiteralString<char>::GetReadableFragment(nsReadableFragment<char>&,nsFragmentRequest,unsigned)const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(_9bmD7qanKkIEYFzfOBx.o) and file ../../dist/lib/libnkcnvts_s.a(_9bmD7qanKkIEYFzfOBx.o)); ld: fatal: symbol `const void*basic_nsAReadableString<char>::Implementation()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(TAH495zWbmMXl-3gJwP7.o) and file ../../dist/lib/libnkcnvts_s.a(TAH495zWbmMXl-3gJwP7.o)); ld: fatal: symbol `unsigned basic_nsLiteralString<char>::Length()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(7gD3-LaYRCDo3nIJSPgo.o) and file ../../dist/lib/libnkcnvts_s.a(7gD3-LaYRCDo3nIJSPgo.o)); ld: fatal: symbol `int Compare<char>(const basic_nsAReadableString<__type_0>&,const basic_nsAReadableString<__type_0>&)' is multiply defined: (file ../../dist/lib/libneckobase_s.a(W-T2dGWVdkRa2a86qYuW.o) and file ../../dist/lib/libnkcnvts_s.a(W-T2dGWVdkRa2a86qYuW.o)); ld: fatal: symbol `basic_nsLiteralString<char>::__vtbl' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkmime_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1nVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkmime_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpnVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkmime_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpknVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkmime_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `const char*basic_nsLiteralString<char>::GetReadableFragment(nsReadableFragment<char>&,nsFragmentRequest,unsigned)const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(_9bmD7qanKkIEYFzfOBx.o) and file ../../dist/lib/libnkmime_s.a(_9bmD7qanKkIEYFzfOBx.o)); ld: fatal: symbol `const void*basic_nsAReadableString<char>::Implementation()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(TAH495zWbmMXl-3gJwP7.o) and file ../../dist/lib/libnkmime_s.a(TAH495zWbmMXl-3gJwP7.o)); ld: fatal: symbol `unsigned basic_nsLiteralString<char>::Length()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(7gD3-LaYRCDo3nIJSPgo.o) and file ../../dist/lib/libnkmime_s.a(7gD3-LaYRCDo3nIJSPgo.o)); ld: fatal: symbol `int Compare<char>(const basic_nsAReadableString<__type_0>&,const basic_nsAReadableString<__type_0>&)' is multiply defined: (file ../../dist/lib/libneckobase_s.a(W-T2dGWVdkRa2a86qYuW.o) and file ../../dist/lib/libnkmime_s.a(W-T2dGWVdkRa2a86qYuW.o)); ld: fatal: symbol `void basic_nsAWritableString<char>::Cut(unsigned,unsigned)' is multiply defined: (file ../../dist/lib/libnkmime_s.a(BN8GK0RpT71DgyR2XM3v.o) and file ../../dist/lib/libnkhttp_s.a(BN8GK0RpT71DgyR2XM3v.o)); ld: fatal: symbol `__type_1 copy_string<nsReadingIterator<char>,nsWritingIterator<char> >(__type_0,__type_0,__type_1)' is multiply defined: (file ../../dist/lib/libnkmime_s.a(h7WUUlu0GDLbyOISDnwO.o) and file ../../dist/lib/libnkhttp_s.a(h7WUUlu0GDLbyOISDnwO.o)); ld: fatal: symbol `void basic_nsAWritableString<unsigned short>::Cut(unsigned,unsigned)' is multiply defined: (file ../../dist/lib/libnkcnvts_s.a(f4fvlIS-dGBS34zC7Na1.o) and file ../../dist/lib/libnkhttp_s.a(f4fvlIS-dGBS34zC7Na1.o)); ld: fatal: symbol `__type_1 copy_string<nsReadingIterator<unsigned short>,nsWritingIterator<unsigned short> >(__type_0,__type_0,__type_1)' is multiply defined: (file ../../dist/lib/libnkcnvts_s.a(CePR6nPUMQwdEA8kCGso.o) and file ../../dist/lib/libnkhttp_s.a(CePR6nPUMQwdEA8kCGso.o)); ld: fatal: symbol `void basic_nsAWritableString<char>::Cut(unsigned,unsigned)' is multiply defined: (file ../../dist/lib/libnkmime_s.a(BN8GK0RpT71DgyR2XM3v.o) and file ../../dist/lib/libnkjar_s.a(BN8GK0RpT71DgyR2XM3v.o)); ld: fatal: symbol `__type_1 copy_string<nsReadingIterator<char>,nsWritingIterator<char> >(__type_0,__type_0,__type_1)' is multiply defined: (file ../../dist/lib/libnkmime_s.a(h7WUUlu0GDLbyOISDnwO.o) and file ../../dist/lib/libnkjar_s.a(h7WUUlu0GDLbyOISDnwO.o)); ld: fatal: symbol `basic_nsLiteralString<char>::__vtbl' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkabout_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1nVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkabout_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpnVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkabout_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `__RTTI__1CpknVbasic_nsLiteralString4Cc__' is multiply defined: (file ../../dist/lib/libneckobase_s.a(M_ALsGulmTaMOa0M29Lq.o) and file ../../dist/lib/libnkabout_s.a(M_ALsGulmTaMOa0M29Lq.o)); ld: fatal: symbol `const char*basic_nsLiteralString<char>::GetReadableFragment(nsReadableFragment<char>&,nsFragmentRequest,unsigned)const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(_9bmD7qanKkIEYFzfOBx.o) and file ../../dist/lib/libnkabout_s.a(_9bmD7qanKkIEYFzfOBx.o)); ld: fatal: symbol `const void*basic_nsAReadableString<char>::Implementation()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(TAH495zWbmMXl-3gJwP7.o) and file ../../dist/lib/libnkabout_s.a(TAH495zWbmMXl-3gJwP7.o)); ld: fatal: symbol `unsigned basic_nsLiteralString<char>::Length()const' is multiply defined: (file ../../dist/lib/libneckobase_s.a(7gD3-LaYRCDo3nIJSPgo.o) and file ../../dist/lib/libnkabout_s.a(7gD3-LaYRCDo3nIJSPgo.o)); ld: fatal: symbol `int Compare<char>(const basic_nsAReadableString<__type_0>&,const basic_nsAReadableString<__type_0>&)' is multiply defined: (file ../../dist/lib/libneckobase_s.a(W-T2dGWVdkRa2a86qYuW.o) and file ../../dist/lib/libnkabout_s.a(W-T2dGWVdkRa2a86qYuW.o)); ld: fatal: File processing errors. No output written to libnecko.so make: *** [libnecko.so] Error 1
Comment 2•24 years ago
|
||
Wow. This _could_ be a very serious problem. If the linker from workshop 5.0 can't strip multiple template instantiations automatically, we're going to have some trouble. ... _if_ that's what this is ...
Status: NEW → ASSIGNED
Target Milestone: --- → M17
Updated•24 years ago
|
Target Milestone: M17 → M16
Comment 3•24 years ago
|
||
did somebody mention to me that there is a linker option that makes this problem go away?
There is a "-z muldefs" option to the linker which will make it silently use the first definition of a symbol, but that's a rather ugly solution to this problem. I'll prepare and test a patch in case we use this as a temporary solution.
I've checked in a temporary fix using "-z muldefs". The following is a slightly more elegent solution suggestion by jlnance which uses a single global repository for the whole mozilla tree and delays template instantiation until the creation of the shared library. Unfortunately the "-ptr" option this relies on appears to be nonfunctional in SUNWspro5.0. Maybe the Sun people can take another look? Index: configure.in =================================================================== RCS file: /cvsroot/mozilla/configure.in,v retrieving revision 1.647 diff -u -r1.647 configure.in --- configure.in 2000/05/20 23:47:23 1.647 +++ configure.in 2000/05/21 03:35:03 @@ -889,7 +889,8 @@ if test -z "$GNU_CC"; then AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) LDFLAGS='-xildoff' - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@' + CXXFLAGS="$CXXFLAGS -ptr$(MOZ_BUILD_ROOT)" + MKSHLIB='$(CXX) -xar $(CXXFLAGS) $(DSO_LDOPTS) -o $@' MKCSHLIB='$(CC) $(CFLAGS) $(DSO_LDOPTS) -o $@' MKSHLIB_FORCE_ALL='-z allextract' MKSHLIB_UNFORCE_ALL='' @@ -897,8 +898,6 @@ AR_LIST="$AR t" AR_EXTRACT="$AR x" AR_DELETE="$AR d" - AR='$(CXX) -xar' - AR_FLAGS='-o $@' AS='/usr/ccs/bin/as' AS_DASH_C_FLAG='' NS_USE_NATIVE=1
Comment 6•24 years ago
|
||
[richb - 5/22/00] I'm not sure I've got much to add here. I've just checked our internal bug tracking system, and there don't appear to be any bugs filed against the -ptr option. I've included the section from the CC man page on -ptr. tor, the -ptr option is being supplied at link time, yes? ... -ptrpath Specifies the directory of the template reposi- tory. The template repository cache files are stored in path/SunWS_cache. The template repository confi- guration files are stored in path/SunWS_config. You cannot use multiple -ptr options. Examples: -ptr/tmp/Foo specifies the repository subdirectories /tmp/Foo/SunWS_cache and /tmp/Foo/SunWS_config. Interactions: The subdirectory names can be changed with the environmental variables SUNWS_CACHE or SUNWS_CONFIG . Warnings: If you use -ptr to compile, you must also use -ptr to link.
The -ptr option is added at compile time and shared library link time (added to CXXFLAGS), but the compiler is still dumping the template repositories wherever it pleases in the build tree. Example command line containing -ptr: CC -library=iostream -o nsTextFormatter.o -c -DOSTYPE=\"SunOS5\" -DOJI -D_IMPL_N S_COM -D_IMPL_NS_BASE -I../../dist/include -I/cs/src/mozilla/mozilla/include -I /cs/lib/nspr/include -I/usr/openwin/include -KPIC -ptr/ltmp/mdebug2 -mt - DDEBUG -DDEBUG_tor -DTRACING -g -DMOZILLA_CLIENT -DBROKEN_QSORT=1 -DNSCAP_DISABL E_DEBUG_PTR_TYPES=1 -DULTRA_SPARC=1 -DD_INO=d_ino -DMOZ_WIDGET_GTK=1 -DMOZ_DEFAU LT_TOOLKIT=\"gtk\" -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_INT16_T=1 -DHAVE_ INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAV E_DIRENT_H=1 -DHAVE_SYS_BYTEORDER_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE _SYS_FILIO_H=1 -DHAVE_SYS_IPC_H=1 -DHAVE_SYS_SHM_H=1 -DHAVE_X11_EXTENSIONS_XSHM_ H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_SYS_M OUNT_H=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_LIBRESOLV=1 -DHAVE_LIBSOCKET=1 -DHA VE_LIBNSL=1 -DHAVE_LIBELF=1 -DHAVE_LIBINTL=1 -DHAVE_LIBPOSIX4=1 -DHAVE_LIBW=1 -D _REENTRANT=1 -DHAVE_RANDOM=1 -DHAVE_QSORT=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -D HAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STATVFS=1 -DHAVE_MEM MOVE=1 -DHAVE_USLEEP=1 -DHAVE_GETTIMEOFDAY=1 -DGETTIMEOFDAY_TWO_ARGS=1 -DHAVE_DE V_ZERO=1 -DHAVE_IOS_BINARY=1 -DHAVE_OSTREAM=1 -DHAVE_CPP_EXPLICIT=1 -DHAVE_CPP_S PECIALIZATION=1 -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX=1 -DHAVE_ACCESS_CHA NGING_CPP_USING=1 -DHAVE_AMBIGUITY_RESOLVING_CPP_USING=1 -DHAVE_CPP_NAMESPACE_ST D=1 -DHAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL=1 -DHAVE_CPP_NEW_CASTS=1 -DNEED_CPP_UNUS ED_IMPLEMENTATIONS=1 -DHAVE_I18N_LC_MESSAGES=1 -DNS_MT_SUPPORTED=1 -DDETECT_WEBS HELL_LEAKS=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -D UNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DLAYERS=1 /cs/src/mozilla/mozilla/xpcom/ds/ nsTextFormatter.cpp
Comment 8•24 years ago
|
||
[richb - 5/23/00] I've submitted a P1/S1 bug against the Sun compilers on this (#4340331). Thanks to tor for isolating it into a simple example that easily replicates the problem.
Workaround in tree. Taking bug and moving milestone to post-nsbeta2.
Assignee: scc → tor
Status: ASSIGNED → NEW
Target Milestone: M16 → M18
Assignee | ||
Comment 10•24 years ago
|
||
Any news from the compiler group about specifying the repository, richb?
Status: NEW → ASSIGNED
Comment 11•24 years ago
|
||
Not yet. I'll ping them now.
Updated•24 years ago
|
Target Milestone: M18 → ---
Comment 12•21 years ago
|
||
We added a check years ago to require WS6U2 or higher. Marking wontfix.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•