Happy new year to all,
The Oyranos project has some plugins, which work as shared libraries. These libraries need to link in libraw.a, in order to use the LibRaw functionality for conversion and ICC profile assignment.
However on 64-bit machines the gcc compiler says:
linux/bin/ld: /usr/lib64/libraw.a(lib_libraw_a-libraw_cxx.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
The issue is nicely described here:
Ideally the gcc -fPIC option would be added on 64-bit builds during configure.
LibRaw is specially built as
LibRaw is specially built as static (not dynamic) library under unix systems because ABI is changed frequently and there is no way to translate ABI of one version into data layout of another one.
However, it is possible to specify CFLAGS/CXXFLAGS/LDFLAGS on ./configure call.
-- Alex Tutubalin @LibRaw LLC
Confirmed, the CFLAGS
Confirmed, the CFLAGS approach works. Even though its needs some manual intervention.
I hope to can make the openSUSE package using this compiler flag. Thanks for the reply.