isovic / graphmap

GraphMap - A highly sensitive and accurate mapper for long, error-prone reads http://www.nature.com/ncomms/2016/160415/ncomms11307/full/ncomms11307.html Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/graphmap2
MIT License
178 stars 44 forks source link

make reports a "previous declaration" error in seqlib #77

Closed roseperrone closed 6 years ago

roseperrone commented 6 years ago

When I run make, I get the following error. How can I fix it?

g++ -static-libgcc -static-libstdc++ -D__cplusplus=201103L -I"./src/" -I"/usr/include/" -I"codebase/seqlib/src/libs/seqan-library-2.0.1/include" -I"codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/" -Icodebase/seqlib/src -Icodebase/gindex/src -Icodebase/argumentparser/src -DRELEASE_VERSION -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread  -o obj_linux/codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/utils.o codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/utils.cpp
In file included from /usr/local/include/assert.h:5:0,
                 from codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/divsufsort_private.h:44,
                 from codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/utils.cpp:29:
/usr/local/include/except.h:15:32: error: conflicting declaration ‘typedef struct Except_Frame_T* Except_Frame_T’
 typedef struct Except_Frame_T *Except_Frame_T;
                                ^
/usr/local/include/except.h:15:16: error: ‘struct Except_Frame_T’ has a previous declaration as ‘struct Except_Frame_T’
 typedef struct Except_Frame_T *Except_Frame_T;
                ^
/usr/local/include/except.h:17:18: error: field ‘prev’ has incomplete type
   Except_Frame_T prev;
                  ^
make: *** [obj_linux/codebase/seqlib/src/libs/libdivsufsort-2.0.1-64bit/utils.o] Error 1
isovic commented 6 years ago

Hi, I haven't encountered this error before. Could you provide a description of the system you are building this on (OS, compiler, etc.)? Best regards, Ivan.

isovic commented 6 years ago

After Googling, I found this answer which suggests it's a system configuration issue: https://groups.google.com/forum/#!topic/bedtools-discuss/CURWF19qBuA

roseperrone commented 6 years ago

It worked, thanks!

enormandeau commented 6 years ago

@roseperrone I'm facing the same issue. What worked exactly?


EDIT: The following worked for me on Linux Mint 18.2 (based on Ubuntu 16.04)

cd /usr/local/include
sudo mv assert.h assert.h.bad
sudo mv except.h except.h.bad

WARNING!: It is possible this will create other problems in the future.

brielin commented 6 years ago

For anyone else that encounters this or a similar issue, it's possible that GMAP/GSNAP are adding those files and causing the conflict. Uninstalling GMAP/GSNAP, and trying again might solve your issue.

https://github.com/hms-dbmi/dropEst/issues/2