[Bro-Dev] Compile errors

Jonathan Siwek jsiwek at ncsa.illinois.edu
Fri Feb 18 13:05:33 PST 2011


> > Linking CXX shared module _SubnetTree.so
> > /usr/bin/ld: /prereq/Python-2.6.2/lib/libpython2.6.a(abstract.o):
> > relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
> > making a shared object; recompile with -fPIC

There's a few different cases where you can get an error like this, but I think the situation you're in is that you're building a shared library on an AMD64 architecture which are required to be PIC-enabled, but you're linking to a static archive which was not built with the -fPIC flag.

> The Python-2.6.2 that I am using is the only version of python I have available on this particular build target.

Here's what I would probably do:

1) Search around a bit to make sure there really isn't a libpython2.6.so (shared library version) that you can link against
2) Inquire with NMI support about whether libpython2.6.a is indeed built wrong (without the -fPIC flag) and ask if they can fix it if it is
3) Do your own build of Python and compile Bro against that

- Jon


More information about the bro-dev mailing list