Menu

#71 io_lib/compress.h conflicts with unistd.h from glibc-2.9

closed-fixed
None
5
2009-06-12
2009-02-23
No

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

Discussion

  • Martin Mokrejs

    Martin Mokrejs - 2009-02-23

    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.

     
  • Martin Mokrejs

    Martin Mokrejs - 2009-02-23
    • summary: io_lib-1.11.6.1: io_lib/compress.h conflicts with unistd.h --> io_lib/compress.h conflicts with unistd.h from glibc-2.9
     
  • Martin Mokrejs

    Martin Mokrejs - 2009-02-23

    pipe2.patch

     
  • Martin Mokrejs

    Martin Mokrejs - 2009-02-23

    Uploading a patch file to rename pipe2() to iolibpipe2().
    File Added: pipe2.patch

     
  • James Bonfield

    James Bonfield - 2009-04-20
    • assigned_to: nobody --> jkbonfield
    • status: open --> open-accepted
     
  • James Bonfield

    James Bonfield - 2009-04-20

    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

     
  • James Bonfield

    James Bonfield - 2009-04-20

    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

     
  • James Bonfield

    James Bonfield - 2009-04-20
    • status: open-accepted --> open-fixed
     
  • James Bonfield

    James Bonfield - 2009-06-12
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.