Page 1 of 1

Error building source on Ubuntu

Posted: 2019-09-04T16:36:48-07:00
by Tomasso
I've downloaded source for IM v 7.0.8-63 to my machine running Ubuntu 18.04.2. Per instructions at https://imagemagick.org/script/install-source.php I run ./configure then make, but make generates multiple errors like these:

Code: Select all

/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/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
What is the solution? If I should build with the -fPIC flag, how do I run configure and make to do that?
I tried the 'make CXXFLAGS='-g -O2 -w -fPIC'' (i.e. compile with the -fPIC flag) but get exactly the same "relocation R_X86_64_32" error.