LoRDEC : Compilation error
2
1
Entering edit mode
9.3 years ago
Carob ▴ 50

I tryed to compile the version LoRDEC-0.5.3-Source/ on my linux server. I have downloaded the version with the gatb-core included.

I obtain this error message :

/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp: In function 'int correct_one_read(gatb::core::bank::Sequence, char*, gatb::core::debruijn::impl::Graph, gatb::core::system::IFile*, gatb::core::system::ISynchronizer*, int)':
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:622: erreur: template argument for 'template<class OutEdgeListS, class VertexListS, class DirectedS, class VertexProperty, class EdgeProperty, class GraphProperty, class EdgeListS> class boost::adjacency_list' uses local type 'correct_one_read(gatb::core::bank::Sequence, char*, gatb::core::debruijn::impl::Graph, gatb::core::system::IFile*, gatb::core::system::ISynchronizer*, int)::Path'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:622: erreur:   trying to instantiate 'template<class OutEdgeListS, class VertexListS, class DirectedS, class VertexProperty, class EdgeProperty, class GraphProperty, class EdgeListS> class boost::adjacency_list'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:622: erreur: invalid type in declaration before ';' token
In file included from /env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:43:
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp: At global scope:
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp: In instantiation of 'boost::graph_traits<int>':
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:623:   instantiated from here
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp:57: erreur: 'int' is not a class, struct, or union type
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp:58: erreur: 'int' is not a class, struct, or union type
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp: In instantiation of 'boost::graph_traits<int>':
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:623:   instantiated from here
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp:65: erreur: 'int' is not a class, struct, or union type
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp:66: erreur: 'int' is not a class, struct, or union type
/env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/boost/graph/graph_traits.hpp:67: erreur: 'int' is not a class, struct, or union type
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp: In function 'int correct_one_read(gatb::core::bank::Sequence, char*, gatb::core::debruijn::impl::Graph, gatb::core::system::IFile*, gatb::core::system::ISynchronizer*, int)':
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:943: erreur: no matching function for call to 'add_edge(int&, int&, correct_one_read(gatb::core::bank::Sequence, char*, gatb::core::debruijn::impl::Graph, gatb::core::system::IFile*, gatb::core::system::ISynchronizer*, int)::Path&, path_graph_t&)'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:946: erreur: 'vertex_descriptor' was not declared in this scope
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:946: erreur: patron de l'argument 1 est invalide
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:946: erreur: patron de l'argument 2 est invalide
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:946: erreur: invalid type in declaration before '(' token
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:946: erreur: 'num_vertices' was not declared in this scope
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:948: erreur: expected ';' before 's'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:951: erreur: 's' was not declared in this scope
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:952: erreur: no matching function for call to 'get(int correct_one_read(gatb::core::bank::Sequence, char*, gatb::core::debruijn::impl::Graph, gatb::core::system::IFile*, gatb::core::system::ISynchronizer*, int)::Path::*, path_graph_t&)'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:953: erreur: request for member 'begin' in 'p', which is of non-class type 'int'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:953: erreur: no matching function for call to 'get(boost::vertex_index_t, path_graph_t&)'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:954: erreur: no matching function for call to 'get(boost::vertex_index_t, path_graph_t&)'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:965: erreur: invalid types 'int[int]' for array subscript
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:966: erreur: invalid types 'int[int]' for array subscript
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:971: erreur: no matching function for call to 'edge(int&, int&, path_graph_t&)'
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:972: erreur: 'e' was not declared in this scope
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:976: erreur: 'e' was not declared in this scope
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp: In function 'int main(int, char**)':
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:1589: erreur: expected primary-expression before '[' token
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:1589: erreur: expected primary-expression before ']' token
/env/cns/src/lordec/LoRDEC-0.5.3-Source/tools/lordec-correct/src/lordec-correct.cpp:1589: erreur: expected primary-expression before 'const'
make[2]: *** [tools/CMakeFiles/lordec-correct.dir/lordec-correct/src/lordec-correct.cpp.o] Erreur 1
make[1]: *** [tools/CMakeFiles/lordec-correct.dir/all] Erreur 2
make: *** [all] Erreur 2

I use the gcc version gcc-4.8.0

Can you help me to fix this problem??

Thanks

LoRDEC gcc • 4.6k views
ADD COMMENT
2
Entering edit mode

Are there any reasons not to use the binaries?

ADD REPLY
1
Entering edit mode

it doesn't work too...

./lordec-correct: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./lordec-correct)
ADD REPLY
1
Entering edit mode

What is your operating system and which version? And do you have Boost libraries installed?

ADD REPLY
1
Entering edit mode

Yes I have Boost Libraries installed

I work on a Linux system

ADD REPLY
1
Entering edit mode

which linux and which version of the particular flavour of linux?

ADD REPLY
1
Entering edit mode
uname -a
Linux etna0.genoscope.cns.fr 2.6.32-504.12.2.el6.x86_64 #1 SMP Wed Mar 11 22:03:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
ADD REPLY
0
Entering edit mode

