Cannot install Ibex-2.1.16 as shared lib

Forums:

 
 
 
Hi all,
I'm Clément Aubry, PhD in underwater robotics now in post-doc at ENSTA Bretagne.
I find an excuse to install Ibex as a shared library on my laptop. I follow the doc to install soplex as shared and ibex as shared with soplex absolute path but I encountered an error during sudo ./waf install.
Please find here the steps I follow : 
<code>
z$ cd /home/clement/ENSTABZH/Ibex

z$ ll

total 19M

-rw-r----- 1 clement clement  18M juil.  7 15:16 ibex-2.1.16.tar.gz

-rw-r----- 1 clement clement 649K juil.  7 15:57 soplex-1.7.2.tgz

z$ tar xvfz soplex-1.7.2.tgz

z$ cd soplex-1.7.2/

z$ make SHARED=true ZLIB=false

z$ cd ..

z$ tar xvfz ibex-2.1.16.tar.gz 

z$ cd ibex-2.1.16/

z$ ./waf configure --enable-shared --with-soplex=/home/clement/ENSTABZH/Ibex/soplex-1.7.2

Ibex/soplex-1.7.2

Setting top to                           : /home/clement/ENSTABZH/Ibex/ibex-2.1.16 

Setting out to                           : /home/clement/ENSTABZH/Ibex/ibex-2.1.16/__build__ 

Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 

Checking for 'gcc' (c compiler)          : /usr/bin/gcc 

Checking for program bison               : /usr/bin/bison 

Checking for program flex                : /usr/bin/flex 

Checking for compiler flags -O3          : yes 

Checking for compiler flags -Wno-deprecated : yes 

Checking for header interval/interval.hpp   : yes 

Checking for library ['prim']               : yes 

The Interval arithmetic is the installed version of FILIP 

Candidate directory for lib Soplex          : /home/clement/ENSTABZH/Ibex/soplex-1.7.2 

Checking for header soplex.h                : yes 

Checking for library soplex                 : yes 

'configure' finished successfully (1.715s)

$z sudo ./waf install

[...]

[167/169] cxx: src/parser/ibex_ParserSource.cpp -> __build__/src/parser/ibex_ParserSource.cpp.3.o

