BradGreig / Hybrid21CM

1 stars 3 forks source link

docs: clarity about installing fftw #24

Closed steven-murray closed 5 years ago

steven-murray commented 5 years ago

I've heard reports now twice of the following error:

/usr/bin/ld: //usr/local/lib/libfftw3f.a(export-wisdom-to-file.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    //usr/local/lib/libfftw3f.a: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

This has been fixed by ensuring that FFTW is installed with --enable-shared (it's also been reported that on Ubuntu, the libfftw3-dev library needs to be installed, which may not be obvious).

I propose making it more clear in the docs that this is the case. This issue should somewhat serve that purpose as well.

BradGreig commented 5 years ago

Hmm, this is interesting. These are relatively non standard install options. It just so happens that I have these installed, from compiling the 21cmFAST driver for 21CMMC as a shared object.

I seem to remember that there was an issue with one of the .so fftwf3 objects not being linked/installed properly and I had to go and manually create the symbolic link. Hopefully that was fixed.

steven-murray commented 5 years ago

I added an installation_faq.rst file where we can answer problems like this that crop up, in 1db4ef5b609ebaba977f2853ee0fa30899602ede. I added this answer to that file.