pdidev / pdi

The PDI Data Interface
https://pdi.dev
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

compile error with mpich (doesn't find .so?) #411

Closed jbigot closed 2 months ago

jbigot commented 2 years ago

In GitLab by @youldrouis on Feb 21, 2022, 16:08

Hi, I am getting a compile error on my pc.

[ 76%] Performing build step for 'MPI_PLUGIN_pkg'
[ 50%] Linking CXX shared module libpdi_mpi_plugin.so
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-mpidi_printf.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmpich.a(lib_libmpich_la-errutil.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[5]: *** [CMakeFiles/pdi_mpi_plugin.dir/build.make:109: libpdi_mpi_plugin.so] Error 1
make[4]: *** [CMakeFiles/Makefile2:95: CMakeFiles/pdi_mpi_plugin.dir/all] Error 2
make[3]: *** [Makefile:149: all] Error 2
make[2]: *** [CMakeFiles/MPI_PLUGIN_pkg.dir/build.make:131: MPI_PLUGIN/src/MPI_PLUGIN_pkg-stamp/MPI_PLUGIN_pkg-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:363: CMakeFiles/MPI_PLUGIN_pkg.dir/all] Error 2
make: *** [Makefile:149: all] Error 2 

This occured after a distrib upgrade, and my compiler also got upgraded at some point from 9.3.0 gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 MPICH Version: 3.4.1

3:19 julien's take is that it's trying to link against the .a lib while the .so is also available...

jbigot commented 2 years ago

It compiles on the compilation farm, is it still an issue on your side? What's your OS, environment, etc?

jbigot commented 2 years ago

In GitLab by @youldrouis on Mar 10, 2022, 11:41

Ok the failure was probably due to corrupt dependencies. It appeared after an OS upgrade, accompanied with a compiler update. Cleaning the environment and reinstalling mpich solved the problem.