Getting tcl via macports to compile on Leopard

With a fresh install of MacPorts version 1.6.0 on Mac OS X 10.5.2 Leopard, then issuing the command:

 sudo port install tcl

returned:

 /usr/local/include/mach-o/arch.h:35: error: nested redefinition of 'enum NXByteOrder'
/usr/local/include/mach-o/arch.h:35: error: redeclaration of 'enum NXByteOrder'
/usr/local/include/mach-o/arch.h:36: error: redeclaration of enumerator 'NX_UnknownByteOrder'
/usr/include/architecture/byte_order.h:137: error: previous definition of 'NX_UnknownByteOrder' was here
/usr/local/include/mach-o/arch.h:37: error: redeclaration of enumerator 'NX_LittleEndian'
/usr/include/architecture/byte_order.h:138: error: previous definition of 'NX_LittleEndian' was here
/usr/local/include/mach-o/arch.h:39: error: redeclaration of enumerator 'NX_BigEndian'
/usr/include/architecture/byte_order.h:140: error: previous definition of 'NX_BigEndian' was here
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpFindSymbol':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:382: warning: 'NSLookupSymbolInImage' is deprecated (declared at /usr/include/mach-o/dyld.h:182)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:415: warning: 'NSLinkEditError' is deprecated (declared at /usr/include/mach-o/dyld.h:217)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:419: warning: 'NSLookupSymbolInModule' is deprecated (declared at /usr/include/mach-o/dyld.h:181)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:428: warning: 'NSAddressOfSymbol' is deprecated (declared at /usr/include/mach-o/dyld.h:188)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpUnloadFile':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:493: warning: 'NSUnLinkModule' is deprecated (declared at /usr/include/mach-o/dyld.h:169)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c: In function 'TclpLoadMemory':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:697: warning: 'NSCreateObjectFileImageFromMemory' is deprecated (declared at /usr/include/mach-o/dyld.h:146)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:730: warning: 'NSLinkModule' is deprecated (declared at /usr/include/mach-o/dyld.h:161)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:732: warning: 'NSDestroyObjectFileImage' is deprecated (declared at /usr/include/mach-o/dyld.h:147)
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.1/unix/../unix/tclLoadDyld.c:740: warning: 'NSLinkEditError' is deprecated (declared at /usr/include/mach-o/dyld.h:217)
make: *** [tclLoadDyld.o] Error 1

I searched the web and found suggestions to deactivate odcctools, but the problem in my case is that odcctools wasn’t even installed. So, instead what I did was temporarily move the arch.h file, rerun the install command, and it worked fine!

sudo mv /usr/local/include/mach-o/arch.h /usr/local/include/mach-o/arch.h.RENAMED

3 thoughts on “Getting tcl via macports to compile on Leopard

  1. Also had the problem when installing Mercurial (which depends on tcl). Rename-install-“unrename” worked fine, hope it does not affect xcode 🙂

    Thank you very much for sharing!

    Chester

Leave a Reply

Your email address will not be published. Required fields are marked *