Describe the bug
Where I tried to install openPMD-api from pip installing via pip install git+https://github.com/openPMD/openPMD-api.git@dev or from source, I got the error:
Linking CXX shared library ../lib.linux-x86_64-3.6/libopenPMD.ADIOS1.Serial.so
/usr/bin/ld: /usr/local/lib/libadios_nompi.a(libadios_nompi_a-adios.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
To Reproduce
pip install git+https://github.com/openPMD/openPMD-api.git@dev
Software Environment
I use lastest pip 19.1.1, ADIOS 1.13.1, and latest openPMD-api-dev (d0fa923)
Hi Ksenia,
thank you for the report!
How did you install ADIOS1? Looks to me like it lacks the -fPIC flag. This is how you need to install ADIOS1 if you build it from source: install example
Thanks, Axel
yes, I have installed ADIOS1. at least everything worked with my previous version openPMD-api(d68e9fc2) maybe, I should reinstall ADIOS1 and it will be helpful?
Yes, if you installed ADIOS1 yourself make sure to add -fPIC to the configuration step as linked above:
curl -Lo adios-1.13.1.tar.gz http://users.nccs.gov/~pnorbert/adios-1.13.1.tar.gz
tar -xzf adios-1.13.1.tar.gz
cd adios-1.13.1
CFLAGS="-fPIC" ./configure --enable-static --enable-shared --prefix=$HOME/sw/adios \
--with-mpi=$MPI_ROOT --with-zlib=$HOME/sw/zlib --with-blosc=$HOME/sw/c-blosc
make
make install
# note: assumes you set MPI_ROOT and installed zlib and c-blosc in $HOME/sw first
Environment hints after install:
export ADIOS_ROOT=$HOME/sw/adios
export PATH=$ADIOS_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$ADIOS_ROOT/lib:$LD_LIBRARY_PATH
Hi Ksenia,
I just released a 0.10.2-alpha release #637 that also contains the fix from #635 to aide you.
You can just install the pre-compiled python wheel as usual via
python3 -m pip install --upgrade openpmd-api
that contains the ADIOS1 backend (and HDF5 and ADIOS2) compiled-in :)
Hi, Axel, new release helped me, now I installed openPMD-api successfuly, thank you.
Awesome, please do not hesitate to tell how this works for you with regards to the read issue you experienced earlier.
Most helpful comment
Yes, if you installed ADIOS1 yourself make sure to add
-fPICto the configuration step as linked above:Environment hints after install: