Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • LouiseT
    Member
    • Feb 2013
    • 11

    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
  • BAMseek
    Senior Member
    • Apr 2011
    • 124

    #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

    • LouiseT
      Member
      • Feb 2013
      • 11

      #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

      • Richard Finney
        Senior Member
        • Feb 2009
        • 701

        #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

        • LouiseT
          Member
          • Feb 2013
          • 11

          #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

          • LouiseT
            Member
            • Feb 2013
            • 11

            #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

            • LouiseT
              Member
              • Feb 2013
              • 11

              #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

              • BAMseek
                Senior Member
                • Apr 2011
                • 124

                #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

                • Richard Finney
                  Senior Member
                  • Feb 2009
                  • 701

                  #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

                  • LouiseT
                    Member
                    • Feb 2013
                    • 11

                    #10
                    Please help me install tabix

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

                    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
                    19 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-05-2026, 10:09 AM
                    0 responses
                    27 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-04-2026, 08:59 AM
                    0 responses
                    38 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 06-02-2026, 12:03 PM
                    0 responses
                    61 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...