How can I set ccshared=-fPIC while executing ./configure?
The following worked for me when I ran into this error:
make clean
./configure CFLAGS=-fPIC CXXFLAGS=-fPIC
Run configure with --enable-shared
. Then -fPIC
will be included as part of the shared flags.
I got it working by adding -fPIC
after CC= gcc -pthread
,
i.e CC= gcc -pthread -fPIC
in the Makefile.