samedi 2 novembre 2019

Compiler doesn't see -fPIC

I have some files for which I run ./configure --fastjet-config=$PWD/../fastjet-3.3.2/fastjet-config --only=Nsubjettiness CXXFLAGS=-fPIC, then make on this file:

makePyLib: NsubjettinessWrapper.i NsubjettinessWrapper.cc
        swig3.0 -c++ -python NsubjettinessWrapper.i
        g++ -std=c++11 -fPIC -c NsubjettinessWrapper.cc  NsubjettinessWrapper_wrap.cxx `python3-config --cflags`  `./fastjet-config --cxxflags --libs --plugins` -lNsubjettiness\
 -I.
        g++ -std=c++11 -fPIC -shared NsubjettinessWrapper.o NsubjettinessWrapper_wrap.o `./fastjet-config --libs --plugins` -lNsubjettiness -o _NsubjettinessWrapper.so

.PHONY: clean

clean:
        rm -rf *.so *.o NsubjettinessWrapper_wrap.cxx NsubjettinessWrapper.py

but I am getting this error:

relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC

Can someone help me fix it? Thank you!

Aucun commentaire:

Enregistrer un commentaire