I'm using the new xcode projects on my nice new imac intel-duo, and
Tcl builds ok, but Tk's build (for the 'universal' target) fails with this:
Building target “Tk” of project “Wish” — (1 error, 2 warnings)
cd /Users/vince/Desktop/Programming/tk/macosx
setenv ACTION
/bin/bash -c cd\ \"/Users/vince/Desktop/Programming/tk/
macosx/../../tk/macosx\"\ \ &&\ a=`echo\ $0\ |\ sed\ -e\ s/clean/
distclean/\ -e\ \'s/..*/&-/\'`\ &&\ CFLAGS=\"-Wno-deprecated-
declarations\ -arch\ ppc\ -arch\ i386\ -isysroot\ /Developer/SDKs/
MacOSX10.4u.sdk\ -mmacosx-version-min=10.4\"\ gnumake\ $a
\"\"deploy\ INSTALL_ROOT=\"/tmp/Wish.dst\"\ INSTALL_PATH=\"/
Library/Frameworks\"\ PREFIX=\"/usr/local\"\ BINDIR=\"/usr/local/bin
\"\ MANDIR=\"/usr/local/man\"\ TCL_BUILD_DIR=\"/Users/vince/
Desktop/Programming/tk/macosx/../../build/tk/../tcl/Deployment\"\
APPLICATION_INSTALL_PATH=\"/Applications/Utilities\"\
$EXTRA_MAKE_FLAGS\ SRCROOT=/Users/vince/Desktop/
Programming/tk/macosx\ OBJROOT=/Users/vince/Desktop/
Programming/tk/macosx/../../build/tk\ SYMROOT=/Users/vince/
Desktop/Programming/tk/macosx/../../build/tk\ DSTROOT=/tmp/
Wish.dst ""
gnumake tk \
BUILD_STYLE=Deployment INSTALL_TARGET=install-strip
gnumake install-tk INSTALL_ROOT=/Users/vince/Desktop/
Programming/tk/macosx/../../build/tk/Deployment/
gnumake -C /Users/vince/Desktop/Programming/tk/macosx/../../
build/tk/Deployment all tktest INSTALL_ROOT='/Users/vince/Desktop/
Programming/tk/macosx/../../build/tk/Deployment/'
INSTALL_TARGETS='install-binaries install-libraries install-private-
headers install-demos' VERSION='8.5'
rm -f Tk
gcc -pipe -dynamiclib -Os -Wno-deprecated-declarations -arch ppc -
arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-
version-min=10.4 -fpascal-strings -prebind -
headerpad_max_install_names -Wl,-search_paths_first -Wl,-
single_module -o Tk 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
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 tkStubInit.o
tkStubLib.o tkMacOSXBitmap.o tkMacOSXButton.o
tkMacOSXClipboard.o tkMacOSXColor.o tkMacOSXConfig.o
tkMacOSXCursor.o tkMacOSXDebug.o tkMacOSXDialog.o
tkMacOSXDraw.o tkMacOSXEmbed.o tkMacOSXEntry.o
tkMacOSXEvent.o tkMacOSXFont.o tkMacOSXHLEvents.o tkMacOSXInit.o
tkMacOSXKeyboard.o tkMacOSXKeyEvent.o tkMacOSXMenu.o
tkMacOSXMenubutton.o tkMacOSXMenus.o tkMacOSXMouseEvent.o
tkMacOSXNotify.o tkMacOSXRegion.o tkMacOSXScrlbr.o
tkMacOSXSend.o tkMacOSXSubwindows.o tkMacOSXWindowEvent.o
tkMacOSXWm.o tkMacOSXXStubs.o tkMacOSXCarbonEvents.o
tkFileFilter.o tkMacWinMenu.o tkPointer.o tkUnix3d.o tkUnixScale.o
xcolors.o xdraw.o xgc.o ximage.o xutil.o -lpthread -framework
CoreFoundation -framework Carbon -framework IOKit -lpthread -
framework CoreFoundation -L/Users/vince/Desktop/Programming/
build/tcl/Deployment -ltclstub8.5 -compatibility_version 8.5 -
current_version 8.5 -install_name /Library/Frameworks/Tk.framework/
Versions/8.5/Tk -seg1addr 0xb000000 -unexported_symbols_list $
(f=libtclstub8.5.a.E && nm -gjp /Users/vince/Desktop/Programming/
build/tcl/Deployment/libtclstub8.5.a | grep ^_ > $f && echo $f)
ld: warning -prebind ignored because MACOSX_DEPLOYMENT_TARGET
environment variable greater or equal to 10.4
ld: warning -prebind ignored because MACOSX_DEPLOYMENT_TARGET
environment variable greater or equal to 10.4
ld: symbols names listed in -unexported_symbols_list: libtclstub8.5.a.E
not in linked objects
___i686.get_pc_thunk.bx
/usr/bin/libtool: internal link edit command failed
lipo: can't figure out the architecture type of: /var/tmp//ccyH5faC.out
gnumake[3]: *** [Tk] Error 1
gnumake[2]: *** [build-tk] Error 2
gnumake[1]: *** [tk] Error 2
gnumake: *** [deploy] Error 2
ld: warning -prebind ignored because
MACOSX_DEPLOYMENT_TARGET environment variable greater or equal
to 10.4
ld: warning -prebind ignored because
MACOSX_DEPLOYMENT_TARGET environment variable greater or equal
to 10.4
ld: symbols names listed in -unexported_symbols_list:
libtclstub8.5.a.E not in linked objects
/usr/bin/libtool: internal link edit command failed
Build failed (1 error, 2 warnings)
Logged In: YES
user_id=32170
A couple of other data points:
The debug intel build succeeds (and runs)
The release intel build fails
Logged In: NO
After cleaning all targets I can get the Intel release build to work, but still the
Universal Release Build fails with the reported error.
Logged In: YES
user_id=32170
Note: the above errors are when I use the graphical xcode environment and
click on the 'build' button. On the command line I get other problems, e.g.:
Installing demos to /Users/vince/Desktop/Programming/tk/macosx/../../
build/tk/Development//Library/Frameworks/Tk.framework/Versions/8.5/
Resources/Scripts/demos/
Installing demo images
ln: ././Wish.app: Operation not permitted
make[2]: *** [install-tk] Error 1
make[1]: *** [tk] Error 2
make: *** [develop] Error 2
Logged In: YES
user_id=90580
Vince,
you can ignore the warnings about -prebind, they don't hurt anything. We
still want prebinding when building on 10.3, that is why the flags are still
present.
your build error appears to be caused by the unexpected symbol
__i686.get_pc_thunk.bx
in libtclstub8.5.a
could you provide the output of
nm -gjp /Users/vince/Desktop/Programming/build/tcl/Deployment/
libtclstub8.5.a
likely, all that is needed is fixing the 'grep ^_' to also filter that symbol out
this whole nm trickery is no longer needed on 10.4 anyway, since the stub
symbols are now already correctly unexported via MODULE_SCOPE, but it is
still required to avoid linker warnings on 10.3.
I don't see an easy way to only run this on 10.3 however, so we should get it
working correctly on intel 10.4.
as far as differences between xcode and command line go, there should not
be any (as long as the env vars are the same as in xcode), the 'ln' error is
strange but is probably caused by failed xcode builds and should go away if
you remove your 'build' directory and rebuild. (otherwise, please attach the
output of 'ls -l' of the dir where the ln error occurs)
Logged In: NO
Here's the requested output:
vince-darleys-computer:~/Desktop/Programming/tcl vince$ nm -gjp /Users/
vince/Desktop/Programming/build/tcl/Deployment/libtclstub8.5.a
/Users/vince/Desktop/Programming/build/tcl/Deployment/libtclstub8.5.a
(tclStubLib.o):
_TclTomMathInitializeStubs
_Tcl_InitStubs
___i686.get_pc_thunk.bx
_tclIntPlatStubsPtr
_tclIntStubsPtr
_tclPlatStubsPtr
_tclStubsPtr
_tclTomMathStubsPtr
vince-darleys-computer:~/Desktop/Programming/tcl vince$
Indeed, the ln error does go away if I clean everything first.
Hope the above helps.
Vince.
Logged In: YES
user_id=90580
thanks, changing 'grep ^_' to 'grep ^_[^_]' should fix the error, will commit
the following to HEAD and core-8-4-branch, could you please verify that it
works?
Index: unix/configure.in
====================
RCS file: /cvsroot/tktoolkit/tk/unix/configure.in,v
retrieving revision 1.117
diff -u -p -r1.117 configure.in
--- unix/configure.in 16 Mar 2006 13:59:12 -0000 1.117
+++ unix/configure.in 21 Mar 2006 23:14:41 -0000
@@ -476,7 +476,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc'
if test "`uname -s`" = "Darwin" ; then
SC_ENABLE_FRAMEWORK
TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -
current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0,
"\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name $
{DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -
unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $
(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)'
+ TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name $
{DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -
unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $
(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)'
fi
if test "$FRAMEWORK_BUILD" = "1" ; then
Logged In: NO
That works now -- thanks!
Vince.
Logged In: YES
user_id=90580
committed