#67615 closed defect (duplicate)

tk fails to build for i386+x86_64: Undefined symbols for architecture i386: "_Tk_MainEx", "_Tk_SafeInit", "_Tk_Init"

Reported by: barracuda156 Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: tk

Description

:info:build ar cr libtkstub8.6.a tkStubLib.o ttkStubLib.o ; ranlib libtkstub8.6.a
:info:build /opt/local/bin/clang-mp-11 -c -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix/../unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix/../generic -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix/../bitmaps  -O2 -pipe -Os -arch i386 -pipe  -isystem/opt/local/include  -Wall -Wpointer-arith -fno-common -DBUILD_tk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.13/generic -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_tcl/tcl/work/tcl8.6.13/unix -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tk\ 8.6\" -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_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DMAC_OSX_TCL=1 -DHAVE_COREFOUNDATION=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".dylib\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DHAVE_AVAILABILITYMACROS_H=1 -DHAVE_WEAK_IMPORT=1 -D_DARWIN_C_SOURCE=1 -DHAVE_LIBXFT=1 -DHAVE_XFT=1 -DHAVE_XKBKEYCODETOKEYSYM=1 -DXKEYCODETOKEYSYM_IS_DEPRECATED=1 -DHAVE_XSS=1        -DUSE_TCL_STUBS -I. /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix/../generic/tkWindow.c
:info:build rm -f libtk8.6.dylib
:info:build /opt/local/bin/clang-mp-11 -dynamiclib -O2 -pipe -Os -arch i386 -pipe  -isystem/opt/local/include   -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13 -L/opt/local/lib -lfontconfig -arch i386 -headerpad_max_install_names -Wl,-search_paths_first  -Wl,-single_module -o libtk8.6.dylib tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkBusy.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 tkImgPNG.o tkImgPPM.o tkImgPhoto.o tkImgPhInstance.o tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o tkTextMark.o tkTextTag.o tkTextWind.o tkStubInit.o ttkBlink.o ttkButton.o ttkCache.o ttkClamTheme.o ttkClassicTheme.o ttkDefaultTheme.o ttkElements.o ttkEntry.o ttkFrame.o ttkImage.o ttkInit.o ttkLabel.o ttkLayout.o ttkManager.o ttkNotebook.o ttkPanedwindow.o ttkProgress.o ttkScale.o ttkScrollbar.o ttkScroll.o ttkSeparator.o ttkSquare.o ttkState.o ttkTagSet.o ttkTheme.o ttkTrace.o ttkTrack.o ttkTreeview.o ttkWidget.o ttkStubInit.o tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o  tkUnixRFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o   -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13 -L/opt/local/lib -lfontconfig -arch i386 -headerpad_max_install_names -Wl,-search_paths_first  -lpthread -framework CoreFoundation -L/opt/local/lib -lXft -lfontconfig -lfreetype -lfontconfig -lX11 -Wl,-weak-lXss -lXext  -lz  -lpthread -framework CoreFoundation  -L/opt/local/lib -ltclstub8.6  -compatibility_version 8.6 -current_version 8.6.13 -install_name "/opt/local/lib/libtk8.6.dylib" -unexported_symbols_list $(f=libtk8.6.dylib.E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[0-9a-f]+ . \.objc/ {print \$3}" > $f && nm -gjp "/opt/local/lib"/libtclstub8.6.a | grep ^_[^_] >> $f && echo $f) -sectcreate __TEXT __info_plist Tk-Info.plist 
:info:build /opt/local/bin/clang-mp-11 -O2 -pipe -Os -arch i386 -pipe  -isystem/opt/local/include   -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13 -L/opt/local/lib -lfontconfig -arch i386 -headerpad_max_install_names -Wl,-search_paths_first  tkAppInit.o -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix -ltk8.6 \
:info:build 		-L/opt/local/lib -ltcl8.6  -lpthread -framework CoreFoundation -L/opt/local/lib -lXft -lfontconfig -lfreetype -lfontconfig -lX11 -Wl,-weak-lXss -lXext  -lz  -lpthread -framework CoreFoundation  -sectcreate __TEXT __info_plist Wish-Info.plist -sectcreate __TEXT __credits_html Credits.html  -o wish
:info:build ld: warning: ignoring file /opt/local/lib/libtk8.6.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
:info:build Undefined symbols for architecture i386:
:info:build   "_Tk_MainEx", referenced from:
:info:build       _main in tkAppInit.o
:info:build   "_Tk_SafeInit", referenced from:
:info:build       _Tcl_AppInit in tkAppInit.o
:info:build   "_Tk_Init", referenced from:
:info:build       _Tcl_AppInit in tkAppInit.o
:info:build       _Tcl_AppInit in tkAppInit.o
:info:build ld: symbol(s) not found for architecture i386
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make: *** [wish] Error 1

Attachments (1)

tk_log.txt (584.5 KB) - added by barracuda156 18 months ago.

Download all attachments as: .zip

Change History (3)

Changed 18 months ago by barracuda156

Attachment: tk_log.txt added

comment:1 Changed 18 months ago by jmroot (Joshua Root)

Keywords: snowleopard removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

The link command does contain the correct flag to find the dylib that was just built: -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_tk/tk/work/tk8.6.13-i386/unix. But it comes after -L/opt/local/lib, so an already installed version is found first if it exists.

comment:2 Changed 18 months ago by jmroot (Joshua Root)

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.