New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
[XIOS] Can't compile at all – Message List – Discussion – NEMO

Beginner (#1) - [XIOS] Can't compile at all (#28) - Message List

[XIOS] Can't compile at all
 solved

Greetings!

I tried to compile XIOS many times following the instruction from the Wiki but I was unable to compile neither xios-1.0 nor xios-2.0.

Here are first errors I get compiling xios-1.0 ([xios:changeset:703 XIOS r703]):

mpicc -o client.o -I/home/rincewnd/NEMO/xios-1.0/inc -ansi -w -O3 -DBOOST_DISABLE_ASSERTS -I /usr/include -I /usr/include/hdf5/serial -I/home/rincewnd/NEMO/xios-1.0/extern/src_netcdf -I/home/rincewnd/NEMO/xios-1.0/extern/boost/include -I/home/rincewnd/NEMO/xios-1.0/extern/rapidxml/include -I/home/rincewnd/NEMO/xios-1.0/extern/blitz/include -c /home/rincewnd/NEMO/xios-1.0/src/client.cpp
In file included from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/hash.hpp:510:0,
                 from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash.hpp:6,
                 from /home/rincewnd/NEMO/xios-1.0/src/client.cpp:5:
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:33: error: ‘template<class T, class A> std::size_t boost::hash_value’ conflicts with a previous declaration
     std::size_t hash_value(std::list<T, A> const& v);
                                 ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:36:17: note: previous declaration ‘namespace boost { }::hash_value’
     std::size_t hash_value(std::vector<T, A> const&);
                 ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:28: error: reference to ‘list’ is ambiguous
     std::size_t hash_value(std::list<T, A> const& v);
                            ^
In file included from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:17:0,
                 from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/hash.hpp:510,
                 from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash.hpp:6,
                 from /home/rincewnd/NEMO/xios-1.0/src/client.cpp:5:
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/detail/container_fwd.hpp:81:47: note: candidates are: template<class T, class Allocator> class std::list
     template <class T, class Allocator> class list;
                                               ^
In file included from /usr/include/c++/5/list:63:0,
                 from /home/rincewnd/NEMO/xios-1.0/src/xmlioserver_spl.hpp:19,
                 from /home/rincewnd/NEMO/xios-1.0/src/client.cpp:2:
/usr/include/c++/5/bits/stl_list.h:507:11: note:                 template<class _Tp, class _Alloc> class std::__cxx11::list
     class list : protected _List_base<_Tp, _Alloc>
           ^
In file included from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/hash.hpp:510:0,
                 from /home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash.hpp:6,
                 from /home/rincewnd/NEMO/xios-1.0/src/client.cpp:5:
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:39: error: expected primary-expression before ‘,’ token
     std::size_t hash_value(std::list<T, A> const& v);
                                       ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:42: error: expected primary-expression before ‘>’ token
     std::size_t hash_value(std::list<T, A> const& v);
                                          ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:44: error: expected primary-expression before ‘const’
     std::size_t hash_value(std::list<T, A> const& v);
                                            ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:52: error: expression list treated as compound expression in initializer [-fpermissive]
     std::size_t hash_value(std::list<T, A> const& v);
                                                    ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:69:33: error: ‘template<class T, class A> std::size_t boost::hash_value’ conflicts with a previous declaration
     std::size_t hash_value(std::list<T, A> const& v)
                                 ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:51:17: note: previous declaration ‘namespace boost { }::hash_value’
     std::size_t hash_value(std::complex<T> const&);
                 ^
/home/rincewnd/NEMO/xios-1.0/extern/boost/include/boost/functional/hash/extensions.hpp:69:28: error: reference to ‘list’ is ambiguous
     std::size_t hash_value(std::list<T, A> const& v)
...
...
...

And this is the first error from xios-2.0 trunk compilation:

mpicc -o attribute.o -I/home/rincewnd/NEMO/xios-2.0/inc -ansi -w -O3 -DBOOST_DISABLE_ASSERTS -I /usr/include -I /usr/include/hdf5/serial -I/home/rincewnd/NEMO/xios-2.0/extern/src_netcdf -I/home/rincewnd/NEMO/xios-2.0/extern/boost/include -I/home/rincewnd/NEMO/xios-2.0/extern/rapidxml/include -I/home/rincewnd/NEMO/xios-2.0/extern/blitz/include -c /home/rincewnd/NEMO/xios-2.0/src/attribute.cpp
In file included from /home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/functional/hash/hash.hpp:510:0,
                 from /home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/functional/hash.hpp:6,
                 from /home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/unordered/unordered_map.hpp:17,
                 from /home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/unordered_map.hpp:16,
                 from /home/rincewnd/NEMO/xios-2.0/src/xios_spl.hpp:30,
                 from /home/rincewnd/NEMO/xios-2.0/src/attribute.hpp:8,
                 from /home/rincewnd/NEMO/xios-2.0/src/attribute.cpp:1:
/home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:33: error: ‘template<class T, class A> std::size_t boost::hash_value’ conflicts with a previous declaration
     std::size_t hash_value(std::list<T, A> const& v);
                                 ^
/home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/functional/hash/extensions.hpp:36:17: note: previous declaration ‘namespace boost { }::hash_value’
     std::size_t hash_value(std::vector<T, A> const&);
                 ^
/home/rincewnd/NEMO/xios-2.0/extern/boost/include/boost/functional/hash/extensions.hpp:38:28: error: reference to ‘list’ is ambiguous
     std::size_t hash_value(std::list<T, A> const& v);
...
...
...

I tried this on Ubuntu 17.10 (gcc7), Ubuntu 16.04.3 LTS (gcc5), and Linux subsystem for Windows 10 (gcc6 maybe?) with same results (though I got somewhere something like did you mean fastRead_tv ? but never got such error on my work machine).

It would be nice if someone could point out what I did wrong. Because I am totally confused with this, since it feels like that it is the source code that is failing and not my environment... Or I am doing something totally wrong... But, here's my sequence of actions:

  1. checkout xios source code,
  2. edit (or copy and edit) arch-GCC_LINUX.env paths to conform with my hdf5 and netcdf dirs,
  3. change (or copy and change) gmake to make in arch-GCC_LINUX.fcm file,
  4. run ./make_xios --full --arch <my_linux_arch> --netcdf_lib netcdf4_seq (but tried with netcdf4_par as well),
  5. get lots of warnings like Use of uninitialized value within @all_fields in lc at /home/rincewnd/NEMO/xios-2.0/tools/FCM/bin/../lib/Fcm/CfgLine.pm line <some_line>. and warning: ignoring old recipe for target '<target>',
  6. get compilation errors, and then it all ends with Build failed on <datetime>.

Should I have done something else before launching make-xios?

Thank you in advance!

  • Message #34

    Hi Pavel,

    I'm not an expert of XIOS but, from a first search in the XIOS users mailing list (see mailman/listinfo.cgi/xios-users), I found some topics suggesting to add the option -D_GLIBCXX_USE_CXX11_ABI=0 to %BASE_CFLAGS.

    • '[XIOS-users] XIOS with Intel 2016 compiler'
    • '[XIOS-users] XIOS2 compilation issues with GCC 5.4.0'
    • '[XIOS-users] xios 2 compilation'

    Then you should address this issue through this mailing list as your problem relies only on XIOS.

    • Message #39

      Marked as solved without further updates.

Attachments

No attachments created.