Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Installing in Mac

2011-03-31
2013-04-18
1 2 > >> (Page 1 of 2)
  • Hi,

    Firstly, I'd like to tell you that I'm new in the "mac-world". I used this program in windows and I'd like to use it in my new MacBook Pro as well.

    I've been reading some post but I don't understand anything about libraries and other things you speak there.

    I've tried to install it under windows XP using parallels but the Trev program does not fully work, I can see individual chromatograms but not more than one at the same time from the contig editor. The GAP5 does not work either.

    So, my question is: Could you give like a step-by-step tutorial to instal the mac version of the package?

    Thanks for your help,

    Alfonso Saera-Vila
    PhD
    Department of Molecular, Cellular and Developmental Biology
    University of Michigan
    alfonsosaera at gmail dot com

     
  • John Nash
    John Nash
    2011-04-04

    I have not had much luck installing the package on my either my Macbook Pro or Macbook Air under X11. In my case, it won't compile, and I have followed all of the instructions and tips that I could find here.  Maybe I should delete and re-install macports but there is a less complicated solution. 

    I used VirtualBox (Parallels should also work) to install Ubuntu and then just installed the Linux version on that. It works fine, and you can share data with OS X.

    But that leads to another question:  Do most non-Linux computers really have the internal heft to run some of the Staden apps properly? 

    After assembling with Mira, I usually "top and tail" my genome assembly and follow up on Mira's tags with gap4, then view the coverage, etc. with gap5, before returning to fix naughty bases with gap4.  (Gap5 doesn't allow edits in my hands, and gap4 cannot view large assemblies wrt viewing coverage).  The conversion process is pretty painless.

    However, gap2caf and tg_index crash if I attempt to run either on my desktop Linux box with 12 GB RAM, and that is just for a 454-generated bacterial genome with 700K reads.   I had to transfer the work to our server with 32 GB RAM to get it to work.  (The previous statements are not a complaint - I accept that we need heft to do these things).

    John

     
  • James Bonfield
    James Bonfield
    2011-04-05

    Gap5 ought to allow editing, although it's far less feature rich than Gap4.

    For the errors you see during compilation, can you post some more specific details please. As far as I'm aware it should compile cleanly now under MacOS X, although it may perhaps depend on which version of X11 you have as there are at least 3 variants kicking around it seems, which is the primary reason I've been unable to release binaries that work on all Mac platforms short of bundling X11 itself with it.

    tg_index ought to have a lower memory usage in more recent releases, although it may differ slightly per file format. Certainly 700k reads isn't much for a modern machine. I built a database with 1 billion reads using ~10Gb of RAM f I recall.  The various CAF tools I could believe being memory hungry though as they typically slurp the entire CAF into memory. (Note this isn't true for the tg_index CAF support.)  If you're running out of memory usign tg_index then perhaps we have a memory leak with one of the file format handling cases. Which data type were you importing and using which options? If available, an example data set would help too.

     
  • However, gap2caf and tg_index crash if I attempt to run either on my desktop Linux box with 12 GB RAM, and that is just for a 454-generated bacterial genome with 700K reads.

    tg_index might use a lot of memory when trying to pair reads in a data set where there are few or no pairs.  If there are no paired reads, try running tg_index with the -P option to turn off pairing.  Alternatively you can use -q to limit the amount of memory used in pairing (a value of  1000000 seems to strike a good balance between speed and memory use).

    Andrew

     
  • John Nash
    John Nash
    2011-04-05

    Let me re-create the compile errors with my mac, log them and I'll email them to you in the next few days. I have a standard Macbook Air with 4 Gb RAM, Xcode and macports, and not much else installed wrt toolkits. I'd prefer to clean up macports first because I did get frustrated and downloaded/compliled a bunch of Tcl, Tk, iTk, iTcl and iwidgets sources to try and fix it. I'll start clean and retrace my steps.  OTOH, It was no biggie to run a VirtualBox and I like Ubuntu.

    Similarly with the tg_index crash - I'll move the stuff back to the 'small Unix box', try the switches, see what happens and report back.

     
  • andrei
    andrei
    2011-04-07

    Hello,
    I am trying to install staden on mac osx 10.6. I have successfully installed everything with macports, and have configured with the appropriate options. But when I $sudo make I get this error:

    tkTrace.c: In function ‘drawable_to_png’:
    tkTrace.c:2126: error: dereferencing pointer to incomplete type
    tkTrace.c:2131: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
    tkTrace.c:2131: error: (Each undeclared identifier is reported only once
    tkTrace.c:2131: error: for each function it appears in.)
    make: ***  Error 1
    make: ***  Error 2

    Is there a way to fix this? I have tried with 2.0.0b7 and b8. Same thing happened with both…

     
  • John Nash
    John Nash
    2011-04-07

    This is exactly the error I get which I mentioned in the post two up from this one.  As promised, I completely uninstalled macports, reinstalled it from scratch, made sure that all the appropriate libraries were installed, and the above message is identical to mine. I get this from b8's source and from the latest pulled from svn.

    John

     
  • James Bonfield
    James Bonfield
    2011-04-11

    This implies that zlib.h is incorrect somehow. The Z_BEST_COMPRESSION is defined in zlib.h to be 9 (although frankly it seems overkill and you could just fix the code by replacing Z_BEST_COMPRESSION with 6 in tkTrace.c and get more than adequate behavior, especially given this code is almost unused now).

    zlib.h is in turn included from png.h, which is included by tkTrace.c. I cannot see why you would not get that on a Mac unless there's some bizarre version conflicts. I haven't seen this myself, even on macosx.

    Were there any warnings about png or zlib when you ran the configure script?

     
  • John Nash
    John Nash
    2011-04-12

    Some progress on the Mac front. 

    No errors on the png or zlib front from configure.

    Doing either of 2 things fixes the tkTrace.c problem. Either use -with-png=/opt/local, or in tkTrace.c, change Z_BEST_DECOMPRESSION to 6, and comment out line 2136/2137.  Doing either stops that error. I prefer to use -with-png=/opt/local.

    However, then comes:

    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

    For the record, my ./configure line is; ../configure -prefix=/usr/molbin/staden -with-tcl=/opt/local/lib -with-tk=/opt/local/lib -with-tklib=/usr/local/lib/tklib0.5/ -with-png=/opt/local/ -with-lzma=/usr/local/xz-5.0.0-macosx/

    Unfortunately ld errors are beyond my capabilities.

    John

     
  • Well, I was able to compile on MacOS X 10.6 via

    ../configure -with-tcl=/opt/local/lib/ -with-tk=/opt/local/lib/ -with-tklib=/usr/local/lib/tklib0.5 -with-iwidgets=/opt/local/lib/iwidgets -with-itcl=/opt/local/lib/itcl3.4 -with-itk=/opt/local/lib/itk3.3

    make

    make install

    Unfortunately none of the programs starts up!? I get the very same error message described here: http://sourceforge.net/projects/staden/forums/forum/347718/topic/3763809

    Any ideas?

    Greetings from Munich, Felix

     
  • flxms
    flxms
    2011-04-12

    Just for reference the result of my configure command..


    External packages used:
    curl:      via /usr/bin/curl-config
    zlib:      DIR (system)
    curses:    DIR (system)
    liblzma:   ***NOT FOUND***
    io_lib:    via /usr/local/bin/io_lib-config
    Tcl:       via /opt/local/lib/tclConfig.sh
    Tk:        via /opt/local/lib/tkConfig.sh
    tklib:     /usr/local/lib/tklib0.5
    Iwidgets:  /opt/local/lib/iwidgets/iwidgets
    Itcl:      /opt/local/lib/itcl3.4
    Itk:       /opt/local/lib/itk3.3


     
  • flxms
    flxms
    2011-04-12

    These are the Warnings during configure…

    configure: WARNING: "No functioning lzma found"
    configure: WARNING: No liblzma detected. Gap5 may be able to read some database. To fix this please install liblzma and rerun configure using the -with-lzma=DIR option.
    checking for png_create_write_struct in -lpng… no
    configure: WARNING: "No functioning png found"
    configure: WARNING: No PNG library found. Gap4's Report Mutatations functionality will be absent.

     
  • James Bonfield
    James Bonfield
    2011-04-13

    I'm guessing the lack of a functioning PNG library isn't as benign as I expected. Sorry about that.

    I still don't understand though why you'd need to use /opt/local copy of png instead. What on earth did Apple do to png? It's a pretty standard library that isn't rapidly (if at all) changing. Anyway good to know it can be made to work by using (I assume) a MacPorts version instead.

    You shouldn't need iwidgets any more to build, although it won't harm. It's basically only now used in the old gap4 "prefinish" GUI.

    A segmentation fault at start up could be anything, but generally it's a cause of some bad library conflict. The only time I saw it before was if I somehow got a mix of Aqua and X11 tk builds (eg Aqua tcl + X11 tk or vice versa). Having /opt/local for both as listed above *should* work though.

    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.

    James

    PS. I wish I could just ship Mac binaries, but that too has proved impossible due to insane version numbering of Apple vs MacPort vs Xquartz X11 libraries causing random conflicts. I guess if I bundled all the X libraries in the binary release I could avoid this, but it'd add significant bloat. If anyone has experience and suggestions on shipping binaries linked against X11 please do offer advice.

     
  • flxms
    flxms
    2011-04-13

    Thanks for the reply!

    I added libpng from MacPorts as you suggested and recompiled:

    ../configure -with-tcl=/opt/local/lib/ -with-tk=/opt/local/lib/ -with-tklib=/usr/local/lib/tklib0.5 -with-iwidgets=/opt/local/lib/iwidgets -with-itcl=/opt/local/lib/itcl3.4 -with-itk=/opt/local/lib/itk3.3 -with-png=/opt/local

    So there was no warning for libpng any more.

    I kept on with make and make install as usual.

    Trying to start gap 4 the machine says "tclsh wurde unerwartet beendet" meaning "tclsh was terminated unexpextedly"
    The head of the detailed output is…

    Process:         tclsh8.5
    Path:            /usr/bin/tclsh
    Identifier:      tclsh8.5
    Version:         ??? (???)
    Code Type:       X86-64 (Native)
    Parent Process:  bash

    Date/Time:       2011-04-13 13:00:51.082 +0200
    OS Version:      Mac OS X 10.6.7 (10J3250)
    Report Version:  6

    Interval Since Last Report:          821245 sec
    Crashes Since Last Report:           11
    Per-App Crashes Since Last Report:   7
    Anonymous UUID:                      D32D73F6-0B91-4C3B-B452-39A773710A9E

    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread

    Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
    0   ???                           000000000000000000 0 + 0
    1   libtk_utils.dylib             0x00000001007329e8 TclX_KeyedListInit + 24 (tclXkeylist.c:1211)
    2   libtk_utils.dylib             0x0000000100734d53 Tk_utils_Init + 83 (init.c:50)
    3   Tcl                           0x0000000100072435 Tcl_StaticPackage + 2373
    4   Tcl                           0x0000000100016549 Tcl_CreateInterp + 4820
    5   Tcl                           0x0000000100017199 Tcl_CreateInterp + 7972
    6   Tcl                           0x000000010006d106 Tcl_FSEvalFileEx + 472
    7   Tcl                           0x0000000100072e0b Tcl_Main + 828
    8   tclsh                         0x00000001000019d0 0x100000000 + 6608
    9   tclsh                         0x0000000100001978 0x100000000 + 6520

    Thread 1:  Dispatch queue: com.apple.libdispatch-manager
    0   libSystem.B.dylib             0x00007fff8445012a kevent + 10
    1   libSystem.B.dylib             0x00007fff84451ffd _dispatch_mgr_invoke + 154
    2   libSystem.B.dylib             0x00007fff84451cd4 _dispatch_queue_invoke + 185
    3   libSystem.B.dylib             0x00007fff844517fe _dispatch_worker_thread2 + 252
    4   libSystem.B.dylib             0x00007fff84451128 _pthread_wqthread + 353
    5   libSystem.B.dylib             0x00007fff84450fc5 start_wqthread + 13

    Thread 2:
    0   libSystem.B.dylib             0x00007fff84450f4a __workq_kernreturn + 10
    1   libSystem.B.dylib             0x00007fff8445135c _pthread_wqthread + 917
    2   libSystem.B.dylib             0x00007fff84450fc5 start_wqthread + 13

    Thread 3:
    0   libSystem.B.dylib             0x00007fff8447ae52 select$DARWIN_EXTSN + 10
    1   Tcl                           0x00000001000abd76 Tcl_InitNotifier + 1520
    2   libSystem.B.dylib             0x00007fff844704f6 _pthread_start + 331
    3   libSystem.B.dylib             0x00007fff844703a9 thread_start + 13

    Thread 0 crashed with X86 Thread State (64-bit):
      rax: 0x0000000100215180  rbx: 0x000000010075e780  rcx: 0x000000010092f660  rdx: 0x00007fff5fbfe48c
      rdi: 0x00000001144727c0  rsi: 0x0000000100756209  rbp: 0x00007fff5fbfe4a0  rsp: 0x00007fff5fbfe478
       r8: 0x000000010092f630   r9: 0x000000010092f690  r10: 0x000000000000001a  r11: 0x0000000000000001
      r12: 0x0000000100858e10  r13: 0x00007fff707b05c0  r14: 0x0000000100955890  r15: 0x00007fff5fbfeea0
      rip: 0x0000000000000000  rfl: 0x0000000000010202  cr2: 0x0000000000000000

    Are we getting closer to the problem?
    Greetings from Munich, Felix

     
  • flxms
    flxms
    2011-04-13

    PS: the command line output calling gap4 is still "Segmentation fault". The above messages appear in a pop-up-window.

     
  • flxms
    flxms
    2011-04-13

    @ John

    The only thing causing a WARNING in configure here is lzma

    So I'd be interested in your -with-lzma=/usr/local/xz-5.0.0-macosx/. I can't find this folder on my system. Configure does not find the MacPorts version of lzma I installed despite linking to it by -with (?!, it is as everyting else in /opt/usr/lib/). What did you do?

    Regards, Felix

     
  • John Nash
    John Nash
    2011-04-13

    James said:

    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.

    John replied:

    I don't try to compile the b8 version on my Mac because you said that you had fixed some Mac problems in the svn version. I'll try both, and report back.  I'll wipe clean and re-untar after trying different things.  I may also contaminate my personal Mac with bioinformatics and see what happens (but I will have to add a gazillion libraries and install macports).  I've got to drive to the boonies today (the lab is where the zoonoses are), so it may take a day before I report back.

    I'm happy to play sleuth as much as you need.

    John

     
  • James Bonfield
    James Bonfield
    2011-04-13

    ../configure -with-tcl=/opt/local/lib/ -with-tk=/opt/local/lib/ -with-tklib=/usr/local/lib/tklib0.5 -with-iwidgets=/opt/local/lib/iwidgets -with-itcl=/opt/local/lib/itcl3.4 -with-itk=/opt/local/lib/itk3.3 -with-png=/opt/local

    Process: tclsh8.5 
    Path: /usr/bin/tclsh

    So I can see the problem, if not the cause.

    You're linking against a version of Tcl/Tk in /opt/local, but the tclsh binary being found is in /usr/bin/tclsh. These won't be compatible and give crashes as you've seen. Most likely when I did my own testing I had /opt/local/bin on my PATH before /usr/bin.

    Can you try editing the gap5 wrapper script (it's just a shell script). It ends with a line:

    exec tclsh "$STADTCL/gap5/gap5.tcl" ${@+"$@"}
    

    If this was changed to (at a guess):

    exec /opt/local/bin/tclsh "$STADTCL/gap5/gap5.tcl" ${@+"$@"}
    

    then I expect it'll start working… or get to the next interesting failure. :-)

    So if this works then the next issue is how to generate a wrapper script that works properly. I'm thinking it's maybe just something I can use autoconf to do so when you run configure it puts the correct tclsh binary in the wrapper script and then works.

     
  • James Bonfield
    James Bonfield
    2011-04-13

    Adendum to above. The wrapper script will be wherever you installed it. Eg /some/path/to/staden/bin/gap5.

     
  • John Nash
    John Nash
    2011-04-13

    @ Felix…

    I found my xz online at http://tukaani.org/xz/

    Best
    John

     
  • John Nash
    John Nash
    2011-04-13

    IT WORKED.  I managed to configure, make, install and run the b8-src version on my MacBook Air.  I had to explicitly NOT configure lzma for it to run w/o error.

    My configure line was: ./configure -prefix=/usr/molbin/staden -with-tcl=/opt/local/lib -with-tk=/opt/local/lib -with-tklib=/usr/local/lib/tklib0.5/ -with-png=/opt/local/ -disable-rpath

    io_lib is in /usr/local/lib so I don't need to point to it.

    gap5 works. No search tag errors, it can delete bases (this crashed gap5 on my SUSE computer and one of the Ubuntu ones), and it's so nice to have a template display not via an internet connection from a server!

    The only thing not working (that I use), is tg_index.  It doesn't process the -o output_db_name parameter and its output wont open in gap5.  I'll do my conversions on the Unix boxes. I just want to edit on my Mac while I am on the road w/o an Internet connection..

    THANK YOU James, Andrew and others for your putting up with my stubbornness in getting it to work. Now to try to compile the svn version (which I have to figure out what to do to get actf.c to link).

    John

     
  • andrei
    andrei
    2011-04-13

    So, I replaced Z_BEST_COMPRESSION with 6, but I still get this error at make :

    tkTrace.c: In function drawable_to_png:
    tkTrace.c:2126: error: dereferencing pointer to incomplete type
    make[1]: *** [tkTrace.o] Error 1
    make: *** [tk_utils] Error 2
    

    When I do configure I don't get any error. This is the outcome of configure :

    $ ./configure --with-tcl=/opt/local/lib --with-tk=/opt/local/lib --with-tklib=/usr/local/lib/tklib0.5/ --with-itk=/opt/local/lib --with-itcl=/opt/local/lib --with-iwidgets=/opt/local/lib
    ----------------------------------------------------------------------
    External packages used:
    curl:      via /usr/bin/curl-config
    zlib:      DIR (system)
    curses:    DIR (system)
    liblzma:   DIR 
    io_lib:    via /usr/local/bin/io_lib-config
    Tcl:       via /opt/local/lib/tclConfig.sh
    Tk:        via /opt/local/lib/tkConfig.sh
    tklib:     /usr/local/lib/tklib0.5/
    Iwidgets:  /opt/local/lib/iwidgets
    Itcl:      /opt/local/lib/itcl3.4
    Itk:       /opt/local/lib/itk3.3
    ----------------------------------------------------------------------
    
     
  • John Nash
    John Nash
    2011-04-13

    @andreitudor:

    To fix the above, I had to install macport's png tools, and explicitly point to them.  Or comment out line 2126 (and either the line before or after it, can't remember).

    John

     
  • flxms
    flxms
    2011-04-13

    John!

    Just got back from the evening shift in the clinics and tried out exactly what you suggested above. Well, you were so deadly right in your analysis! THANX A LOT! Everything seems to work just fine out of the box now - after changing just the last little but crucial line in the wrapper file as proposed above.
    As I am a little bit tired now, I did not test the functionality of gap in detail. But all menues work fine. I am quite confident, that everything will be ok. I'll report tomorrow.

    This is a really cool end of the day. Thank you again, John! I'll get some sleep now.
    Read you tomorrow…

     
  • James Bonfield
    James Bonfield
    2011-04-14

    Sorry it's all been so messy for you. I'll try and figure out a better way to auto-detect broken packages (ie the Apple ones) before the next release so that at least it'll give an appropriate complaint at configure time rather than some arbitrary time later.

    I'm still baffled though as to why you need a MacPorts build of some of the standard tools when they're already installed natively. I'm starting to see why MacPorts exists though now!

    James

     
1 2 > >> (Page 1 of 2)