Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • metheuse
    Member
    • Jan 2013
    • 84

    Tophat installation errors

    Hi, this is my first time installing Tophat. I followed the instructions on the manual page, but after I ran "make", I got the error message as below. Does anyone know what "undefined reference to 'clock_gettime'" means?
    The boost and samtools installation went smoothly and they were installed under /usr/local/

    Code:
    make  all-recursive
    make[1]: Entering directory `/mnt/galaxy_tools_external/tophat-2.0.8'
    Making all in src
    make[2]: Entering directory `/mnt/galaxy_tools_external/tophat-2.0.8/src'
    g++  -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -pthread -I/usr/local/include -I/usr/local/include -I./SeqAn-1.3   -o segment_juncs  -L/usr/local/lib -L/usr/local/lib segment_juncs.o ../src/libtophat.a -lboost_thread -lboost_system -lbam -lz 
    /usr/local/lib/libboost_thread.a(thread.o): In function `boost::this_thread::hiden::sleep_until(timespec const&)':
    thread.cpp: (.text+0x1a73): undefined reference to `clock_gettime'
    thread.cpp: (.text+0x1ae8): undefined reference to `clock_gettime'
    thread.cpp: (.text+0x1b4f): undefined reference to `clock_gettime'
    thread.cpp: (.text+0x1bb6): undefined reference to `clock_gettime'
    thread.cpp: (.text+0x1c1d): undefined reference to `clock_gettime'
    /usr/local/lib/libboost_thread.a(thread.o):thread.cpp: (.text+0x1c84): more undefined references to `clock_gettime' follow
    collect2: ld returned 1 exit status
    make[2]: *** [segment_juncs] Error 1
    make[2]: Leaving directory `/mnt/galaxy_tools_external/tophat-2.0.8/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/mnt/galaxy_tools_external/tophat-2.0.8'
    make: *** [all] Error 2
    Last edited by metheuse; 03-08-2013, 06:48 AM.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Originally posted by metheuse View Post
    The boost and samtools installation went smoothly and they were installed under /usr/local/
    Have you confirmed that the boost library files are indeed installed in /usr/local/lib?

    Did you provide ".configure" command for TopHat with appropriate "--with-boost=/usr/local" directive?

    Comment

    • metheuse
      Member
      • Jan 2013
      • 84

      #3
      Originally posted by GenoMax View Post
      Have you confirmed that the boost library files are indeed installed in /usr/local/lib?

      Did you provide ".configure" command for TopHat with appropriate "--with-boost=/usr/local" directive?
      Yes to both.

      Code:
      $ ls /usr/local/lib
      libbam.a              libboost_exception.a   libboost_math_c99f.a  libboost_prg_exec_monitor.a  libboost_signals.a            libboost_unit_test_framework.a
      libboost_atomic.a     libboost_filesystem.a  libboost_math_c99l.a  libboost_program_options.a   libboost_system.a             libboost_wave.a
      libboost_chrono.a     libboost_graph.a       libboost_math_tr1.a   libboost_random.a            libboost_test_exec_monitor.a  libboost_wserialization.a
      libboost_context.a    libboost_locale.a      libboost_math_tr1f.a  libboost_regex.a             libboost_thread.a
      libboost_date_time.a  libboost_math_c99.a    libboost_math_tr1l.a  libboost_serialization.a     libboost_timer.a

      Comment

      • Richard Finney
        Senior Member
        • Feb 2009
        • 701

        #4
        Try this

        Append a " -lrt" after
        g++ -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized -O3 -DNDEBUG -pthread -I/usr/local/include -I/usr/local/include -I./SeqAn-1.3 -o segment_juncs -L/usr/local/lib -L/usr/local/lib segment_juncs.o ../src/libtophat.a -lboost_thread -lboost_system -lbam -lz

        i.e ".... -lz -lrt"

        Wherever the -lz is in the Makefile just append " -lrt", that's '[singlespace]-lrt" using your favorite editor (vim, emacs, whatev).

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          Is this an Ubuntu system?

          Do you have "librt.a" in one of the "lib" directories?

          See this thread for some info: http://stackoverflow.com/questions/8...or-g-in-ubuntu

          Comment

          • metheuse
            Member
            • Jan 2013
            • 84

            #6
            Originally posted by Richard Finney View Post
            Try this

            Append a " -lrt" after
            g++ -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized -O3 -DNDEBUG -pthread -I/usr/local/include -I/usr/local/include -I./SeqAn-1.3 -o segment_juncs -L/usr/local/lib -L/usr/local/lib segment_juncs.o ../src/libtophat.a -lboost_thread -lboost_system -lbam -lz

            i.e ".... -lz -lrt"

            Wherever the -lz is in the Makefile just append " -lrt", that's '[singlespace]-lrt" using your favorite editor (vim, emacs, whatev).
            Thanks so much Richard! This works!

            Comment

            • metheuse
              Member
              • Jan 2013
              • 84

              #7
              Originally posted by GenoMax View Post
              Is this an Ubuntu system?

              Do you have "librt.a" in one of the "lib" directories?

              See this thread for some info: http://stackoverflow.com/questions/8...or-g-in-ubuntu
              Mine is redhat. But still thanks.

              Comment

              • ercfrtz
                Member
                • Aug 2010
                • 23

                #8
                I am getting this error trying to install tophat-2.0.8. I installed boost and samtools like it said and used the following configure command:

                Code:
                ./configure --prefix=/shared/local/tophat-2.0.8/ --with-boost=/shared/local/boost_1_53_0/ --with-bam=/shared/local/samtools-0.1.18/
                And I get the following output at the end of that command:
                Code:
                -- tophat 2.0.8 Configuration Results --
                  C++ compiler:        g++ -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -pthread -I/shared/local/boost_1_53_0//include -I/shared/local/samtools-0.1.18//include -I./SeqAn-1.3
                  Linker flags:        
                  GCC version:         gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
                  Host System type:    x86_64-unknown-linux-gnu
                  Install prefix:      /shared/local/tophat-2.0.8/
                  Install eprefix:     ${prefix}
                
                  See config.h for further configuration information.
                  Email <[email protected], [email protected]> with questions and bug reports.
                But when I look in the Makefile, I cannot find the line that was said to add " -lrt" to and when ran as default I get the following error info:
                Code:
                make  all-recursive
                make[1]: Entering directory `/shared/local/tophat-2.0.8'
                Making all in src
                make[2]: Entering directory `/shared/local/tophat-2.0.8/src'
                if g++ -DHAVE_CONFIG_H -I. -I. -I..     -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -pthread -I/shared/local/boost_1_53_0//include -I/shared/local/samtools-0.1.18//include -I./SeqAn-1.3 -MT reads.o -MD -MP -MF ".deps/reads.Tpo" -c -o reads.o reads.cpp; \
                        then mv -f ".deps/reads.Tpo" ".deps/reads.Po"; else rm -f ".deps/reads.Tpo"; exit 1; fi
                common.h: In member function ‘int32_t GBamWriter::get_tid(const char*)’:
                common.h:508: error: ‘bam_get_tid’ was not declared in this scope
                common.h: In member function ‘void GBamWriter::flush()’:
                common.h:622: error: ‘bgzf_flush’ was not declared in this scope
                make[2]: *** [reads.o] Error 1
                make[2]: Leaving directory `/shared/local/tophat-2.0.8/src'
                make[1]: *** [all-recursive] Error 1
                make[1]: Leaving directory `/shared/local/tophat-2.0.8'
                make: *** [all] Error 2
                Any help is appreciated as the pre-built tophat does not run on our server either.

                Comment

                • Word4Word
                  Junior Member
                  • Jul 2012
                  • 1

                  #9
                  I had this problem as well, and appending -lrt to -lz within the makefile did not work. However, when I ran

                  ./configure LIBS=-lrt

                  and then tried make, it all worked fine. Maybe that will work for you.

                  Comment

                  • ercfrtz
                    Member
                    • Aug 2010
                    • 23

                    #10
                    I tried adding that to my configure command and it looks like it changed the Error from 2 to 1. Now I'm getting the following:

                    Code:
                    Making install in src
                    make[1]: Entering directory `/shared/local/tophat-2.0.8/src'
                    if g++ -DHAVE_CONFIG_H -I. -I. -I..     -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -pthread -I/shared/local/boost_1_53_0//include -I/shared/local/samtools-0.1.18//include -I./SeqAn-1.3 -MT reads.o -MD -MP -MF ".deps/reads.Tpo" -c -o reads.o reads.cpp; \
                            then mv -f ".deps/reads.Tpo" ".deps/reads.Po"; else rm -f ".deps/reads.Tpo"; exit 1; fi
                    common.h: In member function ‘int32_t GBamWriter::get_tid(const char*)’:
                    common.h:508: error: ‘bam_get_tid’ was not declared in this scope
                    common.h: In member function ‘void GBamWriter::flush()’:
                    common.h:622: error: ‘bgzf_flush’ was not declared in this scope
                    make[1]: *** [reads.o] Error 1
                    make[1]: Leaving directory `/shared/local/tophat-2.0.8/src'
                    make: *** [install-recursive] Error 1

                    Comment

                    • GenoMax
                      Senior Member
                      • Feb 2008
                      • 7142

                      #11
                      Originally posted by ercfrtz View Post
                      I tried adding that to my configure command and it looks like it changed the Error from 2 to 1. Now I'm getting the following:

                      Code:
                      Making install in src
                      make[1]: Entering directory `/shared/local/tophat-2.0.8/src'
                      if g++ -DHAVE_CONFIG_H -I. -I. -I..     -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -pthread -I/shared/local/boost_1_53_0//include -I/shared/local/samtools-0.1.18//include -I./SeqAn-1.3 -MT reads.o -MD -MP -MF ".deps/reads.Tpo" -c -o reads.o reads.cpp; \
                              then mv -f ".deps/reads.Tpo" ".deps/reads.Po"; else rm -f ".deps/reads.Tpo"; exit 1; fi
                      common.h: In member function ‘int32_t GBamWriter::get_tid(const char*)’:
                      common.h:508: error: ‘bam_get_tid’ was not declared in this scope
                      common.h: In member function ‘void GBamWriter::flush()’:
                      common.h:622: error: ‘bgzf_flush’ was not declared in this scope
                      make[1]: *** [reads.o] Error 1
                      make[1]: Leaving directory `/shared/local/tophat-2.0.8/src'
                      make: *** [install-recursive] Error 1
                      Are you using RHEL v.4.x? Did you build your own boost libraries?

                      Comment

                      Latest Articles

                      Collapse

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, 06-09-2026, 11:58 AM
                      0 responses
                      25 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 06-05-2026, 10:09 AM
                      0 responses
                      30 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 06-04-2026, 08:59 AM
                      0 responses
                      39 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 06-02-2026, 12:03 PM
                      0 responses
                      62 views
                      0 reactions
                      Last Post SEQadmin2  
                      Working...