build problem on powerpc-ibm-aix5.2.0.0
Closed / Fixed761385ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2003-06-26 19:23:40
When building tcl-8.4.3 with gcc-3.3 on a
powerpc-ibm-aix5.2.0.0,
I get the following output during the 'make' stage:
/home/kate/tcl8.4.3/src/tcl8.4.3/unix/ldAix /bin/ld
-bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -o
libtcl8.4.so regcomp.o regexec.o regfree.o regerror.o
tclAlloc.o tclAsync.o tclBasic.o tclBinary.o
tclCkalloc.o tclClock.o tclCmdAH.o tclCmdIL.o
tclCmdMZ.o tclCompCmds.o tclCompExpr.o tclCompile.o
tclDate.o tclEncoding.o tclEnv.o tclEvent.o
tclExecute.o tclFCmd.o tclFileName.o tclGet.o tclHash.o
tclHistory.o tclIndexObj.o tclInterp.o tclIO.o
tclIOCmd.o tclIOGT.o tclIOSock.o tclIOUtil.o tclLink.o
tclListObj.o tclLiteral.o tclLoad.o tclMain.o
tclNamesp.o tclNotify.o tclObj.o tclPanic.o tclParse.o
tclParseExpr.o tclPipe.o tclPkg.o tclPosixStr.o
tclPreserve.o tclProc.o tclRegexp.o tclResolve.o
tclResult.o tclScan.o tclStringObj.o tclThread.o
tclThreadAlloc.o tclThreadJoin.o tclStubInit.o
tclStubLib.o tclTimer.o tclUtf.o tclUtil.o tclVar.o
tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o
tclUnixFile.o tclUnixPipe.o tclUnixSock.o tclUnixTime.o
tclUnixInit.o tclUnixThrd.o tclUnixNotfy.o
tclLoadDl.o -ldl -lc -lm
-L/home/kate/tcl8.4.3/AIX/lib
noDotA="libtcl8.4.so"
ld: 0711-317 ERROR: Undefined symbol: .__floatdidf
ld: 0711-317 ERROR: Undefined symbol: .__moddi3
ld: 0711-317 ERROR: Undefined symbol: .__ashldi3
ld: 0711-317 ERROR: Undefined symbol: .__ashrdi3
ld: 0711-317 ERROR: Undefined symbol: .__divdi3
ld: 0711-317 ERROR: Undefined symbol: .__fixdfdi
ld: 0711-345 Use the -bloadmap or -bnoquiet option to
obtain more information.
make: *** [libtcl8.4.so] Error 8
If I modify unix/configure so that instead of saying
SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4
-bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
it says
SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld -bhalt:4
-bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
/data/gcc-3.3/A
IX/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3/libgcc.a"
then I successfully get past the 'make' stage.
However at the 'make test' stage, using either gcc-3.3
or
the native cc compiler, I get
Files with failing tests: http.test httpold.test
io.test socket.test
I am not sure if these failures are serious.
dkf Ticket [761385ffff]: 2 changes
[History diff]2003-06-27 15:33:35
mdejongplain2003-06-29 07:58:57
Logged In: YES user_id=90858 I don't like the idea of passing libgcc.a in on the link line. Does linking need to be done with gcc if the code is built with gcc? Perhaps instead of passing /bin/ld the path name of the gcc executable should be passed. I don't know what to tell you about the failed tests, but since they all seem to be related to networking, so they might not be critical.
nobodyplain2003-12-11 00:31:15
Logged In: NO
I encounter this same bug on AIX 5.2, ppc. gcc adds the
libgcc.a when linking, but if gcc was used to compile and
when 'ldAix /bin/ld' is used for linking, the libgcc.a is
not included.
This patch to tcl8.4.5/unix/tcl.m4 works for me, and should
be more portable than referencing specific files.
*** tcl.m4.orig Wed Dec 10 09:38:54 2003
--- tcl.m4 Wed Dec 10 09:39:43 2003
***************
*** 874,879 ****
--- 874,883 ----
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
TCL_NEEDS_EXP_FILE=1
TCL_EXPORT_FILE_SUFFIX='${VERSION}${DBGX}.exp'
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS `gcc -print-libgcc-file-name`"
+ fi
+
fi
;;
AIX-*)
I also tried linking with gcc, collecting all of the ld
arguments
and passing via -Wl, which also seems to work, still using
ldAix to build the export file before invoking gcc:
*** tcl.m4.orig Wed Dec 10 09:38:54 2003
--- tcl.m4 Wed Dec 10 10:02:33 2003
***************
*** 868,874 ****
fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
else
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld
-bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
${SHLIB_LD_FLAGS}"
DL_LIBS="-ldl"
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
--- 868,878 ----
fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
else
! if test "$GCC" = "yes" ; then
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix gcc
-Wl,-bhalt:4,-bM:SRE,-bE:lib.exp,-H512,-T512,-bnoentry"
! else
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix
/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
${SHLIB_LD_FLAGS}"
! fi
DL_LIBS="-ldl"
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
This seems to work just as well.
The same change should be done to the tk8.4.5/unix/tcl.m4:
*** tcl.m4.orig Wed Dec 10 10:26:52 2003
--- tcl.m4 Wed Dec 10 10:27:37 2003
***************
*** 868,874 ****
fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
else
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix /bin/ld
-bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
${SHLIB_LD_FLAGS}"
DL_LIBS="-ldl"
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
--- 868,878 ----
fi
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
else
! if test "$GCC" = "yes" ; then
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix
gcc -Wl,-bhalt:4,-bM:SRE,-bE:lib.exp,-H512,-T512,-bnoentry
${SHLIB_LD_FLAGS}"
! else
! SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix
/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry
${SHLIB_LD_FLAGS}"
! fi
DL_LIBS="-ldl"
CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
note the addition of ${SHLIB_LD_FLAGS} in the case of
tk8.4.5/unix/tcl.m4
I was just at the dentist last week. Somehow, building
*anything* on AIX seems like deja vu.
-Tom Poindexter
dkfplain2003-12-11 16:48:23
Logged In: YES user_id=79902 As an informative datapoint: The technique of using gcc to do the link phase when it was used to do the compile stage is used on other platforms (Solaris?) because of similar issues. By contrast, native compilers just inline instructions that do the things that gcc does with a separate library.
hobbsplain2005-05-31 10:07:57
Logged In: YES user_id=72656 This is working in a recent release.
Log in (anonymous is fine) to add a comment.