Errors installing MEEP in CentOS 7

0

I was trying to install MEEP in CentOS 7 environment while I encountered a couple errors.

Basically, I followed the steps in https://meep.readthedocs.io/en/latest/Build_From_Source/#centos-7

For meep only, it is instructed to be installed using the commands:

cd ~/install
git clone https://github.com/NanoComp/meep.git
cd meep/
sh autogen.sh --enable-shared --with-mpi --with-openmp PYTHON=python3 MPICC=/usr/local/bin/mpicc MPICXX=/usr/local/bin/mpic++ LDFLAGS="${MY_LDFLAGS}" CPPFLAGS="${MY_CPPFLAGS}"
make -j
sudo make install

While configure didn't give me any error, I got these when I started make -j:

make  all-recursive
make[1]: Entering directory `/root/install/meep'
Making all in src
make[2]: Entering directory `/root/install/meep/src'
make sphere_quad
(echo "/* This file was automatically generated --- DO NOT EDIT */"; echo; sed 's/LOOP_OVER/S1LOOP_OVER/g' ../src/step_generic.cpp | sed 's/step_curl/step_curl_stride1/' | sed 's/step_update_EDHB/step_update_EDHB_stride1/' | sed 's/step_beta/step_beta_stride1/') > step_generic_stride1.cpp
make[3]: Entering directory `/root/install/meep/src'
  CXX      sphere-quad.o
  CXXLD    sphere_quad
make[3]: Leaving directory `/root/install/meep/src'
(echo "/* This file was automatically generated --- DO NOT EDIT */"; echo; ../src/sphere_quad) > sphere-quad.h
../src/sphere_quad: error while loading shared libraries: libmpich.so.10: cannot open shared object file: No such file or directory
make[2]: *** [sphere-quad.h] Error 127
make[2]: Leaving directory `/root/install/meep/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/install/meep'
make: *** [all] Error 2

Please let me know if anyone has an idea what might be the cause of the issue. Thanks a lot!

I just appended the path with the below command and I didn't see the error again.

export LD_LIBRARY_PATH=/usr/lib64/mpich/lib:$LD_LIBRARY_PATH

However, now I am having a different error...

mympi.cpp: In function 'void meep::abort(const char*, ...)':
mympi.cpp:131:74: error: 'runtime_error' was not declared in this scope
   if (count_processors() == 1) { throw runtime_error("meep: " + error_msg); }
                                                                          ^
monitor.cpp: In member function 'double meep::fields::get_field(meep::derived_component, const meep::vec&, bool) const':
monitor.cpp:125:1: warning: control reaches end of non-void function [-Wreturn-type]

Well.. After the gcc compiler updated, the above error was again solved. But now I am having additional bunch of errors... Part of them copied here.

/usr/local/lib/libfftw3.a(direct-r2c.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: /usr/local/lib/libfftw3.a(direct-r2r.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: /usr/local/lib/libfftw3.a(direct2.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: /usr/local/lib/libfftw3.a(hc2hc-direct.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[4]: *** [libmeep.la] Error 1
make[4]: Leaving directory `/root/install/meep/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/install/meep/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/install/meep/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/install/meep'
make: *** [all] Error 2

user1068984

Posted 2019-07-29T18:21:46.903

Reputation: 1

No answers