Latest MacPorts updates broke Staden compile

John Nash
2012-11-26
2013-04-18
  • John Nash
    John Nash
    2012-11-26

    Hi folk,

    I was installing Staden (from svn) on a brand new Mac (OS X, Mountain Lion) , and it crapped out with an error, so I went back to a tried and tested Mac (OS X, Lion) - where Staden has compiled successfully many times, to check things out.  Using a non-updated macports, everything compiles fine but as soon as I updated macports (sudo upgrade outdated), I was able to replicate the error which happened on the new box. So an updated macports package is breaking the ability to compile staden on a new Mac.  I'll bet you coffee that it's tcl or tk.

    Here is the error message starting from the last call to 'gcc':

    gcc -dynamiclib -g -O2   -I/opt/local//include -I/opt/local//include  -DUSE_NON_CONST  -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../tk_utils -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../Misc -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../tk_utils -I/usr/local/staden_src-2012-11-26/include -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/unix" -I""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/xlib"" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/macosx" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.5.13/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.5.13/unix" -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../seq_utils  -I/opt/local//include -I/Users/admin/staden_install/staden.trunk/src/install.macosx  -DSVN_VERSION="3101M" -fno-common   -Wl,-single_module -current_version 2.0.0 -compatibility_version 2.0.0 -g -O2   -I/opt/local//include -I/opt/local//include  -DUSE_NON_CONST  -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../tk_utils -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../Misc -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../tk_utils -I/usr/local/staden_src-2012-11-26/include -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/unix" -I""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/xlib"" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/work/tk8.5.13/macosx" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.5.13/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_tcl/tcl/work/tcl8.5.13/unix" -I/Users/admin/staden_install/staden.trunk/src/install.macosx/../seq_utils  -I/opt/local//include -I/Users/admin/staden_install/staden.trunk/src/install.macosx  -DSVN_VERSION="3101M" -fno-common  -L/Users/admin/staden_install/staden.trunk/src/install.macosx/lib  -L/opt/local//lib -prebind -headerpad_max_install_names -Wl,-search_paths_first   -o /Users/admin/staden_install/staden.trunk/src/install.macosx/lib/libtk_utils.dylib  cli_arg.o tclXkeylist.o tclXutil.o tcl_utils.o tcl_debug.o misc.o init.o text_output.o tkRaster.o tkRasterBuiltIn.o sheet.o tkSheet.o tkSheet_common.o trace_print.o postscript.o split.o tkTrace.o tkTraceComp.o tkTraceIO.o tkTraceDisp.o capture.o canvas_box.o ruler_tick.o restriction_enzyme_map.o element_canvas.o container.o container_ruler.o tcl_io_lib.o  -L/usr/local/staden_src-2012-11-26/lib -lstaden-read    -lcurl -lz -L/opt/local/lib -ltk8.5 -L/opt/local/lib -ltcl8.5    -framework CoreFoundation -framework Cocoa -framework Carbon -framework IOKit   -framework CoreFoundation   -lmisc  -L/opt/local//lib -lpng -lz 
    Undefined symbols for architecture x86_64:
      "_XDrawRectangles", referenced from:
          _RasterDrawRectangles in tkRaster.o
      "_XSetClipRectangles", referenced from:
          _DisplayRaster in tkRaster.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make[1]: *** [/Users/admin/staden_install/staden.trunk/src/install.macosx/lib/libtk_utils.dylib] Error 1
    make: *** [tk_utils] Error 2
    
     
  • John Nash
    John Nash
    2012-11-26

    typo… I upgraded macports with 'sudo port upgrade outdated' (above).

     
  • John Nash
    John Nash
    2012-11-26

    As usual, I try to find a fix to bugs that I report, and I am glad to report a fix.

    I was correct in that both tcl and tk version 8.5.13 appear to break the compilation of the Staden package under OS X / macports.

    If you follow the instructions in http://trac.macports.org/wiki/howto/InstallingOlderPort, and install both tcl and tk version 8.5.12 (don't forget to uninstall the newer tcl and tk v 8.5.13 before doing this), the Staden package will compile and run fine.

    However, any time you upgrade macports, tcl and tk will upgrade and break (e.g.) gap5.

    HTH
    John