Installing in Mac

2011-03-31
2013-04-18
<< < 1 2 (Page 2 of 2)
  • John Nash
    John Nash
    2011-04-18

    I get the following error when trying to make using the src from the latest svn…

    cd tgap && make -f /Users/johnnash2/Desktop/trunk/src/./tgap/Makefile   BUILD=/Users/johnnash2/Desktop/trunk/src SRC=/Users/johnnash2/Desktop/trunk/src/./tgap SUBDIR=tgap all
    gcc -dynamiclib -g -O2   -I/opt/local//include -I/opt/local//include  -DUSE_NON_CONST  -I/Users/johnnash2/Desktop/trunk/src/./tgap -I/Users/johnnash2/Desktop/trunk/src/./Misc -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.9/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.9/unix" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.9/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.9/unix" -I/Users/johnnash2/Desktop/trunk/src/./tk_utils -I/Users/johnnash2/Desktop/trunk/src/./seq_utils -I/usr/local/include  -I/opt/local//include -I/Users/johnnash2/Desktop/trunk/src  -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/johnnash2/Desktop/trunk/src/./tgap -I/Users/johnnash2/Desktop/trunk/src/./Misc -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.9/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_tk/work/tk8.5.9/unix" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.9/generic" -I"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_tcl/work/tcl8.5.9/unix" -I/Users/johnnash2/Desktop/trunk/src/./tk_utils -I/Users/johnnash2/Desktop/trunk/src/./seq_utils -I/usr/local/include  -I/opt/local//include -I/Users/johnnash2/Desktop/trunk/src  -fno-common -L/Users/johnnash2/Desktop/trunk/src/lib  -L/opt/local//lib -prebind -headerpad_max_install_names -Wl,-search_paths_first   -o /Users/johnnash2/Desktop/trunk/src/lib/libtgap.dylib  -L/Users/johnnash2/Desktop/trunk/src/lib tg_iface_g.o b+tree2.o hache_table.o tg_gio.o tg_cache.o tg_contig.o tg_sequence.o tg_track.o tg_bin.o tg_utils.o tg_register.o tg_tracks.o tg_anno.o tg_library.o zfio.o gap_cli_arg.o tg_tcl.o g-files.o g-db.o g-struct.o g-error.o g-alloc.o g-io.o g-connect.o g-request.o  -lseq_utils  -lz -L/opt/local//lib -llzma  -ltk_utils  -L/opt/local/lib -ltk8.5 -L/opt/local/lib -ltcl8.5 -lX11 -Wl,-weak-lXss -lXext   -framework CoreFoundation    -L/usr/local/lib -lstaden-read    -lcurl -lz  -lmisc 
    Undefined symbols for architecture x86_64:
      "_actf_unlock", referenced from:
          _gio_close in tg_gio.o
      "_actf_lock", referenced from:
          _gio_open in tg_gio.o
    ld: symbol(s) not found for architecture x86_64
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: ***  Error 2

    James suggested:

    Finally John's issue with actf_lock: is this a build from SVN sources or from the 2.0.0b8 tarball? The latter I didn't think ever called those functions even. More recently though I copied over the BUSY file mechanism from Gap4, which uses actf_lock/unlock. They're in actf.c which ought to be linked against in your gap5/Makefile. If not add actf.o to the list of objects for the GAP5= definition. I'm not entirely sure what's going on there though as I've never seen that when compiling myself.

    actf.o is already there.  Is there a clash between a 32-bit and 64-bit library?

    John

     
  • John Nash
    John Nash
    2011-04-18

    D'oh.  Is this an Xcode 3 vs. Xcode 4 issue? (I use the latter).

     
  • John Nash
    John Nash
    2011-04-18

    Score 1/2.  Rolling back to XCode 3 removes "Undefined symbols for architecture x86_64:" and "ld: symbol(s) not found for architecture x86_64"

    The other one is still there:

    Undefined symbols:
      "_actf_unlock", referenced from:
          _gio_close in tg_gio.o
      "_actf_lock", referenced from:
          _gio_open in tg_gio.o
          _gio_open in tg_gio.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: ***  Error 2

     
  • James Bonfield
    James Bonfield
    2011-04-19

    It should have nothing to do with XCode 3 vs XCode 4, at least I think not.

    The functions _actf_unlock and _actf_lock  are found in gap5/actf.c. However that's now made the issue finally dawn on me. They're called from (amongst other places) tgap/tg_gio.c.  So that means when linking the libtgap.so library you have unresolved symbols, which are only resolved when an application then loads in both libtgap.so and libgap5.so.

    On unix this works just fine. However MacOS X has a very different linker philosophy where unresolved symbols cannot be delayed until later libraries and are just hard errors. Anyway it was pure oversight/mistake to put this file in gap5 directory instead of tgap directory. Sorry about that.

    I've checked in some modifications to the svn to correct this.  As a bonus(!) you'll also get the new super-fast (and wonderfully minimal tested)  version of Find Internal Joins and Find Repeats :-).  Let me know if you find any issues please.

    James

     
  • John Nash
    John Nash
    2011-04-19

    One word: Perfect!

    Ok, two words: THANKS!

    It compiled and ran without a hitch.  For the record, my configure command:

    ./configure -prefix=/usr/molbin/staden_src -with-tcl=/opt/local/lib -with-tk=/opt/local/lib -with-tklib=/usr/local/lib/tklib0.5/ -with-png=/opt/local/ -disable-rpath -with-lzma=/opt/local/ -with-itcl=/opt/local/lib/itcl3.4/ -with-itk=/opt/local/lib/itk3.3/ -with-iwidgets=/opt/local/lib/iwidgets/

    You rock!
    John

     
<< < 1 2 (Page 2 of 2)