rcthomas / es

Elementary Supernova Spectrum Synthesis
http://c3.lbl.gov/es
Other
12 stars 8 forks source link

Errors when installing #18

Closed pjpessi closed 5 years ago

pjpessi commented 6 years ago

Hi, I've downloaded the es-0.98.1.tar,gz version to install. It configures ok, with no errors or warnings but when I run make I get a bunch of deprecation warnings, an error ": call of overloaded ‘insert(const YAML::Node&)’ is ambiguous" (I googled this and it says it's maybe a problem when calling the compiler, if this is the problem I don't know how to fix it), and finally the Makefile fails. I don't really know what's the problem, maybe you can help me. Below is the whole message I get after running make (some of it is in Spanish). Thank you very much.

make all-recursive make[1]: se entra en el directorio '/home/es-0.98.1' Making all in external make[2]: se entra en el directorio '/home/es-0.98.1/external' Making all in yaml make[3]: se entra en el directorio '/home/es-0.98.1/external/yaml' make[3]: No se hace nada para 'all'. make[3]: se sale del directorio '/home/es-0.98.1/external/yaml' make[3]: se entra en el directorio '/home/es-0.98.1/external' make[3]: No se hace nada para 'all-am'. make[3]: se sale del directorio '/home/es-0.98.1/external' make[2]: se sale del directorio '/home/es-0.98.1/external' Making all in src make[2]: se entra en el directorio '/home/es-0.98.1/src' Making all in libes make[3]: se entra en el directorio '/home/es-0.98.1/src/libes' make[3]: No se hace nada para 'all'. make[3]: se sale del directorio '/home/es-0.98.1/src/libes' Making all in syn++ make[3]: se entra en el directorio '/home/es-0.98.1/src/syn++' make[3]: No se hace nada para 'all'. make[3]: se sale del directorio '/home/es-0.98.1/src/syn++' Making all in synapps make[3]: se entra en el directorio '/home/es-0.98.1/src/synapps' /bin/bash ../../libtool --tag=CXX --mode=compile mpic++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/libes -I../../src/synapps -I../../external/yaml -fopenmp -O3 -MT libesapps_la-ES_Synapps_Config.lo -MD -MP -MF .deps/libesapps_la-ES_Synapps_Config.Tpo -c -o libesapps_la-ES_Synapps_Config.lo test -f 'ES_Synapps_Config.cc' || echo './'ES_Synapps_Config.cc libtool: compile: mpic++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/libes -I../../src/synapps -I../../external/yaml -fopenmp -O3 -MT libesapps_la-ES_Synapps_Config.lo -MD -MP -MF .deps/libesapps_la-ES_Synapps_Config.Tpo -c ES_Synapps_Config.cc -fPIC -DPIC -o .libs/libesapps_la-ES_Synapps_Config.o In file included from ../../external/yaml/yaml-cpp/parser.h:7:0, from ../../external/yaml/yaml-cpp/yaml.h:8, from ES_Synapps_Config.cc:34: ../../external/yaml/yaml-cpp/node.h:34:8: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr Clone() const; ^~~~ In file included from /usr/include/c++/6/bits/locale_conv.h:41:0, from /usr/include/c++/6/locale:43, from /usr/include/c++/6/iomanip:43, from /usr/local/include/appspack/APPSPACK_Common.hpp:61, from /usr/local/include/appspack/APPSPACK_Parameter_List.hpp:41, from ES_Synapps_Config.hh:31, from ES_Synapps_Config.cc:28: /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^~~~ In file included from ../../external/yaml/yaml-cpp/yaml.h:8:0, from ES_Synapps_Config.cc:34: ../../external/yaml/yaml-cpp/parser.h:41:8: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr m_pScanner; ^~~~ In file included from /usr/include/c++/6/bits/locale_conv.h:41:0, from /usr/include/c++/6/locale:43, from /usr/include/c++/6/iomanip:43, from /usr/local/include/appspack/APPSPACK_Common.hpp:61, from /usr/local/include/appspack/APPSPACK_Parameter_List.hpp:41, from ES_Synapps_Config.hh:31, from ES_Synapps_Config.cc:28: /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^~~~ In file included from ../../external/yaml/yaml-cpp/yaml.h:11:0, from ES_Synapps_Config.cc:34: ../../external/yaml/yaml-cpp/emitter.h:75:8: warning: ‘template class std::auto_ptr’ is deprecated [-Wdeprecated-declarations] std::auto_ptr m_pState; ^~~~ In file included from /usr/include/c++/6/bits/locale_conv.h:41:0, from /usr/include/c++/6/locale:43, from /usr/include/c++/6/iomanip:43, from /usr/local/include/appspack/APPSPACK_Common.hpp:61, from /usr/local/include/appspack/APPSPACK_Parameter_List.hpp:41, from ES_Synapps_Config.hh:31, from ES_Synapps_Config.cc:28: /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here template class auto_ptr; ^~~~ ES_Synapps_Config.cc: In constructor ‘ES::Synapps::Config::Config(const YAML::Node&)’: ES_Synapps_Config.cc:252:44: error: call of overloaded ‘insert(const YAML::Node&)’ is ambiguous done.insert( config[ "ions" ][ i ] ); ^ In file included from /usr/include/c++/6/set:61:0, from ES_Synapps_Config.cc:36: /usr/include/c++/6/bits/stl_set.h:480:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename gnu_cxx::alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Compare = std::less; _Alloc = std::allocator; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename gnu_cxx::alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = int] insert(const value_type& x) ^~ /usr/include/c++/6/bits/stl_set.h:489:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename gnu_cxx::alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = int; _Compare = std::less; _Alloc = std::allocator; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = int] insert(value_type&& __x) ^~ /usr/include/c++/6/bits/stl_set.h:549:7: note: candidate: void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = int; _Compare = std::less; _Alloc = std::allocator] insert(initializer_list __l) ^~ Makefile:559: fallo en las instrucciones para el objetivo 'libesapps_la-ES_Synapps_Config.lo' make[3]: [libesapps_la-ES_Synapps_Config.lo] Error 1 make[3]: se sale del directorio '/home/es-0.98.1/src/synapps' Makefile:398: fallo en las instrucciones para el objetivo 'all-recursive' make[2]: [all-recursive] Error 1 make[2]: se sale del directorio '/home/es-0.98.1/src' Makefile:443: fallo en las instrucciones para el objetivo 'all-recursive' make[1]: [all-recursive] Error 1 make[1]: se sale del directorio '/home/es-0.98.1' Makefile:375: fallo en las instrucciones para el objetivo 'all' make: [all] Error 2

griffin-h commented 5 years ago

I had the same problem and found your issue! I still don't understand the cause, but I managed to work around it by using an older version of the compiler (gcc 4.9.3 instead of 7.1.0).

pjpessi commented 5 years ago

@griffin-h I am going to try and change the gcc version. Thank you very much!

scottfdavis commented 5 years ago

Updating to an older version of gcc did nothing for me. I did find a work around for this, however.

In your es directory go to src/synapps and open ES_Synapps_Config.cc

Line 252 is the problem. The default line should be

done.insert( config[ "ions" ][ i ] );

Change this to two lines which read

`int ion = config[ "ions" ][ i ];

done.insert( ion );`