[168/169] cxxshlib: __build__/src/arithmetic/ibex_Affine2_No.cpp.3.o __build__/src/arithmetic/ibex_Affine2_fAF1.cpp.3.o __build__/src/arithmetic/ibex_Affine2_fAF2.cpp.3.o __build__/src/arithmetic/ibex_Affine2_fAF2_fma.cpp.3.o __build__/src/arithmetic/ibex_Affine2_fAFFullI.cpp.3.o __build__/src/arithmetic/ibex_Affine2_iAF.cpp.3.o __build__/src/arithmetic/ibex_Affine2_sAF.cpp.3.o __build__/src/arithmetic/ibex_Dim.cpp.3.o __build__/src/arithmetic/ibex_InnerArith.cpp.3.o __build__/src/arithmetic/ibex_Interval.cpp.3.o __build__/src/arithmetic/ibex_IntervalMatrix.cpp.3.o __build__/src/arithmetic/ibex_IntervalMatrixArray.cpp.3.o __build__/src/arithmetic/ibex_IntervalVector.cpp.3.o __build__/src/arithmetic/ibex_Matrix.cpp.3.o __build__/src/arithmetic/ibex_MatrixArray.cpp.3.o __build__/src/arithmetic/ibex_SetMembership.cpp.3.o __build__/src/arithmetic/ibex_Tube.cpp.3.o __build__/src/arithmetic/ibex_Vector.cpp.3.o __build__/src/bisector/ibex_Bsc.cpp.3.o __build__/src/bisector/ibex_LargestFirst.cpp.3.o __build__/src/bisector/ibex_RoundRobin.cpp.3.o __build__/src/bisector/ibex_SmearFunction.cpp.3.o __build__/src/cliquer/cl.cpp.3.o __build__/src/cliquer/cliquer.cpp.3.o __build__/src/cliquer/graph.cpp.3.o __build__/src/cliquer/reorder.cpp.3.o __build__/src/combinatorial/ibex_QInter.cpp.3.o __build__/src/combinatorial/ibex_QInter2.cpp.3.o __build__/src/combinatorial/ibex_QInterEx_Cliquer.cpp.3.o __build__/src/combinatorial/ibex_QInter_coreF.cpp.3.o __build__/src/combinatorial/ibex_QInter_projF.cpp.3.o __build__/src/contractor/ibex_Ctc.cpp.3.o __build__/src/contractor/ibex_Ctc3BCid.cpp.3.o __build__/src/contractor/ibex_CtcAcid.cpp.3.o __build__/src/contractor/ibex_CtcCompo.cpp.3.o __build__/src/contractor/ibex_CtcEmpty.cpp.3.o __build__/src/contractor/ibex_CtcExist.cpp.3.o __build__/src/contractor/ibex_CtcFixPoint.cpp.3.o __build__/src/contractor/ibex_CtcForAll.cpp.3.o __build__/src/contractor/ibex_CtcFwdBwd.cpp.3.o __build__/src/contractor/ibex_CtcHC4.cpp.3.o __build__/src/contractor/ibex_CtcIdentity.cpp.3.o __build__/src/contractor/ibex_CtcInteger.cpp.3.o __build__/src/contractor/ibex_CtcInverse.cpp.3.o __build__/src/contractor/ibex_CtcMohc.cpp.3.o __build__/src/contractor/ibex_CtcNewton.cpp.3.o __build__/src/contractor/ibex_CtcNotIn.cpp.3.o __build__/src/contractor/ibex_CtcOptimShaving.cpp.3.o __build__/src/contractor/ibex_CtcPixelMap.cpp.3.o __build__/src/contractor/ibex_CtcPolytopeHull.cpp.3.o __build__/src/contractor/ibex_CtcPropag.cpp.3.o __build__/src/contractor/ibex_CtcQInter.cpp.3.o __build__/src/contractor/ibex_CtcQuantif.cpp.3.o __build__/src/contractor/ibex_CtcUnion.cpp.3.o __build__/src/function/ibex_Affine2Eval.cpp.3.o __build__/src/function/ibex_AffineLinEval.cpp.3.o __build__/src/function/ibex_CompiledFunction.cpp.3.o __build__/src/function/ibex_Decorator.cpp.3.o __build__/src/function/ibex_Eval.cpp.3.o __build__/src/function/ibex_Fnc.cpp.3.o __build__/src/function/ibex_Function.cpp.3.o __build__/src/function/ibex_Gradient.cpp.3.o __build__/src/function/ibex_HC4Revise.cpp.3.o __build__/src/function/ibex_InHC4Revise.cpp.3.o __build__/src/function/ibex_NumConstraint.cpp.3.o __build__/src/geometry/ibex_CtcSegment.cpp.3.o __build__/src/geometry/ibex_PdcInPolygon.cpp.3.o __build__/src/geometry/ibex_SepPolygon.cpp.3.o __build__/src/numeric/ibex_Linear.cpp.3.o __build__/src/numeric/ibex_LinearRelax.cpp.3.o __build__/src/numeric/ibex_LinearRelaxAffine2.cpp.3.o __build__/src/numeric/ibex_LinearRelaxCombo.cpp.3.o __build__/src/numeric/ibex_LinearRelaxFixed.cpp.3.o __build__/src/numeric/ibex_LinearRelaxXTaylor.cpp.3.o __build__/src/numeric/ibex_LinearSolver.cpp.3.o __build__/src/numeric/ibex_Newton.cpp.3.o __build__/src/parser/ibex_AmplInterface.cpp.3.o __build__/src/parser/ibex_ConstantGenerator.cpp.3.o __build__/src/parser/ibex_CtrGenerator.cpp.3.o __build__/src/parser/ibex_Entity.cpp.3.o __build__/src/parser/ibex_MainGenerator.cpp.3.o __build__/src/parser/ibex_P_Expr.cpp.3.o __build__/src/parser/ibex_P_ExprGenerator.cpp.3.o __build__/src/parser/ibex_P_ExprPrinter.cpp.3.o __build__/src/parser/ibex_P_NumConstraint.cpp.3.o __build__/src/parser/ibex_ParserSource.cpp.3.o __build__/src/parser/ibex_Scope.cpp.3.o __build__/src/parser/ibex_SyntaxError.cpp.3.o __build__/src/predicate/ibex_BoolInterval.cpp.3.o __build__/src/predicate/ibex_PdcAnd.cpp.3.o __build__/src/predicate/ibex_PdcCleared.cpp.3.o __build__/src/predicate/ibex_PdcDiameterLT.cpp.3.o __build__/src/predicate/ibex_PdcFirstOrder.cpp.3.o __build__/src/predicate/ibex_PdcFwdBwd.cpp.3.o __build__/src/predicate/ibex_PdcHansenFeasibility.cpp.3.o __build__/src/predicate/ibex_PdcImageSubset.cpp.3.o __build__/src/predicate/ibex_PdcNo.cpp.3.o __build__/src/predicate/ibex_PdcNot.cpp.3.o __build__/src/predicate/ibex_PdcOr.cpp.3.o __build__/src/predicate/ibex_PdcYes.cpp.3.o __build__/src/set/ibex_Sep.cpp.3.o __build__/src/set/ibex_SepBoundaryCtc.cpp.3.o __build__/src/set/ibex_SepCtcPair.cpp.3.o __build__/src/set/ibex_SepFwdBwd.cpp.3.o __build__/src/set/ibex_SepInter.cpp.3.o __build__/src/set/ibex_SepNot.cpp.3.o __build__/src/set/ibex_SepUnion.cpp.3.o __build__/src/set/ibex_Set.cpp.3.o __build__/src/set/ibex_SetBisect.cpp.3.o __build__/src/set/ibex_SetInterval.cpp.3.o __build__/src/set/ibex_SetLeaf.cpp.3.o __build__/src/set/ibex_SetNode.cpp.3.o __build__/src/set/ibex_SetValueNode.cpp.3.o __build__/src/strategy/ibex_Backtrackable.cpp.3.o __build__/src/strategy/ibex_Cell.cpp.3.o __build__/src/strategy/ibex_CellBuffer.cpp.3.o __build__/src/strategy/ibex_CellCostFunc.cpp.3.o __build__/src/strategy/ibex_CellStack.cpp.3.o __build__/src/strategy/ibex_DefaultOptimizer.cpp.3.o __build__/src/strategy/ibex_DefaultSolver.cpp.3.o __build__/src/strategy/ibex_EntailedCtr.cpp.3.o __build__/src/strategy/ibex_LineSearch.cpp.3.o __build__/src/strategy/ibex_Multipliers.cpp.3.o __build__/src/strategy/ibex_OptimData.cpp.3.o __build__/src/strategy/ibex_Optimizer.cpp.3.o __build__/src/strategy/ibex_Paver.cpp.3.o __build__/src/strategy/ibex_SetImage.cpp.3.o __build__/src/strategy/ibex_Solver.cpp.3.o __build__/src/strategy/ibex_StrategyParam.cpp.3.o __build__/src/strategy/ibex_SubPaving.cpp.3.o __build__/src/strategy/ibex_UnconstrainedLocalSearch.cpp.3.o __build__/src/symbolic/ibex_CmpOp.cpp.3.o __build__/src/symbolic/ibex_Expr.cpp.3.o __build__/src/symbolic/ibex_Expr2DAG.cpp.3.o __build__/src/symbolic/ibex_ExprCmp.cpp.3.o __build__/src/symbolic/ibex_ExprCopy.cpp.3.o __build__/src/symbolic/ibex_ExprDiff.cpp.3.o __build__/src/symbolic/ibex_ExprLabel.cpp.3.o __build__/src/symbolic/ibex_ExprPrinter.cpp.3.o __build__/src/symbolic/ibex_ExprSize.cpp.3.o __build__/src/symbolic/ibex_ExprSplitOcc.cpp.3.o __build__/src/symbolic/ibex_ExprSubNodes.cpp.3.o __build__/src/system/ibex_ExtendedSystem.cpp.3.o __build__/src/system/ibex_FritzJohnCond.cpp.3.o __build__/src/system/ibex_NormalizedSystem.cpp.3.o __build__/src/system/ibex_System.cpp.3.o __build__/src/system/ibex_SystemFactory.cpp.3.o __build__/src/tools/ibex_Agenda.cpp.3.o __build__/src/tools/ibex_DirectedHyperGraph.cpp.3.o __build__/src/tools/ibex_Exception.cpp.3.o __build__/src/tools/ibex_HyperGraph.cpp.3.o __build__/src/tools/ibex_KCoreGraph.cpp.3.o __build__/src/tools/ibex_PixelMap.cpp.3.o __build__/src/tools/ibex_Random.cpp.3.o __build__/src/tools/ibex_String.cpp.3.o __build__/src/tools/ibex_Timer.cpp.3.o __build__/src/parser/lexer.lex.cc.3.o __build__/src/parser/parser.tab.cc.3.o -> __build__/src/libibex.so

/usr/bin/ld: //usr/local/lib/libprim.a(primitive.o): réadressage de R_X86_64_32 en vertu de « .rodata » ne peut être utilisé lors de la création d'un objet partagé; recompilez avec -fPIC

//usr/local/lib/libprim.a: error adding symbols: Mauvaise valeur

collect2: error: ld returned 1 exit status

Waf: Leaving directory `/home/clement/ENSTABZH/Ibex/ibex-2.1.16/__build__'

Build failed

 -> task in 'ibex' failed (exit status 1): 

{task 139696720552656: cxxshlib ibex_Affine2_No.cpp.3.o,[...]

 
</code>
Cheers!
 

Hi Clément,
Somebody reported the same problem in another post, but I don't know how to solve it easily because I can't reproduce the problem with my 64-bits platforms (windows and Linux).
It seems that a "-fPIC" flag is missing somewhere.. Maybe Jordan can who master the python script can help you on that point?
Cheers
Gilles