Hi all,
I've been using Kharchenko et al's spp R package for calling peaks in ChIP-seq data for sometime. I've been really happy with it, and was trying to update to their latest version and am running into some real trouble

I'm using a Mac OSX 10.6 machine, and I seem to be getting an error involving the use of a C "getline" function. I've gathered from researching the error I'm getting that this is because the function isn't supported by MacOS. Does anyone have ideas for a hack to fix this??? I've tried to do a few things myself but I'm in way over my head
Below is the error I'm getting. Any help much appreciated!!!
The parts of the bed2vector.C file that seemed relevant I've reproduced below (the whole file was too big to attach!):
I've been using Kharchenko et al's spp R package for calling peaks in ChIP-seq data for sometime. I've been really happy with it, and was trying to update to their latest version and am running into some real trouble

I'm using a Mac OSX 10.6 machine, and I seem to be getting an error involving the use of a C "getline" function. I've gathered from researching the error I'm getting that this is because the function isn't supported by MacOS. Does anyone have ideas for a hack to fix this??? I've tried to do a few things myself but I'm in way over my head

Below is the error I'm getting. Any help much appreciated!!!
Code:
$ sudo R CMD INSTALL spp_1.8.gz
Password:
* Installing to library '/Library/Frameworks/R.framework/Resources/library'
* Installing *source* package 'spp' ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for BZ2_bzDecompressInit in -lbz2... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
** arch - i386
g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/usr/local/include -D_FASTMAP -DMAQ_LONGREADS -fPIC -g -O2 -c bed2vector.C -o bed2vector.o
In file included from /usr/include/c++/4.2.1/backward/strstream:51,
from bed2vector.C:8:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
bed2vector.C: In function ‘int get_a_line(FILE*, BZFILE*, int, std::string&)’:
bed2vector.C:74: error: no matching function for call to ‘getline(char**, size_t*, FILE*&)’
make: *** [bed2vector.o] Error 1
chmod: /Library/Frameworks/R.framework/Resources/library/spp/libs/i386/*: No such file or directory
ERROR: compilation failed for package 'spp'
** Removing '/Library/Frameworks/R.framework/Resources/library/spp'
** Restoring previous '/Library/Frameworks/R.framework/Resources/library/spp'
Code:
int get_a_line(FILE *f,BZFILE *b,int bz2file,string& line) {
line="";
if(bz2file) {
int bzerror=get_bzline(b,line);
if(bzerror==BZ_OK) {
return(1);
} else {
if(bzerror!=BZ_STREAM_END) {
cerr<<"encountered BZERROR="<<bzerror<<endl;
}
return(0);
}
} else {
char *cline=NULL;
size_t n;
if(getline(&cline,&n,f) != -1) {
if(cline) {
cline[strlen(cline)-1]='\0';
line+=cline;
free(cline);
}
return(1);
} else {
return(0);
}
}
}
Comment