Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help me install tabix

    Hi
    I am trying to install tabix/samtools on my mac os x 10.8.2.
    After typing $ make I het the following message:

    gcc -c -g -Wall -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -DBGZF_CACHE bgzf.c -o bgzf.o
    bgzf.c:25:19: error: stdio.h: No such file or directory
    bgzf.c:26:20: error: stdlib.h: No such file or directory
    bgzf.c:27:20: error: string.h: No such file or directory
    bgzf.c:28:20: error: unistd.h: No such file or directory
    bgzf.c:29:20: error: assert.h: No such file or directory
    bgzf.c:30:23: error: sys/types.h: No such file or directory
    In file included from bgzf.c:31:
    bgzf.h:31:20: error: stdint.h: No such file or directory
    bgzf.h:33:18: error: zlib.h: No such file or directory
    In file included from bgzf.c:31:
    bgzf.h:46: error: expected specifier-qualifier-list before ‘int64_t’
    bgzf.h:55: error: expected specifier-qualifier-list before ‘size_t’
    bgzf.h:99: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bgzf_read’
    bgzf.h:109: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bgzf_write’
    bgzf.h:132: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bgzf_seek’
    and so on..

    I am new to terminal installations and would like help in a low tec level.
    I believe I need some functions from the bgzf library or maybe they just need to be put into the right path?
    I have the developers package with Xcode, make, gcc ...

    Thanks,
    LouiseT

  • #2
    The errors you are getting (no stdio.h, stdlib.h, . . .) would make me believe that you don't have gcc installed. What do you get if you type "which gcc" in the terminal? It should give you the location of your gcc installation (such as /usr/bin/gcc). Did you go through the installation steps for XCode? Once XCode is installed, you should have access to gcc, as well as other developer tools.

    Justin

    Comment


    • #3
      Please help me install tabix

      when I type which gcc I het:

      53132-b99690:tabix-0.2.6 3 lthingholm$ which gcc
      /Applications/Xcode.app/Contents/Developer/usr/bin/gcc

      And gcc is in the list when I view
      /Applications/Xcode.app/Contents/Developer/usr/bin/

      Can it be it was not 'activated' during installation (I did not install it myself)? Must I install it again and if so which develupers pachage is it I must install?

      Comment


      • #4
        What kind of system is this? It appears to be very nonstandard.

        See if, for example, stdio.h is in /Applications/Xcode.app/Contents/Developer/usr/include/
        (just do a "ls /Applications/Xcode.app/Contents/Developer/usr/include/stdio.h" for example).

        If it is not there try using find command : e.g. "find /Applications/Xcode.app -type f -name 'stdio.h' " which means look anywhere in the sub directories of /Applications/Xcode.app for a file name 'stdio.h'. Just find out what directory path the file is in. stdio.h and other *.h files should be somewhere thereabouts.

        Then edit your Makefile to include this path in a -I (dash capital EYE) parameter.
        There are actually several places you can to it but changing the INCLUDES line is a good place.

        i.e. change the line that looks like this ...
        INCLUDES= -I.

        to this ...
        INCLUDES= -I. -IApplications/Xcode.app/Contents/Developer/usr/include/

        (-I parameters are separated by a space; the path come directly after the I; '.' [dot] just means the current working directory [where you are] )

        Basically you just want to point to where the include files are.
        Last edited by Richard Finney; 02-11-2013, 05:04 PM.

        Comment


        • #5
          Please help me install tabix

          Thank you for your feedback!

          When I look for stdio.h I get this:

          53132-b99690:tabix-0.2.6 3 lthingholm$ find /Applications/Xcode.app -type f -name 'stdio.h'
          /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/tr1/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include/c++/4.2.1/tr1/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/tr1/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/c++/4.2.1/tr1/stdio.h
          /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/stdio.h

          So I took the last path and change the makefile. Now I get this error:

          53132-b99690:tabix-0.2.6 3 lthingholm$ make
          gcc -c -g -Wall -O2 -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -DBGZF_CACHE -I. -IApplications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/ bgzf.c -o bgzf.o
          bgzf.c:25:19: error: stdio.h: No such file or directory
          bgzf.c:26:20: error: stdlib.h: No such file or directory
          bgzf.c:27:20: error: string.h: No such file or directory
          bgzf.c:28:20: error: unistd.h: No such file or directory
          bgzf.c:29:20: error: assert.h: No such file or directory
          bgzf.c:30:23: error: sys/types.h: No such file or directory

          Am I changing the makefile correctly?

          Makefile:

          CC= gcc
          CFLAGS= -g -Wall -O2 -fPIC #-m64 #-arch ppc
          DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -DBGZF_CACHE
          LOBJS= bgzf.o kstring.o knetfile.o index.o bedidx.o
          AOBJS= main.o
          PROG= tabix bgzip
          INCLUDES= -I. -IApplications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/
          SUBDIRS= .
          LIBPATH=
          LIBCURSES=

          LouiseT

          Comment


          • #6
            OV Thing I got something. I changed the includes to
            INCLUDES= -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/

            Now it seams to find the functions but writes :
            ld: library not found for -lcrt1.10.6.o
            collect2: ld returned 1 exit status
            make[1]: *** [tabix] Error 1
            make: *** [all-recur] Error 1

            what am I looking for now?

            Comment


            • #7
              with the find function I get this path:
              find /Applications/Xcode.app -type f -name 'crt1.10.6.o'
              /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/crt1.10.6.o
              /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/crt1.10.6.o
              /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/crt1.10.6.o

              I then changed Makefile to:
              INCLUDES= -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/

              Now I get this error:

              $ make
              gcc -g -Wall -O2 -fPIC -o tabix main.o -L. -ltabix -lm -lz
              ld: library not found for -lcrt1.10.6.o
              collect2: ld returned 1 exit status
              make[1]: *** [tabix] Error 1
              make: *** [all-recur] Error 1

              Comment


              • #8
                Maybe try the suggestions from this stackoverflow post:

                I have installed Xcode from the Tool cd, I thought that would let me use gcc from the command line but I can't find it. What am I missing EDIT When I wrote I can't find it I meant "I look for...


                I would especially try the one where it says to open Xcode and go to Preferences -> Download -> install -> Command Line Tools.

                Justin

                Comment


                • #9
                  The error " ld: library not found for -lcrt1.10.6.o" is for a library , not an include file.

                  Do not put on INCLUDES line

                  Put it on the LIBPATH line

                  ( I think it's this ... makefiles are messay and I am not an expert but just hack 'em 'til I get the answer ... please note the -L )

                  LIBPATH= -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/

                  Please note: Makefiles are very picky. There is one TAB (not a space) character after LIBPATH=

                  LIBPATH=[one tab here]-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/

                  You could also hack the line : INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target || exit 1; \
                  to include the -L

                  "-L" means search for linkable libraries in the location after "-L".

                  Please note: you may need to set LD_LIBRARY_PATH to run samtools. Please duckduckgo or google "LD_LIBRARY_PATH" for the gory details. This will look for run time libraries in the specified places. It is very tricky to set right because you don't want to eliminate old paths, just prepend new ones.
                  Last edited by Richard Finney; 02-12-2013, 03:58 AM.

                  Comment


                  • #10
                    Please help me install tabix

                    Thanks for all the help. It is successfully installed and running now.

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Strategies for Sequencing Challenging Samples
                      by seqadmin


                      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                      03-22-2024, 06:39 AM
                    • seqadmin
                      Techniques and Challenges in Conservation Genomics
                      by seqadmin



                      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                      Avian Conservation
                      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                      03-08-2024, 10:41 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, Yesterday, 06:37 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, Yesterday, 06:07 PM
                    0 responses
                    9 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-22-2024, 10:03 AM
                    0 responses
                    51 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 03-21-2024, 07:32 AM
                    0 responses
                    67 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X