coin-or / OS

Optimization Services
Other
1 stars 4 forks source link

../libtool: line 1872: cd: {libdir}: No such file or directory #68

Closed sagitter closed 3 years ago

sagitter commented 3 years ago

Hi all.

coin-or-OS-2.10.2 build is failing on Fedora 34+ with this error:

make[3]: Entering directory '/builddir/build/BUILD/OS-2.10.2/src'
/bin/sh ../libtool --tag=CXX --mode=link g++  -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection  -I/usr/include/asl -std=gnu++14  -DOS_BUILD -fopenmp  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -o libOS.la -rpath /usr/lib64 -no-undefined -version-info 16:2:10  ./OSUtils/libOSUtils.la ./OSCommonInterfaces/libOSCommonInterfaces.la ./OSAgent/libOSAgent.la ./OSModelInterfaces/libOSModelInterfaces.la ./OSParsers/libOSParsers.la ./OSSolverInterfaces/libOSSolverInterfaces.la -lsdp -L\{libdir\} -l-lcppad_lib  -lasl -lmp -lipoptamplinterface -lbonminampl -lBcp -lOsiVol -lVol -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils  -lCouenne -lbonmin -lCbcSolver -lCbc -lCgl -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils -lipopt -L\{libdir\} -l-lcppad_lib  -lbonmin -lCbcSolver -lCbc -lCgl -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils -lipopt -L\{libdir\} -l-lcppad_lib  -lCbcSolver -lCbc -lCgl -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils  -lOsiGlpk -lglpk -lOsi -lCoinUtils  -lOsiSym -lSym -lCgl -lOsiVol -lVol -lOsiDylp -lDylp -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils  -lOsiVol -lVol -lOsi -lCoinUtils  -lOsiDylp -lOsi -lCoinUtils -lDylp  -lOsiClp -lClpSolver -lClp -lOsi -lCoinUtils  -lipopt -L\{libdir\} -l-lcppad_lib  -lCoinUtils    
../libtool: line 1872: cd: {libdir}: No such file or directory
libtool: link: cannot determine absolute directory name of `{libdir}'
../libtool: line 1872: cd: {libdir}: No such file or directory
libtool: link: cannot determine absolute directory name of `{libdir}'
../libtool: line 1872: cd: {libdir}: No such file or directory
libtool: link: cannot determine absolute directory name of `{libdir}'
../libtool: line 1872: cd: {libdir}: No such file or directory
libtool: link: cannot determine absolute directory name of `{libdir}'
mkdir .libs
g++ -Wl,--as-needed -shared -nostdlib /usr/lib/gcc/s390x-redhat-linux/11/../../../../lib64/crti.o /usr/lib/gcc/s390x-redhat-linux/11/crtbeginS.o  -Wl,--whole-archive ./OSUtils/.libs/libOSUtils.a ./OSCommonInterfaces/.libs/libOSCommonInterfaces.a ./OSAgent/.libs/libOSAgent.a ./OSModelInterfaces/.libs/libOSModelInterfaces.a ./OSParsers/.libs/libOSParsers.a ./OSSolverInterfaces/.libs/libOSSolverInterfaces.a -Wl,--no-whole-archive  -lsdp -lasl -lmp -lipoptamplinterface -lbonminampl -lBcp -lCouenne -lbonmin -lCbcSolver -lCbc -lOsiGlpk -lglpk -lOsiSym -lSym -lCgl -lOsiVol -lVol -lOsiDylp -lDylp -lOsiClp -lClpSolver -lClp -lOsi -lipopt -l-lcppad_lib -lCoinUtils -L/usr/lib/gcc/s390x-redhat-linux/11 -L/usr/lib/gcc/s390x-redhat-linux/11/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/s390x-redhat-linux/11/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/s390x-redhat-linux/11/crtendS.o /usr/lib/gcc/s390x-redhat-linux/11/../../../../lib64/crtn.o -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -m64 -march=zEC12 -mtune=z13 -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -Wl,-soname -Wl,libOS.so.6 -o .libs/libOS.so.6.10.2
/usr/bin/ld: cannot find -l-lcppad_lib
collect2: error: ld returned 1 exit status

Looks like it's used an incomplete macro: {libdir} This is the libtool

svigerske commented 3 years ago

Probably something wrong with the CppAD dependency. The -L\{libdir\} -l-lcppad_lib should have its origin in some cppad.pc.

OS 2.10.2 assumes CppAD 20150000.9, but I don't see any mention of cppad_lib there. CppAD from 2016 and later is broken: 42be55e018f0315f76ec217a32dd45ba3d44f7bc

sagitter commented 3 years ago

Thank you.