Opened 5 years ago

Closed 5 years ago

#230 closed defect (duplicate)

Undefined Reference to dlopen, dlclose, dlerror, dlsym

Reported by: amigoricardo Owned by: ipopt-team
Priority: normal Component: Ipopt
Version: 3.11 Severity: blocker
Keywords: Cc:

Description

Hi!

Compiling IPOPT 3.11.7 under an Ubuntu 13.10, I've got the following:

then mv -f ".deps/ampl_ipopt.Tpo" ".deps/ampl_ipopt.Po"; else rm -f ".deps/ampl_ipopt.Tpo"; exit 1; fi

/bin/bash ../../../../libtool --tag=CXX --mode=link g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD -o ipopt ampl_ipopt.o libipoptamplinterface.la ../../Interfaces/libipopt.la /home/amigo/CoinIpopt-build/ThirdParty/ASL/libcoinasl.la -lm -ldl -llapack -lblas -lm -ldl g++ -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DIPOPT_BUILD -o .libs/ipopt ampl_ipopt.o ./.libs/libipoptamplinterface.so ../../Interfaces/.libs/libipopt.so /home/amigo/CoinIpopt-build/ThirdParty/ASL/.libs/libcoinasl.so -llapack -lblas -lm -ldl -Wl,--rpath -Wl,/home/amigo/CoinIpopt-build/lib ../../Interfaces/.libs/libipopt.so: undefined reference to `dlopen' ../../Interfaces/.libs/libipopt.so: undefined reference to `dlclose' ../../Interfaces/.libs/libipopt.so: undefined reference to `dlerror' ../../Interfaces/.libs/libipopt.so: undefined reference to `dlsym' collect2: error: ld returned 1 exit status make[3]: * [ipopt] Error 1 make[3]: Leaving directory `/home/amigo/CoinIpopt-build/Ipopt/src/Apps/AmplSolver' make[2]: * [all-recursive] Error 1 make[2]: Leaving directory `/home/amigo/CoinIpopt-build/Ipopt/src/Apps' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory `/home/amigo/CoinIpopt-build/Ipopt' make: * [all-recursive] Error 1

How can I fix it? It seems to be related to versioned symbols (http://list.coin-or.org/pipermail/ipopt/2013-November/003569.html). I've edited the Makefile as suggested at the link above but it still doesn't work.

Change History (3)

comment:1 Changed 5 years ago by kelman

Same issue as https://projects.coin-or.org/Ipopt/ticket/229, just with libdl here (used by ASL and the linear solver loader) instead of libpthread (used by Mumps but not for anything too important). Either configure with LDFLAGS="-Wl,--no-as-needed" or with --enable-dependency-linking.

comment:2 Changed 5 years ago by amigoricardo

Worked.

Thank you!

comment:3 Changed 5 years ago by stefan

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.