From: Griffith, B. E. <bo...@em...> - 2017-11-15 06:23:28
|
We are running into a problem with errno and/or ENOMEM on an Ubuntu system using either Clang 3.8 or GCC 5.4, which are the compilers on whatever LTS version of Ubuntu is being used on this system. With clang, the error looks like: ========== make[2]: Entering directory '/srv/clang-sfw/linux/libmesh/1.2.0/objs-debug' CXX src/mesh/libmesh_dbg_la-exodusII_io_helper.lo In file included from ../LIBMESH/src/mesh/exodusII_io_helper.C:32: In file included from ./include/libmesh/system.h:30: In file included from ./include/libmesh/fem_function_base.h:29: In file included from ./include/libmesh/dense_vector.h:31: In file included from ../LIBMESH/contrib/eigen/eigen/Eigen/Dense:1: In file included from ../LIBMESH/contrib/eigen/eigen/Eigen/Core:256: ../LIBMESH/contrib/eigen/eigen/Eigen/src/Core/util/Memory.h:168:5: error: use of undeclared identifier '__errno_location'; did you mean 'exII::__errno_location'? errno = ENOMEM; // according to the standard ^ /usr/include/x86_64-linux-gnu/bits/errno.h:54:20: note: expanded from macro 'errno' # define errno (*__errno_location ()) ^ /usr/include/x86_64-linux-gnu/bits/errno.h:50:13: note: 'exII::__errno_location' declared here extern int *__errno_location (void) __THROW __attribute__ ((__const__)); ^ 1 error generated. Makefile:14763: recipe for target 'src/mesh/libmesh_dbg_la-exodusII_io_helper.lo' failed make[2]: *** [src/mesh/libmesh_dbg_la-exodusII_io_helper.lo] Error 1 CXX src/mesh/libmesh_dbg_la-nemesis_io_helper.lo In file included from ../LIBMESH/src/mesh/nemesis_io_helper.C:31: In file included from ./include/libmesh/numeric_vector.h:32: In file included from ./include/libmesh/dense_subvector.h:25: In file included from ./include/libmesh/dense_vector.h:31: In file included from ../LIBMESH/contrib/eigen/eigen/Eigen/Dense:1: In file included from ../LIBMESH/contrib/eigen/eigen/Eigen/Core:256: ../LIBMESH/contrib/eigen/eigen/Eigen/src/Core/util/Memory.h:168:5: error: use of undeclared identifier '__errno_location'; did you mean 'exII::__errno_location'? errno = ENOMEM; // according to the standard ^ /usr/include/x86_64-linux-gnu/bits/errno.h:54:20: note: expanded from macro 'errno' # define errno (*__errno_location ()) ^ /usr/include/x86_64-linux-gnu/bits/errno.h:50:13: note: 'exII::__errno_location' declared here extern int *__errno_location (void) __THROW __attribute__ ((__const__)); ^ 1 error generated. Makefile:14987: recipe for target 'src/mesh/libmesh_dbg_la-nemesis_io_helper.lo' failed ========== It looks like there is an attempt to work around this on some compilers (LIBMESH_COMPILER_HAS_BROKEN_ERRNO_T), but manually setting that flag to 1 did not seem to make any difference. This is with libMesh 1.2.0. Is there an easy workaround? Thanks! -- Boyce |