| Ticket UUID: | 220955 | |||
| Title: | Under AIX, configure --enable-gcc produces a nonworking Makf | |||
| Type: | Bug | Version: | obsolete: 8.3.2 | |
| Submitter: | welch | Created on: | 2000-11-01 01:31:57 | |
| Subsystem: | 84. Unix Build | Assigned To: | mdejong | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2002-04-08 22:04:24 | |
| Resolution: | Fixed | Closed By: | mdejong | |
| Closed on: | 2002-04-08 15:04:24 | |||
| Description: |
OriginalBugID: 6302 Bug
Version: 8.3.2
SubmitDate: '2000-09-22'
LastModified:
Severity: CRIT
Status: UnAssn
Submitter: techsupp
OS: AIX
Comments:
Sorry I'm not sending a better patch!
ReproducibleScript:
configure --enable-gcc
ObservedBehavior:
Using /bin/ld, libgcc.a isn't found. Different compile options use
-Wl,-b... while others use -b... - these two forms cannot be mixed
DesiredBehavior:
If --enable-gcc is supplied, /bin/ld should not be called, and all
loader-specific flags should use the -Wl,-b form
Patch:
--- Makefile Fri Sep 22 16:49:44 2000
+++ Makefile.good Fri Sep 22 16:52:56 2000
@@ -204,7 +204,7 @@
# libraries. See configure.in for a description of what it means.
# The values of the symbolis normally set by the configure script.
-SHLIB_LD = /usr/local/trilogy/download/src/tcltk/tcl8.3.2/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
+SHLIB_LD = /usr/local/trilogy/download/src/tcltk/tcl8.3.2/unix/ldAix $(CC) -Wl,-bhalt:4 -Wl,-bM:SRE -Wl,-bE:lib.exp -Wl,-H512 -Wl,-T512 -Wl,-bnoentry
SHLIB_LD_LIBS = ${LIBS}
# Additional search flags needed to find the various shared libraries
@@ -391,23 +391,23 @@
wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE)
$(CC) $(WISH_OBJS) - -bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp + -Wl,-bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o wish
# This rule is executed if the user tried to run tktest without first
# building tcltest in the Tcl bin directory. Just do it for them.
${TCL_BIN_DIR}/tcltest:
cd ${TCL_BIN_DIR} ; - make tcltest
+ $(MAKE) tcltest
tktest: ${TCL_BIN_DIR}/tcltest $(TKTEST_OBJS) $(TK_LIB_FILE)
${CC} $(TKTEST_OBJS) - -bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp + -Wl,-bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o tktest
xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
${CC} test.o tkTest.o tkSquare.o - -bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp + -Wl,-bI:/usr/local/trilogy/download/src/tcltk/tk8.3.2/unix/A.powerpc-ibm-aix4.3.3.0/lib.exp $(WISH_LIBS) $(TK_LD_SEARCH_FLAGS) -lXt -o xttest
# Note, in the target below TCL_LIBRARY needs to be set or else
PatchFiles:
I suspect configure.in and Makfile.in
| |||
| User Comments: |
mdejong added on 2002-04-08 22:04:24:
Logged In: YES user_id=90858 A back port of these changes would be a lot of work. Last I heard, shared libs were building under AIX in the 8.3 version so it should not be required. It took a lot of work to get AIX building again in 8.4. Lack of access to an AIX box was the main problem. If things work for AIX in 8.3 then we should leave it alone. dgp added on 2002-03-19 04:37:49: Logged In: YES user_id=80530 This fix didn't seem to make it into Tcl 8.3.x. Is it feasible to backport it? mdejong added on 2002-01-30 01:09:49: Logged In: YES user_id=90858 This should be fixed as of 2002-01-28. dgp added on 2002-01-29 10:04:15: Logged In: YES user_id=80530 that works. stick a fork in it. mdejong added on 2002-01-29 06:20:47: File Deleted - 16795: File Added - 16918: aix.patch mdejong added on 2002-01-29 06:20:46: Logged In: YES user_id=90858 Ok, I have attached a new patch that should fix the problem without hosing around with -l flags. Please give it a test drive and I will check it in. dgp added on 2002-01-28 00:58:28: Logged In: YES
user_id=80530
No, with that patch wish fails to link:
gcc -pipe tkAppInit.o \
-Wl,-bI:/home/fs3c/dgp/tmp/tk8.4a4/unix/lib.exp
-L/home/fs3c/dgp/tmp/tk8.4a4/unix -ltk8.4 \
-Wl,-bI:/home/fs3c/dgp/tmp/tcl8.4a4/unix/lib.exp
-L/home/fs3c/dgp/tmp/tcl8.4a4/unix -lc -lX11 -ldl -lm
-L/home/fs3c/dgp/rs6000/aix4/lib -o wish
ld: 0706-006 Cannot find or open library file: -l tk8.4
ld:open(): A file or directory in the path name does
not exist.
It appears to me that when a *.exp file is being used on
AIX, the -l option should not be used. When I edit
the Makefile and remove "-ltk8.4" from the wish: and
tktest-real: targets, then everything builds fine.
But I don't really understand it.
mdejong added on 2002-01-26 17:17:03: File Deleted - 16414: mdejong added on 2002-01-26 17:15:53: File Added - 16795: build_lib.patch mdejong added on 2002-01-26 17:15:51: Logged In: YES user_id=90858 Here is an initial patch that implements the change I originally described in TIP 34. Please take it for a test drive and tell me if this fixes the problem under AIX. The patch simply uses the TCL_LIB_SPEC setting stored in tclConfig.sh. It should fix the problem and still work a built or installed version of Tcl. dkf added on 2002-01-22 17:20:46: Logged In: YES user_id=79902 CVS sez: That hack was added in version 1.35 by wart, who claimed it was to make the file TEA compliant (first public release was with 8.2b1) mdejong added on 2002-01-22 05:27:28: Logged In: YES user_id=90858 That hack where it resets TCL_LIB_SPEC is only in there to support linking from the build dir or from the install dir. It is a rather sad old hack, it really should die. I described a method to replace this hack in TIP 34 under the header "Build vs. Install Configuration". It might be time to rip out these old hacks and use this new method. Also, were you able to figure out why Tcl was not linking after the patch was added? Is it because there is a . in the lib name but the lib on the disk has no dot in the name? dgp added on 2002-01-22 02:39:13: Logged In: YES user_id=80530 OK, the problem is with lines 348-349 of tk/unix/configure.in. Working definitions for TCL_LIB_SPEC and TCL_BUILD_LIB_SPEC are stored in tclConfig.sh by Tcl's configure script. Those defintions are read from tclConfig.sh, but are then overwritten by lines 348-349 of Tk's configure.in. When I remove those lines, wish builds properly on AIX. I do not know what effect removing those lines might have on other platforms, possible breaking them. However, it seems to me that if the tclConfig.sh script has given us values for these variables, we ought to keep them, not overwrite them. Perhaps lines 348-349 should be kept, but performed only on the condition that those variables are undefined? How long has Tk building been not working on AIX? Can we trace back to what change broke it in the first place? Or has it never worked? dgp added on 2002-01-22 00:20:53: Logged In: YES
user_id=80530
After this patch, tclsh fails to link:
gcc -pipe -c -O -Wall -Wconversion -Wno-implicit-int
-I./../generic -I. -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1
-DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1
-DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1
-DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_GMTIME_R=1
-DHAVE_LOCALTIME_R=1 -DHAVE_TIMEZONE_VAR=1
-DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNO_UNION_WAIT=1
-DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1
-DUSE_DELTA_FOR_TZ=1 -DHAVE_SYS_IOCTL_H=1
-DTCL_SHLIB_EXT=\".so\" ./../unix/tclAppInit.c
gcc -pipe tclAppInit.o
-Wl,-bI:/home/fs3c/dgp/tmp/tcl8.4a4/unix/lib.exp
-L/home/fs3c/dgp/tmp/tcl8.4a4/unix -ltcl8.4 -ldl -lc -lm
-lbsd \
-L/home/fs3c/dgp/rs6000/aix4/lib -o tclsh
ld: 0706-006 Cannot find or open library file: -l tcl8.4
ld:open(): A file or directory in the path name
does not exist.
Will continue to look for a solution.
mdejong added on 2002-01-20 05:07:26: File Added - 16414: aix.patch Logged In: YES user_id=90858 I took a look at the configure.in file and it seems that no -l option was being passed when a .exp file is used. I think the following patches to Tcl and Tk might fix the problem, but I have no way to test this. Please give the attached patch a test run. If it does not work, please try to figure out why it does not work while you have access to the AIX box. mdejong added on 2002-01-20 04:31:53: Logged In: YES
user_id=90858
I don't understand why your -L options are missing
-l arguments. Here is what I get when I run the
command under Linux.
gcc -pipe -rdynamic tkAppInit.o \
-L/home/mo/project/build/tk -ltk8.4g \
-L/home/mo/project/build/tcl -ltcl8.4
-L/usr/X11R6/lib -lX11 -ldl -lieee -lm
-Wl,-rpath,/usr/local/lib:/usr/local/project/install/tcl/lib:/usr/X11R6/lib
-o wish
Note how -ltcl8.4 appears after the -L argument for
the Tcl build directory. Could you look into why
this is not working with your AIX box?
It seems the unresolved symbols come from the
tkAppInit.c file. I am not sure if it should
also be build with the -DUSE_TCL_STUBS flag.
% nm tkAppInit.o | grep Tcl
0000003c T Tcl_AppInit
U Tcl_CreateInterp
U Tcl_Init
U Tcl_SetVar
U Tcl_StaticPackage
dgp added on 2002-01-20 00:07:44: Logged In: YES user_id=80530 still moving the ball forward. The HEAD of 2002-Jan-18 when configured --enable-gcc --enable-shared now fails to link wish: gcc -pipe tkAppInit.o -Wl,-bI:/home/fs3c/dgp/tmp/tk8.4a4/unix/lib.exp \ -L/home/fs3c/dgp/tmp/tk8.4a4/unix -L/home/fs3c/dgp/tmp/tcl8.4a4/unix \ -lc -lX11 -ldl -lm -L/home/fs3c/dgp/rs6000/aix4/lib -o wish ld: 0711-317 ERROR: Undefined symbol: .Tcl_CreateInterp ld: 0711-317 ERROR: Undefined symbol: .Tcl_Init ld: 0711-317 ERROR: Undefined symbol: .Tcl_StaticPackage ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetVar ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. mdejong added on 2002-01-12 01:45:42: Logged In: YES user_id=90858 Added patch from bug report 220858 to build Tk with stubs enabled on 2002-01-11, it should fix the build under AIX. mdejong added on 2002-01-12 00:37:49: Logged In: YES user_id=90858 This is a different problem. It now fails because Tk is not being built with correctly WRT stub support. That is bug 220858. dgp added on 2001-12-20 00:40:12: Logged In: YES user_id=80530 No. It fails during the link step: $ make rm -f libtk8.4.so /home/fs3c/dgp/tmp/tcl8.4a4/unix/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -o libtk8.4.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 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 tkUnixFont.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 tkButton.o tkEntry.o tkFrame.o tkListbox.o tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.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 -L/usr/local/lib -L/home/fs3c/dgp/tmp/tcl8.4a4/unix -lc -lX11 -ldl -lm noDotA="libtk8.4.so" ld: 0711-317 ERROR: Undefined symbol: .Tcl_GetString ... <dozens of undefined symbols deleted> ... ld: 0711-317 ERROR: Undefined symbol: .Tcl_SetMainLoop ld: 0711-317 ERROR: Undefined symbol: tclStubsPtr ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. make: *** [libtk8.4.so] Error 8 mdejong added on 2001-12-19 15:03:15: Logged In: YES user_id=90858 This bug should be fixed in the HEAD as of 2001-12-18. It has not been tested with a gcc AIX build so if someone could double check it that would be great. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki