Hi,
are you aware of this name clash?
make[2]: Entering directory `/scratch/staden/staden-src-1-7-0/src/mutlib'
Makefile:90: warning: overriding commands for target `distsrc'
../mk/global.mk:494: warning: ignoring old commands for target `distsrc'
g++ -g -DUSE_NON_CONST -DMUTLIB_EXPORTS -DDYNMAT -I. -I../Misc -I.. -I../mutlib -I../seq_utils -D_FILE_OFFSET_BITS=64 -o linux-binaries/align.o -c align.cpp
g++ -g -DUSE_NON_CONST -DMUTLIB_EXPORTS -DDYNMAT -I. -I../Misc -I.. -I../mutlib -I../seq_utils -D_FILE_OFFSET_BITS=64 -o linux-binaries/basecall.o -c basecall.cpp
g++ -g -DUSE_NON_CONST -DMUTLIB_EXPORTS -DDYNMAT -I. -I../Misc -I.. -I../mutlib -I../seq_utils -D_FILE_OFFSET_BITS=64 -o linux-binaries/caller.o -c caller.cpp
In file included from /usr/include/io_lib/Read.h:268,
from ./staden.h:27,
from ./trace.hpp:23,
from ./caller.hpp:22,
from caller.cpp:16:
/usr/include/io_lib/compress.h:99: error: declaration of C function ‘char* pipe2(const char*, char*, size_t, size_t*)’ conflicts with
/usr/include/unistd.h:389: error: previous declaration ‘int pipe2(int*, int)’ here
make[2]: *** [linux-binaries/caller.o] Error 1
Sorry, it is caused by my glibc-2.9 and 2.6.29-rc* kernel. Quoting from the pipe(2) manpage:
VERSIONS
pipe2() was added to Linux in version 2.6.27; glibc support is available starting with version 2.9.
CONFORMING TO
pipe(): POSIX.1-2001.
pipe2() is Linux-specific.
pipe2.patch
Uploading a patch file to rename pipe2() to iolibpipe2().
File Added: pipe2.patch
Thanks for the bug report (and sorry about the slow reply). It seems this is a new function in linux from kernel 2.6.27 onwards.
I'll rename it, but I'll also make the function internal to compress.c as it's not used anywhere else.
James
Now fixed in CVS. I used pipe_into instead of iolibpipe2 as it's a more descriptive name, but essentially it's the same obvious fix as your patch.
Thanks.
James