I am trying to build the image program darktable 1.6.7 from source on Ubuntu 12.04 LTS. I am following the instructions here. There is an error at around 85% that I do not know how to interpret:
Linking C shared module libgrain.so
/usr/bin/ld: CMakeFiles/grain.dir/introspection_grain.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
CMakeFiles/grain.dir/introspection_grain.c.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/iop/libgrain.so] Error 1
make[1]: *** [src/iop/CMakeFiles/grain.dir/all] Error 2
I don't know where to pass -fPIC
as it is suggesting. I have also read that --enable-shared
should be passed to ./configure
, but in this case there is no ./configure
file and I don't know what the comparable step is here. Any help understanding and resolving this error would be appreciated!
I figured this out, it was pretty trivial. Instead of using the cmake call suggested on the darktable site I linked to, I used ccmake to configure and generate. It automatically filled in the C flag -fPIC
where it needed to be. Then it built perfectly.