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
                      Advancing Precision Medicine for Rare Diseases in Children
                      by seqadmin




                      Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                      12-16-2024, 07:57 AM
                    • seqadmin
                      Recent Advances in Sequencing Technologies
                      by seqadmin



                      Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

                      Long-Read Sequencing
                      Long-read sequencing has seen remarkable advancements,...
                      12-02-2024, 01:49 PM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 12-17-2024, 10:28 AM
                    0 responses
                    26 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-13-2024, 08:24 AM
                    0 responses
                    42 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-12-2024, 07:41 AM
                    0 responses
                    28 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-11-2024, 07:45 AM
                    0 responses
                    42 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X