MFiX 19.2 Installation Issues

MFiX 19.2 source tarball
Red Hat 7.6

When running the make command, I get the following “undefined reference” errors. Boost 1.68.0a is installed.

/cm/shared/apps/openmpi/gcc/64/1.10.7/bin/mpifort -O2 -g -O2 -g -DNDEBUG CMakeFiles/mfixsolver.dir/model/mfix.f.o -o mfixsolver model/libmfixcore.a model/cppmfix/libcppmfix.a /cm/local/apps/boost/1.68.0.a/lib64/libboost_filesystem.a /cm/local/apps/boost/1.68.0.a/lib64/libboost_regex.a /cm/local/apps/boost/1.68.0.a/lib64/libboost_system.a -lmpi_cxx -lstdc++
model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function path<boost::filesystem::directory_entry>': /usr/include/boost/filesystem/path.hpp:139: undefined reference to boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::string&, std::codecvt<wchar_t, char, __mbstate_t> const&)’
/usr/include/boost/filesystem/path.hpp:139: undefined reference to boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::string&, std::codecvt<wchar_t, char, __mbstate_t> const&)' model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function error_code’:
/usr/include/boost/system/error_code.hpp:315: undefined reference to boost::system::system_category()' model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function get_system_category’:
/usr/include/boost/asio/error.hpp:216: undefined reference to boost::system::system_category()' model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function error_code’:
/usr/include/boost/system/error_code.hpp:315: undefined reference to boost::system::system_category()' model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function get_system_category’:
/usr/include/boost/asio/error.hpp:216: undefined reference to boost::system::system_category()' /usr/include/boost/asio/error.hpp:216: undefined reference to boost::system::system_category()’
model/cppmfix/libcppmfix.a(cppmfix.cpp.o):/usr/include/boost/asio/error.hpp:216: more undefined references to boost::system::system_category()' follow model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function __static_initialization_and_destruction_0’:
/usr/include/boost/system/error_code.hpp:214: undefined reference to boost::system::generic_category()' /usr/include/boost/system/error_code.hpp:215: undefined reference to boost::system::generic_category()’
/usr/include/boost/system/error_code.hpp:216: undefined reference to boost::system::system_category()' model/cppmfix/libcppmfix.a(cppmfix.cpp.o): In function get_system_category’:
/usr/include/boost/asio/error.hpp:216: undefined reference to `boost::system::system_category()’

Could you post the full cmake and make commands you are using to build?

cmake3 … -DBOOST_ROOT=/cm/local/apps/boost -DENABLE_MPI=1 -DCMAKE_Fortran_COMPILER=mpifort -DMPI_Fortran_COMPILER=mpifort -DCMAKE_Fortran_FLAGS="-O2 -g" -DCMAKE_CXX_COMPILER=mpic++

make

Do you want to build the solver with interactive support (for use in the GUI)?

If you want the interactive solver, it is recommended to build with from the GUI or with the build_mfixsolver command included in the conda packages (rather than the source tarball).

If you don’t need the interactive solver, then you don’t need Boost or the -DBOOST_ROOT option. Make sure that the ENABLE_CPPMFIX option is not enabled. Clear your CMakeCache.txt (build in a fresh directory), then the build scripts shouldn’t mention Boost at all.

I do not wish to build with GUI support. Just add ENABLE_CPPMFIX=0 to my cmake command?

Yes, use -DENABLE_CPPMFIX=0 as a cmake option. (It ought to be off be default, but explicitly turning it off will make sure.)

That has resolved my issues. Thank you, sir!