Error while linking with statically compiled OpenDDS / ACE

609 views Asked by At

I have got an issue while I was building my project under GNU/Linux Ubuntu 16.04 using ninja-build. When linking with OpenDDS 3.9 and more precisely with libACE.a I got this error :

/usr/bin/ld: ../../thirdparty/OpenDDS/ACE_wrappers/lib/libACE.a(Base_Thread_Adapter.o): relocation R_X86_64_32 against `_ZTV23ACE_Base_Thread_Adapter' can not be used when making a shared object; recompile with -fPIC
../../thirdparty/OpenDDS/ACE_wrappers/lib/libACE.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I have builded OpenDDS (and ACE) as a static libraries. I have used the following command lines to configure and build OpenDDS :

./configure --no-debug --static --verbose
sudo bash ./setenv.sh
make

It tells to recompile with the -fPIC argument, I have not succeeded to find a way to re-build OpenDDS and ACE using this option, how I could do it ?

Thanks !

0

There are 0 answers