cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
22 stars 9 forks source link

Instalation error #11

Closed manuelrocamora closed 3 years ago

manuelrocamora commented 3 years ago

Hi, I have some problems when installing HERMES. When I do the "CMAKE_PREFIX_PATH=$HERMES_DIR cmake -DCMAKE_INSTALL_PREFIX=$HERMES_DIR -DENABLE_TESTING=On .." I get a warning:

CMake Warning at lib/gtest/googletest/CMakeLists.txt:47 (project): VERSION keyword not followed by a value or was followed by a value that expanded to nothing.

But it still works. Then, when I do the "make -j" I get an error:

/usr/bin/ld: /usr/local/lib/libfftw3f.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile con -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/hermes.dir/build.make:886: libhermes.so] Error 1 make[1]: [CMakeFiles/Makefile2:646: CMakeFiles/hermes.dir/all] Error 2

What could I do? I am in Ubuntu 20.04

Thank you in advance.

carmeloevoli commented 3 years ago

Thanks for informing us about the warning. We will fix it in the next release.

adundovi commented 3 years ago

Hi! Try to link it with the dynamic FFTW3 library (ending with .so), not static (ending with .a). For example: -DFFTW3F_LIBRARIES=/path/to/library/../libfftw3f.so. It looks like you have a locally-built FFTW (without -fPIC) - you should use the one from the repository.

adundovi commented 3 years ago

Thanks for informing us about the warning. We will fix it in the next release.

Which compiler version are you using for C++?

I don't think it is an issue from our side. CMake found a locally-built FFTW (inside of /usr/local/) which is obviously compiled incorrectly for the linkage with other sources (without -fPIC). Hence, the user should either use: an official repository version of FFTW (recommended, and well tested), or recompile a local FFTW with the -fPIC option present.

manuelrocamora commented 3 years ago

Thanks for informing us about the warning. We will fix it in the next release. Which compiler version are you using for C++?

I don't think it is an issue from our side. CMake found a locally-built FFTW (inside of /usr/local/) which is obviously compiled incorrectly for the linkage with other sources (without -fPIC). Hence, the user should either use: an official repository version of FFTW (recommended, and well tested), or recompile a local FFTW with the -fPIC option present.

I had downloaded the package from http://www.fftw.org/ and compiled it following their guide. I have just recompiled it with --enable-shared=yes and it works correctly now. Thank you very much!!