• Ludovic Courtès's avatar
    externals: Build PIC for NlOpt and IpOpt. · 18f828bf
    Ludovic Courtès authored
    This fixes a bug on x86_64-linux-gnu whereby libnlopt.a would contain
    non-PIC code, leading to a link failure when building shared objects:
      g++ -o sources/build/libnonlinear_fitter_nlopt.so -shared sources/plugins/nonlinear_fitter_nlopt/fitter.os -Lexternal/build/lib -Lsources/build -Lexternal/build/lib -ldl -lrt -lnlopt -lm -lcore
      ld: external/build/lib/libnlopt.a(optimize.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
      external/build/lib/libnlopt.a: error adding symbols: Bad value
      collect2: error: ld returned 1 exit status
obtain_nlopt.py 1.31 KB