<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Interesting. Some people have run into similar issues with other
applications, <A
href="http://stackoverflow.com/questions/19926466/undefined-reference-to-dlopen-since-ubuntu-upgrade">http://stackoverflow.com/questions/19926466/undefined-reference-to-dlopen-since-ubuntu-upgrade</A>
or <A
href="https://github.com/halide/Halide/issues/175">https://github.com/halide/Halide/issues/175</A>
for example. It looks like it may be that dlopen, etc are now versioned symbols
in Ubuntu 13.10. If you don’t need shared libraries of Ipopt, you can try
configuring with --disable-shared --enable-static to only build static Ipopt
libraries, that may work better. If you do need shared libraries, it may be that
due to the versioned symbols, you need to add -ldl to the link line for
libcoinasl.so as well. Find the Makefile for ThirdParty/ASL, and on the line
“$(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS)
$(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) linkdir/*.lo” (under target
“libcoinasl.la : $(AMPLSOLVER_A)”), add “$(ASL_PCLIBS)”.</DIV>
<DIV> </DIV>
<DIV>-Tony</DIV>
<DIV> </DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=antonello@lobianco.org
href="mailto:antonello@lobianco.org">Antonello Lobianco</A> </DIV>
<DIV><B>Sent:</B> Monday, November 18, 2013 10:44 AM</DIV>
<DIV><B>To:</B> <A title=ipopt@list.coin-or.org
href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</A> </DIV>
<DIV><B>Subject:</B> [Ipopt] Compiling ipopt in ubuntu 13.10: udefined
undefinedreference to `dlopen'</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-SIZE: small; FONT-FAMILY: 'Calibri'; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; TEXT-DECORATION: none; DISPLAY: inline">
<DIV dir=ltr>
<DIV>
<DIV>Hello, trying to compile ipopt 3.11.6 in Ubuntu 13.10 x64 I got the
following error:<BR>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/lobianco/programs/linux/src/ipopt/ThirdParty/ASL/.libs/libcoinasl.so
/home/lobianco/programs/linux/src/ipopt/ThirdParty/Mumps/.libs/libcoinmumps.so
/home/lobianco/programs/linux/src/ipopt/ThirdParty/Metis/.libs/libcoinmetis.so
-L/usr/lib/gcc/x86_64-linux-gnu/4.8
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lpthread
-lgfortran -lquadmath -llapack -lblas -lm
-ldl<BR>../../Interfaces/.libs/libipopt.so: undefined reference to
`dlopen'<BR>../../Interfaces/.libs/libipopt.so: undefined reference to
`dlclose'<BR>../../Interfaces/.libs/libipopt.so: undefined reference to
`dlerror'<BR>../../Interfaces/.libs/libipopt.so: undefined reference to
`dlsym'<BR>collect2: error: ld returned 1 exit status<BR>make[3]: *** [ipopt]
Error 1<BR><BR></DIV>I coudn't find anything specific to ipopt, and I see that
the linker flag -ldl, that is often "accused" to be the reason behind this error
is instead already there.. any clue??<BR><BR></DIV>/Antonello<BR>
<DIV>
<DIV>
<DIV>
<DIV class=gmail_extra><BR><BR>
<DIV class=gmail_quote>On 28 April 2013 03:36, Tae-Hyuk Ahn <SPAN dir=ltr><<A
href="mailto:ahn.no1@gmail.com" target=_blank>ahn.no1@gmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi,<BR><BR>Thanks!
After I used the addlibs, I also got
error.<BR><BR>[thm@viper:gereme_cpp_ipopt_static_test]$ make<BR>
<DIV class=im>g++ -fopenmp -static utils.o parse_config.o
gereme_config.o<BR>gereme_core.o gereme_ipopt_main.o
gereme_ipopt_nlp.o<BR></DIV>-L/home/thm/Software/CoinIpopt/build/lib<BR>-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2<BR>-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64<BR>-L/lib/../lib64
-L/usr/lib/../lib64 -lipopt -ldl -lcoinmumps -lpthread<BR>-lcoinlapack
-lcoinmetis -lcoinblas -lgfortranbegin -lgfortran -lm<BR>-lgcc_s -o
gereme-solve-model<BR>/home/thm/Software/CoinIpopt/build/lib/libipopt.a(LibraryHandler.o):<BR>In
function `LSL_loadLib':<BR>LibraryHandler.c:(.text+0x1f3): warning: Using
'dlopen' in statically<BR>linked applications requires at runtime the shared
libraries from the<BR>glibc version used for linking<BR>/usr/bin/ld: cannot
find -lgcc_s<BR>
<DIV class=im>collect2: ld returned 1 exit status<BR></DIV>make: ***
[gereme-solve-model] Error 1<BR><BR>So, I deleted -lgcc_s, then generate
static binary only with
warning<BR><BR>/home/thm/Software/CoinIpopt/build/lib/libipopt.a(LibraryHandler.o):<BR>In
function `LSL_loadLib':<BR>LibraryHandler.c:(.text+0x1f3): warning: Using
'dlopen' in statically<BR>linked applications requires at runtime the shared
libraries from the<BR>glibc version used for linking<BR><BR>What is -lgcc_s ?
Can I skip this?<BR><BR>Thanks!<BR><BR>Ted<BR><BR>On Sat, Apr 27, 2013 at
11:28 AM, Stefan Vigerske<BR>
<DIV>
<DIV class=h5><<A
href="mailto:stefan@math.hu-berlin.de">stefan@math.hu-berlin.de</A>>
wrote:<BR>> Hi,<BR>><BR>> that's what Ipopt has the addlibs
for:<BR>> <A href="http://www.coin-or.org/Ipopt/documentation/node22.html"
target=_blank>http://www.coin-or.org/Ipopt/documentation/node22.html</A><BR>><BR>>
share/coin/doc/Ipopt/ipopt_addlibs_cpp.txt tells you which linker flags
are<BR>> required to link against the Ipopt library, and in which
order.<BR>><BR>> The ipopt.pc file in lib/pkgconfig has the same
purpose.<BR>><BR>> Stefan<BR>><BR>><BR>> On 04/27/2013 05:03
PM, Tae-Hyuk Ahn wrote:<BR>>><BR>>> Hi
Stefan,<BR>>><BR>>> Yep, I forgot to reorder the linker flags
before. After I reorder, I<BR>>> am still getting
errors.<BR>>><BR>>> g++ -fopenmp -static utils.o parse_config.o
gereme_config.o<BR>>> gereme_core.o gereme_ipopt_main.o
gereme_ipopt_nlp.o libipopt.a<BR>>> libipoptamplinterface.a libcoinasl.a
libcoinblas.a libcoinlapack.a<BR>>> libcoinmetis.a libcoinmumps.a
libipopt.a libipoptamplinterface.a -o<BR>>>
gereme-solve-model<BR>>><BR>>> The order of static archives is
also make error? The errors look like<BR>>>
this:<BR>>><BR>>> libipopt.a(LibraryHandler.o): In function
`LSL_loadSym':<BR>>> LibraryHandler.c:(.text+0x4e): undefined reference
to `dlsym'<BR>>> LibraryHandler.c:(.text+0x56): undefined reference to
`dlerror'<BR>>> libipopt.a(LibraryHandler.o): In function
`LSL_loadLib':<BR>>> LibraryHandler.c:(.text+0x1f3): undefined reference
to `dlopen'<BR>>> LibraryHandler.c:(.text+0x231): undefined reference to
`dlerror'<BR>>> libipopt.a(LibraryHandler.o): In function
`LSL_unloadLib':<BR>>> LibraryHandler.c:(.text+0x1c1): undefined
reference to `dlclose'<BR>>> libcoinblas.a(xerbla.o): In function
`xerbla_':<BR>>> xerbla.f:(.text+0x59): undefined reference to
`_gfortran_st_write'<BR>>> xerbla.f:(.text+0x64): undefined reference to
`_gfortran_string_len_trim'<BR>>> xerbla.f:(.text+0x76): undefined
reference to<BR>>> `_gfortran_transfer_character'<BR>>>
xerbla.f:(.text+0x86): undefined reference to
`_gfortran_transfer_integer'<BR>>> xerbla.f:(.text+0x8e): undefined
reference to `_gfortran_st_write_done'<BR>>> xerbla.f:(.text+0x98):
undefined reference to `_gfortran_stop_numeric'<BR>>>
libcoinlapack.a(dsytrd.o): In function `dsytrd_':<BR>>>
dsytrd.f:(.text+0x29d): undefined reference to `dsyr2k_'<BR>>>
dsytrd.f:(.text+0x5ff): undefined reference to `dsyr2k_'<BR>>>
libcoinlapack.a(ilaenv.o): In function `ilaenv_':<BR>>>
ilaenv.f:(.text+0xb8): undefined reference to
`_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0xe9): undefined
reference to `_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0x108):
undefined reference to `_gfortran_compare_string'<BR>>>
ilaenv.f:(.text+0x127): undefined reference to
`_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0x142): undefined
reference to `_gfortran_compare_string'<BR>>>
libcoinlapack.a(ilaenv.o):ilaenv.f:(.text+0x15d): more undefined<BR>>>
references to `_gfortran_compare_string' follow<BR>>>
libcoinlapack.a(ilaenv.o): In function `ilaenv_':<BR>>>
ilaenv.f:(.text+0x273): undefined reference to
`_gfortran_copy_string'<BR>>> ilaenv.f:(.text+0x33c): undefined
reference to `_gfortran_copy_string'<BR>>> ilaenv.f:(.text+0x357):
undefined reference to `_gfortran_copy_string'<BR>>>
ilaenv.f:(.text+0x36d): undefined reference to
`_gfortran_copy_string'<BR>>> ilaenv.f:(.text+0x398): undefined
reference to `_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0x3b7):
undefined reference to `_gfortran_compare_string'<BR>>>
ilaenv.f:(.text+0x3d6): undefined reference to
`_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0x3f5): undefined
reference to `_gfortran_compare_string'<BR>>> ilaenv.f:(.text+0x410):
undefined reference to `_gfortran_compare_string'<BR>>>
libcoinlapack.a(ilaenv.o):ilaenv.f:(.text+0x42b): more undefined<BR>>>
references to `_gfortran_compare_string' follow<BR>>>
libcoinlapack.a(dgetf2.o): In function `dgetf2_':<BR>>>
dgetf2.f:(.text+0x1d5): undefined reference to `dswap_'<BR>>>
dgetf2.f:(.text+0x305): undefined reference to `dger_'<BR>>>
libcoinlapack.a(dlamch.o): In function `dlamch_':<BR>>>
dlamch.f:(.text+0xad): undefined reference to
`_gfortran_pow_r8_i4'<BR>>> dlamch.f:(.text+0xfc): undefined reference
to `_gfortran_pow_r8_i4'<BR>>> libcoinlapack.a(dlamch.o): In function
`dlamc2_':<BR>>><BR>>> On Sat, Apr 27, 2013 at 10:46 AM, Stefan
Vigerske<BR>>> <<A
href="mailto:stefan@math.hu-berlin.de">stefan@math.hu-berlin.de</A>>
wrote:<BR>>>><BR>>>> Hi,<BR>>>><BR>>>> you
could try reordering the linker flags so that the ipopt libs
comes<BR>>>> after<BR>>>> your
gereme_ipopt_main.o.<BR>>>> In static builds with g++, the order of
the linker flags matters.<BR>>>><BR>>>>
Stefan<BR>>>><BR>>>><BR>>>> On 04/26/2013 07:10 PM,
Ahn, Tae-Hyuk
wrote:<BR>>>>><BR>>>>><BR>>>>> Hello
Stefan,<BR>>>>><BR>>>>> First I really appreciate for
all your previous and future help for<BR>>>>>
IPOPT.<BR>>>>><BR>>>>> I have one question about the
IPOPT library. I will run IPOPT program in<BR>>>>>
supercomputer,<BR>>>>> so IPOPT static libraries are required. The
process of building<BR>>>>> libraries<BR>>>>> was
done<BR>>>>> without error. But I've got error when II built my
IPOPT program. Below<BR>>>>> was what I
did:<BR>>>>><BR>>>>>
$ ../configure --enable-static
--disable-shared<BR>>>>> $
make<BR>>>>> $ make
test<BR>>>>> $ make
install<BR>>>>> I succeeded to
build the IPOPT static libraries. But when I link<BR>>>>>
them<BR>>>>> to
my<BR>>>>> main program, I've
got the error message:<BR>>>>>
$ make (my IPOPT
problem)<BR>>>>>
....<BR>>>>> g++ -fopenmp
-static -L./ipopt/lib -lipopt -lipoptamplinterface<BR>>>>>
-lcoinblas -lcoinlapack -lcoinasl -lcoinmumps -lcoinmetis -lpthread
-lm<BR>>>>> -ldl<BR>>>>> utils.o parse_config.o
gereme_config.o gereme_core.o gereme_ipopt_main.o<BR>>>>>
gereme_ipopt_nlp.o -o
gereme-solve-model<BR>>>>>
gereme_ipopt_main.o: In function
`main':<BR>>>>>
gereme_ipopt_main.cpp:(.text+0x1202): undefined reference
to<BR>>>>> `Ipopt::IpoptApplication::IpoptApplication(bool,
bool)'<BR>>>>>
gereme_ipopt_main.o:(.rodata._ZTVN5Ipopt6VectorE[vtable
for<BR>>>>> Ipopt::Vector]+0xc8): undefined reference
to<BR>>>>> `Ipopt::Vector::AddTwoVectorsImpl(double, Ipopt::Vector
const&, double,<BR>>>>> Ipopt::Vector const&,
double)'<BR>>>>>
gereme_ipopt_main.o:(.rodata._ZTVN5Ipopt6VectorE[vtable
for<BR>>>>> Ipopt::Vector]+0xd0): undefined reference
to<BR>>>>> `Ipopt::Vector::FracToBoundImpl(Ipopt::Vector
const&, double)
const'<BR>>>>>
gereme_ipopt_main.o:(.rodata._ZTVN5Ipopt6VectorE[vtable
for<BR>>>>> Ipopt::Vector]+0xd8): undefined reference
to<BR>>>>> `Ipopt::Vector::AddVectorQuotientImpl(double,
Ipopt::Vector const&,<BR>>>>> Ipopt::Vector const&,
double)'<BR>>>>>
gereme_ipopt_main.o:(.rodata._ZTVN5Ipopt6VectorE[vtable
for<BR>>>>> Ipopt::Vector]+0xe0): undefined reference
to<BR>>>>> `Ipopt::Vector::HasValidNumbersImpl()
const'<BR>>>>> /usr/bin/ld:
link errors found, deleting executable<BR>>>>>
`gereme-solve-model'<BR>>>>>
collect2: ld returned 1 exit status<BR>>>>><BR>>>>> Do
you have any idea for this.<BR>>>>><BR>>>>> Thank you
very much.<BR>>>>><BR>>>>>
Sincerely,<BR>>>>><BR>>>>>
Ted<BR>>>>><BR>>>><BR>>><BR>><BR>_______________________________________________<BR>Ipopt
mailing list<BR><A
href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</A><BR><A
href="http://list.coin-or.org/mailman/listinfo/ipopt"
target=_blank>http://list.coin-or.org/mailman/listinfo/ipopt</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>
<DIV dir=ltr>Antonello Lobianco<BR>AgroParisTech, Laboratoire d'Economie
Forestière<BR>14 Rue Girardet - 54000 Nancy, France<BR>Tel:
+33.383396865<BR>Email: <A href="mailto:antonello.lobianco@nancy.inra.fr"
target=_blank>antonello.lobianco@nancy.inra.fr</A><BR><A
href="http://antonello.lobianco.org/"
target=_blank>http://antonello.lobianco.org</A></DIV></DIV></DIV></DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Ipopt mailing
list<BR>Ipopt@list.coin-or.org<BR>http://list.coin-or.org/mailman/listinfo/ipopt<BR></DIV></DIV></DIV></BODY></HTML>