← Back to team overview

yade-dev team mailing list archive

Re: General assistance

 

> Just an additional note on the previous message.  I noticed '-fPIC' is already is in the SHCCFLAGS.  I added '-fPIC' to CXXFLAGS too.  But I still got the error.
> 
> Previous message:
>  But then I got this error:
>  /usr/bin/ld: /usr/local/lib/libopt.a(NLP2.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
>  /usr/local/lib/libopt.a: could not read symbols: Bad value
>  collect2: ld returned 1 exit status
>  scons: *** [/home/chiab/yadeNew/build-b6/extra/libCWBoonPlugin2.so] Error 1
>  scons: building terminated because of errors.
That error really concerns libopt.a. You're trying to link static
library (libopt.a) into dynamically-loaded (yourPLugin.so) library,
which will not work (IIRC) unless (a) the .a is recompiled with -fPIC,
or (b) you compile shared library libopt.so (that will be compiled with
-fPIC, too), which will be loaded by your plugin at runtime.

Cheers, vaclav






Follow ups

References