SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
tabix new version 0.2.6 dg13 Bioinformatics 3 10-17-2012 08:17 AM
Compile tabix ashkot Bioinformatics 1 09-20-2012 04:49 AM
help using tabix pi101 Bioinformatics 1 09-13-2012 12:11 PM
Install tabix on windows Scotch Bioinformatics 1 02-07-2011 12:19 AM
tabix error on Mac adamhfreedman Bioinformatics 4 10-26-2010 12:50 AM

Reply
 
Thread Tools
Old 02-11-2013, 02:45 PM   #1
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default 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
LouiseT is offline   Reply With Quote
Old 02-11-2013, 03:16 PM   #2
BAMseek
Senior Member
 
Location: St. Louis, MO, USA

Join Date: Apr 2011
Posts: 124
Default

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
BAMseek is offline   Reply With Quote
Old 02-11-2013, 03:25 PM   #3
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default 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?
LouiseT is offline   Reply With Quote
Old 02-11-2013, 03:54 PM   #4
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 694
Default

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 at 04:04 PM.
Richard Finney is offline   Reply With Quote
Old 02-11-2013, 05:59 PM   #5
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default 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
LouiseT is offline   Reply With Quote
Old 02-11-2013, 06:13 PM   #6
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default

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?
LouiseT is offline   Reply With Quote
Old 02-11-2013, 06:57 PM   #7
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default

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
LouiseT is offline   Reply With Quote
Old 02-11-2013, 07:05 PM   #8
BAMseek
Senior Member
 
Location: St. Louis, MO, USA

Join Date: Apr 2011
Posts: 124
Default

Maybe try the suggestions from this stackoverflow post:

http://stackoverflow.com/questions/2...-xcode-already

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

Justin
BAMseek is offline   Reply With Quote
Old 02-12-2013, 02:37 AM   #9
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 694
Default

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 at 02:58 AM.
Richard Finney is offline   Reply With Quote
Old 02-12-2013, 12:04 PM   #10
LouiseT
Member
 
Location: Melbourne, Australie

Join Date: Feb 2013
Posts: 11
Default Please help me install tabix

Thanks for all the help. It is successfully installed and running now.
LouiseT is offline   Reply With Quote
Reply

Tags
bgzf, install, osx, samtools, tabix

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:22 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO