opencog / atomspace

The OpenCog (hyper-)graph database and graph rewriting system
https://wiki.opencog.org/w/AtomSpace
Other
818 stars 232 forks source link

Build errors on debian 7.8 #30

Closed GwenNelson closed 9 years ago

GwenNelson commented 9 years ago

As requested by linas:

gareth@sexy:~/atomspace/trunk/build$ make [ 3%] Built target json_spirit [ 4%] Built target opencog_atom_types [ 5%] Built target atomutils [ 17%] Built target lambda [ 21%] Built target clearbox [ 53%] Built target atomspace [ 55%] Built target execution [ 56%] Building CXX object opencog/guile/CMakeFiles/smob.dir/SchemeEval.cc.o /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:202:8: error: ‘thread_local’ does not name a type /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc: In member function ‘void opencog::SchemeEval::per_thread_init()’: /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:322:6: error: ‘thread_is_inited’ was not declared in this scope /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:323:2: error: ‘thread_is_inited’ was not declared in this scope /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc: In static member function ‘static opencog::SchemeEval* opencog::SchemeEval::getevaluator(opencog::AtomSpace)’: /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1085:9: error: ‘thread_local’ does not name a type /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc: In destructor ‘opencog::SchemeEval::getevaluator(opencog::AtomSpace)::eval_dtor::~eval_dtor()’: /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1091:19: error: ‘issued’ was not declared in this scope /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1091:19: error: unable to deduce ‘auto’ from ‘’ /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc: In static member function ‘static opencog::SchemeEval* opencog::SchemeEval::getevaluator(opencog::AtomSpace)’: /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1107:9: error: ‘threadlocal’ does not name a type /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1109:12: error: ‘issued’ was not declared in this scope /home/gareth/atomspace/trunk/opencog/guile/SchemeEval.cc:1109:26: error: unable to deduce ‘auto’ from ‘’ make[2]: ** [opencog/guile/CMakeFiles/smob.dir/SchemeEval.cc.o] Error 1 make[1]: * [opencog/guile/CMakeFiles/smob.dir/all] Error 2 make: * [all] Error 2 gareth@sexy:~/atomspace/trunk/build$ guile --version guile (GNU Guile) 2.0.5-deb+1-3 Copyright (C) 2011 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later http://gnu.org/licenses/lgpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. gareth@sexy:~/atomspace/trunk/build$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.2 (Debian 4.7.2-5)

GwenNelson commented 9 years ago

If I use gcc 4.9.2 I get this instead:

gareth@sexy:~/atomspace/trunk/build$ make [ 3%] Built target json_spirit [ 4%] Built target opencog_atom_types [ 5%] Building CXX object opencog/atomutils/CMakeFiles/atomutils.dir/AtomUtils.cc.o /home/gareth/atomspace/trunk/opencog/atomutils/AtomUtils.cc: In function ‘opencog::UnorderedHandleSet opencog::get_outgoing_nodes(const opencog::Handle&, const std::vector&)’: /home/gareth/atomspace/trunk/opencog/atomutils/AtomUtils.cc:135:25: error: converting to ‘opencog::UnorderedHandleSet {aka std::unordered_set<opencog::Handle, opencog::handle_hash>}’ from initializer list would use explicit constructor ‘std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Value = opencog::Handle; _Hash = opencog::handle_hash; _Pred = std::equal_toopencog::Handle; _Alloc = std::allocatoropencog::Handle; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::hasher = opencog::handle_hash; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_equal = std::equal_toopencog::Handle; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::allocator_type = std::allocatoropencog::Handle]’ return {}; ^ make[2]: * [opencog/atomutils/CMakeFiles/atomutils.dir/AtomUtils.cc.o] Error 1 make[1]: * [opencog/atomutils/CMakeFiles/atomutils.dir/all] Error 2 make: *\ [all] Error 2

linas commented 9 years ago

Ahh, OK, so thread_local is a c++11 feature, and you need gcc-4.8 or newer to get that. I'm not going to try to make it backwards-compat with gcc-4.7

linas commented 9 years ago

The gcc-4.9 bug is .. bizarre. I just worked around it in a new push, just now.

GwenNelson commented 9 years ago

And it builds now, might make sense to list minimal gcc version in the README