@h.mon Thanks so much. You saved my day.

ADD REPLY
1
Entering edit mode

Could you please tell me what is the output of the cmake command ? In particular, the line that begins with "-- Options". In my case, I have gcc 4.8.3 on a Fedora20, I got this :

-- Options:  -O3  -DINT128_FOUND  -DWITH_LAMBDA_EXPRESSION -std=c++0x    -DWITH_MPHF  -DDONT_USE_TR1  -Wno-invalid-offsetof

and LoRDEC compiles well.

The first error you got (erreur: template argument for 'template<XXX> class boost::adjacency_list' uses local type) may be related to the options detected by cmake while building the makefile (see here for instance).

ADD REPLY
1
Entering edit mode

the output of my cmake command :

-- Options: -O3 -DINT128_FOUND -Wno-invalid-offsetof
ADD REPLY
1
Entering edit mode

Ok, thanks. It seems that the issue comes from the lack of "-std=c++0x", undetected during the cmake execution because the gcc version is detected as being <=4.5. Note that LoRDEC should compile only with gcc version greater than 4.5.

The weird part is that you have a gcc version 4.8.0. I think that cmake is not able to detect it by default. Could you please tell what are the very first lines of the cmake execution that give the compiler (C and CXX) identification ?

ADD REPLY
0
Entering edit mode
9.3 years ago
Carob ▴ 50

I have changed my variables:

export CC=/env/cns/opt/gcc-4.8.0/bin/gcc
export CXX=/env/cns/opt/gcc-4.8.0/bin/g++

the cmake seems to finish well

The first lines of my cmake are:

cmake ..
-- The C compiler identification is GNU 4.8.0
-- The CXX compiler identification is GNU 4.8.0
-- Check for working C compiler: /env/cns/opt/gcc-4.8.0/bin/gcc
-- Check for working C compiler: /env/cns/opt/gcc-4.8.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /env/cns/opt/gcc-4.8.0/bin/g++
-- Check for working CXX compiler: /env/cns/opt/gcc-4.8.0/bin/g++ -- works

and my option line is now:

Options: -O3 -DINT128_FOUND -DWITH_LAMBDA_EXPRESSION -std=c++0x -DWITH_MPHF -DDONT_USE_TR1 -Wno-invalid-offsetof

But for the make line, I have this error:

[  0%] Built target hdf5_postbuild
[  0%] Building C object ext/gatb-core/thirdparty/hdf5/src/CMakeFiles/H5detect.dir/H5detect.c.o
Linking C executable ../../../bin/H5detect
[  0%] Built target H5detect
[  0%] Building C object ext/gatb-core/thirdparty/hdf5/src/CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o
In file included from /env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/gatb-core/thirdparty/hdf5/src/H5make_libsettings.c:45:0:
/usr/include/time.h:226:5: erreur: unknown type name '__locale_t'
     __locale_t __loc) __THROW;
     ^
make[2]: *** [ext/gatb-core/thirdparty/hdf5/src/CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o] Erreur 1
make[1]: *** [ext/gatb-core/thirdparty/hdf5/src/CMakeFiles/H5make_libsettings.dir/all] Erreur 2
make: *** [all] Erreur 2

Thanks a lot for your help

ADD COMMENT
0
Entering edit mode

Concerning the new error, did you have remove completely the build directory before launching cmake after setting CC and CXX? If not, can you give a try? CMake has some cached files and I faced issues with them when switching compiler versions.

ADD REPLY
1
Entering edit mode

I answer for Carob because she reached her number of message limit per 6hours

Finally she resolved his problem in using gcc 4.9.2 and with adding gcc 4.9.2 path to CC and CXX.

Thanks a lot

ADD REPLY
0
Entering edit mode
9.3 years ago

I answer for Carob because she reached her biostar number of message limit per 6hours

She has removed the build directory and run make clean but she still has the same error message:

In file included from /env/cns/src/lordec/LoRDEC-0.5.3-Source/thirdparty/gatb-core/thirdparty/hdf5/src/H5make_libsettings.c:45:0:
/usr/include/time.h:226:5: erreur: unknown type name '__locale_t'
     __locale_t __loc) __THROW;
ADD COMMENT
0
Entering edit mode

The plot thickens... I would say there is something rather strange with the gcc version you are trying to use.

Could you edit a file test.cpp and put this?

#include <stdio.h>
#include <time.h>
int main () { return 0; }

and then compile it with the specific g++ version (4.8.0) you use with the following line

g++ test.cpp  -O3 -std=c++0x

Could you then tell me if you have the same error during the compilation?

ADD REPLY
1
Entering edit mode

Finnaly she resolved his problem in using gcc 4.9.2 and with adding gcc 4.9.2 path to CC and CXX.

Thanks a lot

ADD REPLY
1
Entering edit mode

Ok, glad it worked !

ADD REPLY

Login before adding your answer.

Traffic: 1571 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6