| Ticket UUID: | 1080205 | |||
| Title: | libtk8.4 link on sparc solaris fails | |||
| Type: | Bug | Version: | obsolete: 8.5a2 | |
| Submitter: | lvirden | Created on: | 2004-12-06 20:10:29 | |
| Subsystem: | 84. Unix Build | Assigned To: | mdejong | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2006-03-31 14:41:11 | |
| Resolution: | Invalid | Closed By: | hobbs | |
| Closed on: | 2006-03-31 07:41:11 | |||
| Description: |
Something in the past 3 days has changed regarding the linking for libtk - on sparc solaris today I get this on the cvs head: /usr/ccs/bin/ld -G -z text -o libtk8.5g.so tk3d.o tkArgv.o tkAtom.o tkBind.o tk Bitmap.o tkClipboard.o tkCmds.o tkColor.o tkConfig.o tkConsole.o tkCursor.o tkEr ror.o tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o tkSelect.o tkStyle .o tkUndo.o tkUtil.o tkVisual.o tkWindow.o tkUnix.o tkUnix3d.o tkUnixButton.o tk UnixColor.o tkUnixConfig.o tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent .o tkUnixFocus.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o tkUnixMenubu.o tkUnixScal e.o tkUnixScrlbr.o tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit .o tkStubLib.o tkUnixFont.o tkButton.o tkEntry.o tkFrame.o tkListbox.o tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkPanedWindow.o tkScale.o tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o tkCanvLine.o tkCanvPoly.o tkCanv Ps.o tkCanvText.o tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o tkImage.o tkIm gBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o tkText.o tkTextBTree.o tkTextDisp.o t kTextImage.o tkTextIndex.o tkTextMark.o tkTextTag.o tkTextWind.o -lpthread -L/us r/openwin/lib -lX11 -ldl -lsocket -lpthread -lm -L/vol/tclsrcsol/tcl85/tcl/uni x -ltclstub8.5g -Wl,-R,/volws/lwv28/ldatae/lib:/usr/openwin/lib /usr/ccs/bin/ld: illegal option -- W usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s) | |||
| User Comments: |
lvirden added on 2004-12-08 01:49:50:
Logged In: YES user_id=15949 No, actually, the person who installed gcc installed gnu's ld as ld instead of gld. This caused the gnu ld to be picked up even though I was using Sun's cc. What a nasty problem. I'm rerunning the configure, build and install of both tcl and tk to test to see if that resolves all problems. hobbs added on 2004-12-08 01:41:26: Logged In: YES user_id=72656 You have compiled Tcl with gcc and Tk with cc is my guess - stick to one or the other. This isn't an issue with extensions, but Tcl and Tk are still too tightly bound with some config stuff. lvirden added on 2004-12-08 01:38:53: Logged In: YES
user_id=15949
When I hand edit the tk/unix Makefile so that it uses -R
instead of -Wl,-R , I see this:
cc -c -g -KPIC -I/vol/tclsrcsol/tcl85/tk/unix
-I/vol/tclsrcsol/tcl85/tk/unix/../generic
-I/vol/tclsrcsol/tcl85/tk/unix/../bitmaps
-I/vol/tclsrcsol/tcl85/tcl/generic
-I/vol/tclsrcsol/tcl85/tcl/unix -I/usr/openwin/include
-DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\"
-DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\"
-DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -DUSE_THREAD_STORAGE=1
-D_REENTRANT=1 -D_THREAD_SAFE=1
-DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_READDIR_R=1
-D_REENTRANT=1 -D_POSIX_PTHREAD_SEMANTICS=1
-DTCL_CFG_DEBUG=1 -DTCL_WIDE_INT_TYPE=long\ long
-DHAVE_STRUCT_DIRENT64=1 -DHAVE_STRUCT_STAT64=1
-DHAVE_TYPE_OFF64_T=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_PW_GECOS=1 -Dstrtod=fixstrtod
-DTCL_NO_DEPRECATED
/vol/tclsrcsol/tcl85/tk/unix/tkAppInit.c
cc tkAppInit.o \
-L/vol/tclsrcsol/tcl85/tk/unix -ltk8.5g \
-L/vol/tclsrcsol/tcl85/tcl/unix -ltcl8.5g -lpthread
-L/usr/openwin/lib -lX11 -ldl -lsocket -lnsl -lpthread -lm
-R /volws/lwv28/ldatae/lib:/usr/openwin/lib -o wish
ld: warning: global symbol `_GLOBAL_OFFSET_TABLE_' has
non-global binding:
(file /vol/gnu/gcc/lib/libgcc_s.so.1 value=LOCL);
I'm uncertain what that is trying to say - but even more
worrisome is the fact that the gcc file is being referenced,
even though I'm not using gcc in the code. There's
something wrong here.
Ah - I just found something that might explain things! For
some reason,
it looks like the ld being used is not the one that matches
cc, but a gnu ld. I will check into what is going on with that!
dgp added on 2004-12-08 01:24:23: Logged In: YES
user_id=80530
I'd try replacing "${LD_SEARCH_FLAGS}"
in the Makefile with the correct value you
now know it should have and see what
difference that makes.
lvirden added on 2004-12-08 01:13:35: Logged In: YES user_id=15949 yes, I'm sure I don't have that variable set. I have 146 other environment variables set though - like LD_RUN_PATH and LD_LIBRARY_PATH. I have to set those, so that programs compiled on solaris will run. dgp added on 2004-12-08 01:07:27: Logged In: YES user_id=80530 everything looks ok from here. You're sure your environment doesn't have some value for LD_SEARCH_FLAGS coming in and causing trouble? lvirden added on 2004-12-08 00:57:40: Logged In: YES
user_id=15949
Here's the targets in the Tk Makefile.
# The following target is configured by autoconf to generate
either
# a shared library or non-shared library for Tk.
${LIB_FILE}: ${OBJS}
rm -f $@
${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS}
${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHL
IB_LD_EXTRAS} ${LD_SEARCH_FLAGS}
${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
rm -f $@
${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@
dgp added on 2004-12-08 00:49:59: Logged In: YES
user_id=80530
I"m looking for the target, not
the definition. Should be something
like this:
# The following target is configured by autoconf to generate
either
# a shared library or non-shared library for Tk.
${LIB_FILE}: ${OBJS}
rm -f $@
${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS}
${SHLIB_LD_LIBS} ${TCL_SHLIB
_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}
lvirden added on 2004-12-08 00:46:27: Logged In: YES
user_id=15949
# To enable support for stubs in Tcl.
STUB_LIB_FILE = libtkstub8.5g.a
TK_STUB_LIB_FILE = libtkstub8.5g.a
#TK_STUB_LIB_FILE = libtkstub.a
# Generic stub lib name used in rules that apply to tcl and tk
STUB_LIB_FILE = ${TK_STUB_LIB_FILE}
TK_STUB_LIB_FLAG = -ltkstub8.5g
#TK_STUB_LIB_FLAG = -ltkstub
TK_LIB_FILE = libtk8.5g.so
#TK_LIB_FILE = libtk.a
# Generic lib name used in rules that apply to tcl and tk
LIB_FILE = ${TK_LIB_FILE}
TK_LIB_FLAG = -ltk8.5g
#TK_LIB_FLAG = -ltk
dgp added on 2004-12-08 00:38:45: Logged In: YES
user_id=80530
The MAKE_LIB value in the
config.log you sent also looks OK.
How does the ${LIB_FILE} target
in your Makefile look?
lvirden added on 2004-12-08 00:30:30: Logged In: YES user_id=15949 No, all I do is remove the old tk source tree, extract the cvs head tar file from activestate's ftp site, cd into tk/unix, run the configure statement, and run make. dgp added on 2004-12-08 00:27:58: Logged In: YES user_id=80530 Your config.log files show what looks like the correct value for LD_SEARCH_FLAGS, so why is your link line wrong? Have you been hacking on the Makefile(.in) ? lvirden added on 2004-12-08 00:20:35: File Added - 111594: config.log lvirden added on 2004-12-08 00:20:32: Logged In: YES user_id=15949 i've uploaded the config.log files for tcl and tk 8.5 cvs head. lvirden added on 2004-12-08 00:18:22: File Added - 111593: config.log lvirden added on 2004-12-08 00:18:13: Logged In: YES user_id=15949 I am attaching my config.log file. Perhaps it will be of help here. I don't believe that I have anything unusual in my environment variables. dgp added on 2004-12-08 00:05:07: Logged In: YES user_id=80530 I have success on a sparc solaris 9 system with the 8.5a2 release candidate tarballs and $ cc -V cc: Forte Developer 7 C 5.4 2002/03/09 The link line I see is: /usr/ccs/bin/ld -G -z text -o libtk8.5g.so tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o tkColor.o tkConfig.o tkConsole.o tkCursor.o tkError.o tkEvent.o tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o tkSelect.o tkStyle.o tkUndo.o tkUtil.o tkVisual.o tkWindow.o tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o tkUnixFont.o tkButton.o tkEntry.o tkFrame.o tkListbox.o tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkPanedWindow.o tkScale.o tkScrollbar.o tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o tkTextMark.o tkTextTag.o tkTextWind.o -lpthread -L/usr/openwin/lib -lX11 -ldl -lsocket -lnsl -lpthread -lm -L/home/fs3c/dgp/tcl8.5a2/unix -ltclstub8.5g -R /tmp/dgp/lib:/usr/openwin/lib Looks like your value of LD_SEARCH_FLAGS got broken somehow? Anything in config.log that sheds light on that? lvirden added on 2004-12-07 19:07:53: Logged In: YES user_id=15949 1. My results above are from extracting the tar into a brand new directory. 2. However, to satisfy you, I did a make distclean. 3. The problem still exists. 4. Platform: SPARC Solaris 8, Sun C compiler Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09 5. ./configure --prefix=/volws/lwv28/ldatae --enable-shared --enable-symbols --enable-stubs --enable-threads hobbs added on 2004-12-07 03:32:38: Logged In: YES user_id=72656 make distclean and rebuild. This works fine for me. On Solaris8, I never get -Wl,-R..., just -R direct. The -Wl,-R should only occur for the -o wish line. | |||
Attachments:
- config.log [download] added by lvirden on 2004-12-08 00:20:34. [details]
