Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Problem compiling tracediff

2011-12-03
2013-04-18
  • jdmontenegroc
    jdmontenegroc
    2011-12-03

    Hi all,
    I have recently upgraded to ubuntu 11.10.  I tried to compile staden.trunk from source, but I get the following error and cannot finish the installation neither in staden.trunk nor in staden-2.0.0b8.

    I had managed to compile staden on ubuntu 11.04, Cannot understand what seems to be the problem.  Here is the log:

    /usr/bin/ld: warning: libtk_utils.so, needed by /home/juan/Bioinf/staden-2.0.0b8-src/build.myhost/lib/libmutlib.so, not found (try using -rpath or -rpath-link)
    /home/juan/Bioinf/staden-2.0.0b8-src/build.myhost/lib/libmutlib.so: undefined reference to `verror'
    /home/juan/Bioinf/staden-2.0.0b8-src/build.myhost/lib/libseq_utils.so: undefined reference to `vmessage'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/home/juan/Bioinf/staden-2.0.0b8-src/build.myhost/tracediff'
    make: ***  Error 2

    I appreciate any help.

    Regards,

    Juan Montenegro

     
  • Were there any earlier warnings when building tk_utils?  It could be some kind of tcl/tk version problem. 

     
  • James Bonfield
    James Bonfield
    2011-12-05

    We just punted 2.0.0b9 out of the door, so give that a whirl first to see if it fixes your problems.

    I have vague recollection of some systems requiring LD_LIBRARY_PATH to be set during linking too due to different linker setups, but I can't recall what systems or if we solved it via another route now.

    If you still have issues with the 2.0.0b9 source tree then I see there are comments in the system.mk.in file about use of -rpath-link and an alternative definition of CLDFLAGS variable to use it.  Try editing your system.mk (or system.mk.in and rerunning configure) to uncomment the rpath-link code. If that cures the problem please let us know so we can test further and come up with a more permanent solution.

    James

     
  • jdmontenegroc
    jdmontenegroc
    2011-12-08

    Hi James,

    Sorry for taking so long to answer.  I have been away for work with no access to internet.  I downloaded the last version of the staden package (2.0.0b9) and tried to compile form source.  But had the same error with tracediff.  Here are the last lines of the compilation process:  By the way, I checked for previous warning about tk_utils and found none.
    I recently read that the new gcc 4.6.1 does "not like" certain constructs of in the mira3.0.4 source, is it possible that there is a somewhat similar problem with your source?

    /usr/bin/ld: warning: libtk_utils.so, needed by /home/juan/Bioinf/staden-2.0.0b9-src/lib/libseq_utils.so, not found (try using -rpath or -rpath-link)
    make: Leaving directory `/home/juan/Bioinf/staden-2.0.0b9-src/vector_clip'
    cd tracediff && make -f /home/juan/Bioinf/staden-2.0.0b9-src/./tracediff/Makefile   BUILD=/home/juan/Bioinf/staden-2.0.0b9-src SRC=/home/juan/Bioinf/staden-2.0.0b9-src/./tracediff SUBDIR=tracediff all
    make: Entering directory `/home/juan/Bioinf/staden-2.0.0b9-src/tracediff'
    g++ -g -O2 -DUSE_NON_CONST  -I/home/juan/Bioinf/staden-2.0.0b9-src/./tracediff -I/home/juan/Bioinf/staden-2.0.0b9-src/./Misc -I/usr/local/include -I/home/juan/Bioinf/staden-2.0.0b9-src/. -I/home/juan/Bioinf/staden-2.0.0b9-src/./mutlib -I/home/juan/Bioinf/staden-2.0.0b9-src  -DSVN_VERSION=exported  -o main.o -c main.cpp
    g++ -L/home/juan/Bioinf/staden-2.0.0b9-src/lib -Wl,-rpath,/usr/local/lib/staden -L/home/juan/Bioinf/staden-2.0.0b9-src/lib -Wl,-rpath,/usr/local/lib/staden -o tracediff  main.o  -ltext_utils   -lmutlib  -L/usr/local/lib -lstaden-read  -lm   -lcurl -lz  -lseq_utils   -lmisc   -lm  -ldl
    /usr/bin/ld: warning: libtk_utils.so, needed by /home/juan/Bioinf/staden-2.0.0b9-src/lib/libmutlib.so, not found (try using -rpath or -rpath-link)
    /home/juan/Bioinf/staden-2.0.0b9-src/lib/libmutlib.so: undefined reference to `verror'
    /home/juan/Bioinf/staden-2.0.0b9-src/lib/libseq_utils.so: undefined reference to `vmessage'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/home/juan/Bioinf/staden-2.0.0b9-src/tracediff'
    make: ***  Error 2

    Best regards,

    Juan Montenegro

     
  • David
    David
    2012-01-19

    Hey there,

    I have exactly the same error upon execution of make. System is Ubuntu 11.10 as well. Staden-Version is staden-2.0.0b9-src. The funny thing about the file that he warns about (i.e. libtk_utils.so, that he doesn't find), is that it is in the same folder as the libmutlib.so itself, that searches for it. The folder is, as is also obvious from the previous example of terminal output, staden-2.0.0b9-src/lib/.

    BTW, I also tried uncommenting the CLDFLAGS line in system.mk.in and reran ../configure afterwards, but still got the same error.

    So any more suggestions on what might make it work?

    Thanks,
    David

     
  • James Bonfield
    James Bonfield
    2012-01-23

    I've now installed Ubuntu 11.10 and can verify this problem myself. It appears to be exceptionally picky about the order of linking libraries. Try moving the $(TEXTUTILS_LIB) lines in the tracediff and mutscan Makefiles to just below $(SEQUTILS_LIB) in each. Ie as a patch:

    Index: tracediff/Makefile
    ===================================================================
    --- tracediff/Makefile  (revision 2875)
    +++ tracediff/Makefile  (working copy)
    @@ -13,10 +13,10 @@
     HLIBS=\
    -       $(TEXTUTILS_LIB) \
            $(MUT_LIB) \
            $(IOLIB_LIB) \
            $(SEQUTILS_LIB) \
    +       $(TEXTUTILS_LIB) \
            $(MISC_LIB)
     OBJSD  = main.o
    Index: mutscan/Makefile
    ===================================================================
    --- mutscan/Makefile    (revision 2875)
    +++ mutscan/Makefile    (working copy)
    @@ -12,11 +12,11 @@
     HLIBS=\
    -       $(TEXTUTILS_LIB) \
            $(MUT_LIB) \
            $(IOLIB_LIB) \
            $(TK_LIB) \
            $(SEQUTILS_LIB) \
    +       $(TEXTUTILS_LIB) \
            $(MISC_LIB)
     OBJSD  = \
    

    I've committed this back to sourceforge so you can browse the svn repository and pull out the latest version of these two Makefiles too if you prefer.

    James

     
  • James Bonfield
    James Bonfield
    2012-01-23

    I forgot to add, I also managed to get the prebuilt binaries working just fine. I needed to do "sudo apt-get install tk8.4", but other than that they worked on a vanilla desktop install.

     

  • Anonymous
    2012-01-26

    Just to say I had the same error wuth Ubtunu 11.10, and fixed in the same way. I've had a similar problem with another program called Cortex where the -lgsl flag had to come after the object name in the arguments to gcc. I wonder why gcc has changed in this way?