Error compiling from source with libfftw libraries

274 views
Skip to first unread message

Jacob Weaver

unread,
Sep 15, 2016, 11:58:57 AM9/15/16
to EMAN2
Hello,

Thanks for making a great package and being helpful in general.

I'm trying to compile from source and keep getting this error:

[ 63%] Linking CXX shared library ../lib/libEM2.so
/usr/bin/ld: /usr/local/lib/libfftw3.a(apiplan.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libfftw3.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
libEM/CMakeFiles/EM2.dir/build.make:2263: recipe for target 'lib/libEM2.so' failed
make[2]: *** [lib/libEM2.so] Error 1
CMakeFiles/Makefile2:205: recipe for target 'libEM/CMakeFiles/EM2.dir/all' failed
make[1]: *** [libEM/CMakeFiles/EM2.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2


I tried to go back and recompile fftw libraries from source making sure to install with single precision and enable sharing but I can't seem to fix this. 

Has anyone encountered something similar?

Thanks,

Jacob Weaver

Steve Ludtke

unread,
Sep 15, 2016, 12:07:14 PM9/15/16
to em...@googlegroups.com
Are you compiling from current GitHub source or using an older source release?  A few weeks ago SPARX added some use of double-precision FFT, so when building from source, both single and double precision FFTW libraries must be compiled. Also, it should be linking to a .so file rather than the static .a library.


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob Weaver

unread,
Sep 15, 2016, 12:16:09 PM9/15/16
to EMAN2
I'm compiling from the GitHub source. I'll recompile FFTW libraries with double precision and link to the .so library and see how that goes.

Thanks
Reply all
Reply to author
Forward
0 new messages