# Error compiling XIOS-trunk for NEMO 4.2

**URL:** <https://nemo-ocean.discourse.group/t/error-compiling-xios-trunk-for-nemo-4-2/479>\
**Category:** v4.2.x\
**Tags:** XIOS\
**Created:** [12 April 2023 08:22 UTC](https://nemo-ocean.discourse.group/t/error-compiling-xios-trunk-for-nemo-4-2/479 "2023-04-12T08:22:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauzer83](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@mauzer83](https://nemo-ocean.discourse.group/u/mauzer83)\
**Post date:** [12 April 2023 08:22 UTC](https://nemo-ocean.discourse.group/t/error-compiling-xios-trunk-for-nemo-4-2/479/1 "2023-04-12T08:22:40Z")

</div>

Hello. I have a problems when trying to compile XIOS-trunk.  
With xios 2.5 have no problems. But how i can understand 2.5 not working with 4.2  
trying to compile with options

%NCDF\_INC -I$base/libraries/include  
%NCDF\_LIB -L$base/libraries/lib -lnetcdff -lnetcdf -lhdf5 -lcurl -lz -lsz  
%FC mpiifort  
%FCFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%FFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%LD mpiifort  
%FPPFLAGS -C -P -traditional  
%LDFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%AR ar  
%ARFLAGS -r  
%MK gmake  
%USER\_INC %NCDF\_INC\_DIR  
%USER\_LIB %NCDF\_LIB\_DIR

%MAKE gmake  
%BASE\_LD -lstdc++ -lifcore -lintlc  
%LINKER mpiifort -nofor-main -lifcore  
%BASE\_INC -D\_\_NONE\_\_  
%CCOMPILER mpiicc  
%FCOMPILER mpiifort  
%CPP cpp  
%FPP cpp -P

%BASE\_CFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%PROD\_CFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%DEV\_CFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%DEBUG\_CFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%BASE\_FFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%PROD\_FFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%DEV\_FFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib  
%DEBUG\_FFLAGS -O3 -g -traceback -xCORE-AVX2 -I$base/libraries/include -L$base/libraries/lib

and have errors “1”

when adding -std=c++11 option  
there are another errors “2”

Can you help me with this problem?

1. 

mpiicc -o intersection\_ym.o -DUSING\_NETCDF\_PAR -I/home/work/opt/fornemolibs-intel/xios-trunk/inc -O3 -g -traceback -xCORE-AVX2 -Iase/libraries/include -Lase/libraries/lib -O3 -g -traceback -xCORE-AVX2 -Iase/libraries/include -Lase/libraries/lib -I /home/work/opt/fornemolibs-intel/libraries/include -I /home/work/opt/fornemolibs-intel/libraries/include -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/boost -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/blitz -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/src\_netcdf -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/boost/include -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/rapidxml/include -I/home/work/opt/fornemolibs-intel/xios-trunk/extern/blitz/include -c /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp  
In file included from /usr/include/c++/4.8.5/array(35),  
from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(10):  
/usr/include/c++/4.8.5/bits/c++0x\_warning.h(32): error: #error directive: This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.  
#error This file requires compiler and library support for the   
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(18): error: namespace “std” has no member “tuple\_element”  
inline static typename std::tuple\_element\<I, T\>::type  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(18): error: expected an identifier  
inline static typename std::tuple\_element\<I, T\>::type  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(18): error: inline specifier allowed on function declarations only  
inline static typename std::tuple\_element\<I, T\>::type  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(18): error: expected a “;”  
inline static typename std::tuple\_element\<I, T\>::type  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(26): error: namespace “std” has no member “uint32\_t”  
template   
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(30): warning #3500: field initializers are a C++11 feature  
std::size\_t vertices = 0;  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(38): warning #3501: deleted functions are a C++11 feature  
Node(const Node&) = delete;  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(40): warning #3495: rvalue references are a C++11 feature  
Node(Node&&) = delete;  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(93): error: expected a “\>”  
template \<typename T, typename Alloc = std::allocator\>  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(93): error: mismatched delimiters in default argument expression  
template \<typename T, typename Alloc = std::allocator\>  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(128): error: expected a “,” or “\>”  
};  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(94): error: expected a “,” or “\>”  
class ObjectPool {  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(128): error: expected a declaration  
};  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(129): error: ObjectPool is not a template  
ObjectPool nodes;  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(63): error: identifier “nullptr” is undefined  
Node\* filterPoints(Node\* start, Node\* end = nullptr);  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(48): error: identifier “nullptr” is undefined  
Node\* prev = nullptr;  
^

In file included from /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(12):  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(770): error: identifier “uint32\_t” is undefined  
template   
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(28): error: identifier “N” is undefined  
using N = uint32\_t;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(28): error: expected a “;”  
using N = uint32\_t;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(29): error: identifier “Point” is undefined  
using Point = array\<double, 2\>;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(29): error: expected a “;”  
using Point = array\<double, 2\>;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(30): error: identifier “Point” is undefined  
vector vect\_points;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(31): error: identifier “Point” is undefined  
vector\< vector \> polyline;  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(66): error: identifier “array” is undefined  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(66): error: type name is not allowed  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(66): error: expected an expression  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(66): error #140: too many arguments in function call  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(73): error: identifier “N” is undefined  
vector indices\_a\_gno = mapbox::earcut(polyline);  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(73): error: identifier “N” is undefined  
vector indices\_a\_gno = mapbox::earcut(polyline);  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(73): error: no instance of function template “mapbox::earcut” matches the argument list  
argument types are: (std::vector\<std::vector\<, std::allocator\<\>\>, std::allocator\<std::vector\<, std::allocator\<\>\>\>\>)  
vector indices\_a\_gno = mapbox::earcut(polyline);  
^  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(771): note: this candidate was rejected because there is a type mismatch after argument substitution  
std::vector earcut(const Polygon& poly) {  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(97): error: identifier “array” is undefined  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(97): error: type name is not allowed  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(97): error: expected an expression  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(97): error #140: too many arguments in function call  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(104): error: “N” is not a type name  
vector indices\_b\_gno = mapbox::earcut(polyline);  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(104): error: no instance of function template “mapbox::earcut” matches the argument list  
argument types are: (std::vector\<std::vector\<, std::allocator\<\>\>, std::allocator\<std::vector\<, std::allocator\<\>\>\>\>)  
vector indices\_b\_gno = mapbox::earcut(polyline);  
^  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(771): note: this candidate was rejected because there is a type mismatch after argument substitution  
std::vector earcut(const Polygon& poly) {  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(190): error: identifier “array” is undefined  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(190): error: type name is not allowed  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(190): error: expected an expression  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(190): error #140: too many arguments in function call  
vect\_points.push\_back( array\<double, 2\>() );  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(206): error: “N” is not a type name  
vector indices = mapbox::earcut(polyline);  
^

/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp(206): error: no instance of function template “mapbox::earcut” matches the argument list  
argument types are: (std::vector\<std::vector\<, std::allocator\<\>\>, std::allocator\<std::vector\<, std::allocator\<\>\>\>\>)  
vector indices = mapbox::earcut(polyline);  
^  
/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/earcut.hpp(771): note: this candidate was rejected because there is a type mismatch after argument substitution  
std::vector earcut(const Polygon& poly) {  
^

/usr/include/c++/4.8.5/bits/vector.tcc(199): error: no instance of overloaded function “std::\_Destroy” matches the argument list  
argument types are: (, \_\_gnu\_cxx::\_\_normal\_iterator\< _, std::vector\<, std::allocator\<\>\>\>, std::allocator\<\>)  
std::\_Destroy(std::copy(\_\_x.begin(), \_\_x.end(), begin()),  
^  
/usr/include/c++/4.8.5/bits/stl\_construct.h(148): note: this candidate was rejected because at least one template argument could not be deduced  
\_Destroy(\_ForwardIterator \_\_first, \_ForwardIterator \_\_last,  
^  
/usr/include/c++/4.8.5/bits/stl\_construct.h(138): note: this candidate was rejected because at least one template argument could not be deduced  
\_Destroy(\_ForwardIterator \_\_first, \_ForwardIterator \_\_last,  
^  
/usr/include/c++/4.8.5/bits/stl\_construct.h(122): note: this candidate was rejected because mismatch in count of arguments  
\_Destroy(\_ForwardIterator \_\_first, \_ForwardIterator \_\_last)  
^  
/usr/include/c++/4.8.5/bits/stl\_construct.h(92): note: this candidate was rejected because mismatch in count of arguments  
\_Destroy(\_Tp_ \_\_pointer)  
^  
detected during:  
instantiation of “std::vector\<\_Tp, \_Alloc\> &std::vector\<\_Tp, \_Alloc\>::operator=(const std::vector\<\_Tp, \_Alloc\> &) [with \_Tp=, \_Alloc=std::allocator\<\>]” at line 335  
instantiation of “void std::vector\<\_Tp, \_Alloc\>::\_M\_insert\_aux(std::vector\<\_Tp, \_Alloc\>::iterator, const std::vector\<\_Tp, \_Alloc\>::value\_type &) [with \_Tp=std::vector\<, std::allocator\<\>\>, \_Alloc=std::allocator\<std::vector\<, std::allocator\<\>\>\>]” at line 913 of “/usr/include/c++/4.8.5/bits/stl\_vector.h”  
instantiation of “void std::vector\<\_Tp, \_Alloc\>::push\_back(const std::vector\<\_Tp, \_Alloc\>::value\_type &) [with \_Tp=std::vector\<, std::allocator\<\>\>, \_Alloc=std::allocator\<std::vector\<, std::allocator\<\>\>\>]” at line 72 of “/home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp”

compilation aborted for /home/work/opt/fornemolibs-intel/xios-trunk/extern/remap/src/intersection\_ym.cpp (code 2)  
fcm\_internal compile failed (512)  
gmake: \*\*\* [intersection\_ym.o] Error 1  
gmake -f /home/work/opt/fornemolibs-intel/xios-trunk/Makefile -j 1 all failed (2) at /home/work/opt/fornemolibs-intel/xios-trunk/tools/FCM\_OLD/bin/…/lib/Fcm/Build.pm line 597.  
Build failed on Wed Apr 12 09:57:48 2023.  
-\>Make: 17 seconds  
-\>TOTAL: 19 seconds

1. 

mpiifort -nofor-main -lifcore -o xios\_server.exe /home/work/opt/fornemolibs-intel/xios-trunk/obj/server\_main.o -L/home/work/opt/fornemolibs-intel/xios-trunk/lib -l\_\_fcm\_\_xios\_server -L /home/work/opt/fornemolibs-intel/libraries/lib -L /home/work/opt/fornemolibs-intel/libraries/lib -lnetcdff -lnetcdf -lcurl -lhdf5\_hl -lhdf5 -lz -lcurl -lstdc++ -lifcore -lintlc  
/home/work/opt/fornemolibs-intel/xios-trunk/lib/lib\_\_fcm\_\_xios\_server.a(server.o): In function `std::vector<std::string, std::allocator<std::string> >::vector<std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, void>(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::allocator<std::string> const&)': /usr/include/c++/4.8.5/bits/stl_vector.h:395: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/usr/include/c++/4.8.5/bits/stl\_vector.h:395: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o): In function `void std::vector\<std::string, std::allocatorstd::string \>::\_M\_initialize\_dispatch\<std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> \>(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::\_\_false\_type)‘:  
/usr/include/c++/4.8.5/bits/stl\_vector.h:1177: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /usr/include/c++/4.8.5/bits/stl_vector.h:1177: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/home/work/opt/fornemolibs-intel/xios-trunk/lib/lib\_\_fcm\_\_xios\_server.a(server.o): In function `void std::vector<std::string, std::allocator<std::string> >::_M_range_initialize<std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > >(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::forward_iterator_tag)': /usr/include/c++/4.8.5/bits/stl_vector.h:1200: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/home/work/opt/fornemolibs-intel/xios-trunk/lib/lib\_\_fcm\_\_xios\_server.a(server.o):/usr/include/c++/4.8.5/bits/stl\_vector.h:1200: more undefined references to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' follow /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o): In function `std::iterator\_traits\<std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> \>::difference\_type std::\_\_distance\<std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> \>(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::input\_iterator\_tag)‘:  
/usr/include/c++/4.8.5/bits/stl\_iterator\_base\_funcs.h:80: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator!=(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /usr/include/c++/4.8.5/bits/stl_iterator_base_funcs.h:82: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::operator++()’  
/usr/include/c++/4.8.5/bits/stl\_iterator\_base\_funcs.h:80: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator!=(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o): In function `void std::vector\<std::string, std::allocatorstd::string \>::\_M\_range\_initialize\<std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> \>(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::forward\_iterator\_tag)‘:  
/usr/include/c++/4.8.5/bits/stl\_vector.h:1204: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /usr/include/c++/4.8.5/bits/stl_vector.h:1204: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/home/work/opt/fornemolibs-intel/xios-trunk/lib/lib\_\_fcm\_\_xios\_server.a(server.o): In function `std::string* std:: __uninitialized_copy_a<std::regex_token_iterator<__ gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::string*, std::string>(std::regex_token_iterator<__gnu_cxx:: __normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator<__ gnu_cxx::__normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::string*, std::allocator<std::string>&)': /usr/include/c++/4.8.5/bits/stl_uninitialized.h:258: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/usr/include/c++/4.8.5/bits/stl\_uninitialized.h:258: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o): In function `std::string\* std::uninitialized\_copy\<std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::string\*\>(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>, std::string\*)‘:  
/usr/include/c++/4.8.5/bits/stl\_uninitialized.h:117: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o):/usr/include/c++/4.8.5/bits/stl_uninitialized.h:117: more undefined references to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’ follow  
/home/work/opt/fornemolibs-intel/xios-trunk/lib/lib\_\_fcm\_\_xios\_server.a(server.o): In function `std::string* std:: __uninitialized_copy<false>::__ uninit_copy<std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::string*>(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >, std::string*)': /usr/include/c++/4.8.5/bits/stl_uninitialized.h:74: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::operator!=(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
/usr/include/c++/4.8.5/bits/stl\_uninitialized.h:75: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator*()' /usr/include/c++/4.8.5/bits/stl_uninitialized.h:74: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::operator++()’  
/usr/include/c++/4.8.5/bits/stl\_uninitialized.h:74: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::operator!=(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/lib/lib __fcm__ xios_server.a(server.o): In function `xios::splitRegex(std::string const&, std::string const&)‘:  
/home/work/opt/fornemolibs-intel/xios-trunk/src/string\_tools.hpp:17: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator( __gnu_cxx::__ normal_iterator<char const*, std::string>, __gnu_cxx::__ normal_iterator<char const*, std::string>, std::basic_regex<char, std::regex_traits<char> > const&, int, std::bitset<11ul>)' /home/work/opt/fornemolibs-intel/xios-trunk/src/string_tools.hpp:18: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator()’  
/home/work/opt/fornemolibs-intel/xios-trunk/src/string\_tools.hpp:19: undefined reference to `std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> >::regex_token_iterator(std::regex_token_iterator< __gnu_cxx::__ normal_iterator<char const*, std::string>, char, std::regex_traits<char> > const&)' /home/work/opt/fornemolibs-intel/xios-trunk/src/string_tools.hpp:19: undefined reference to `std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \>::regex\_token\_iterator(std::regex\_token\_iterator\<\_\_gnu\_cxx::\_\_normal\_iterator\<char const\*, std::string\>, char, std::regex\_traits \> const&)’  
fcm\_internal load failed (256)  
gmake: \*\*\* [xios\_server.exe] Error 1  
gmake -f /home/work/opt/fornemolibs-intel/xios-trunk/Makefile -j 1 all failed (2) at /home/work/opt/fornemolibs-intel/xios-trunk/tools/FCM\_OLD/bin/…/lib/Fcm/Build.pm line 597.  
Build failed on Wed Apr 12 10:30:39 2023.  
-\>Make: 1674 seconds  
-\>TOTAL: 1675 seconds

---

<div class="post-metadata">

**Author:** ![Samar](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Samar](https://nemo-ocean.discourse.group/u/Samar)\
**Post date:** [30 April 2023 15:41 UTC](https://nemo-ocean.discourse.group/t/error-compiling-xios-trunk-for-nemo-4-2/479/3 "2023-04-30T15:41:06Z")

</div>

Hi, I ran into somewhat similar problems. It turned out that I had a very old gcc (4.8.5) which did not fully support regex (amongst other things). From your error messages it seems you also have 4.8.5. I tried building an older version of boost (a prerequisite for xios) which came with its own regex but xios wants the routines from stdc++. This may not resolve all the errors but at the very least you’ll need a newer gcc. Hope that helps.
