[Ipopt-tickets] [Ipopt] #229: Add "-Wl, --no-as-needed" to LDFLAGS
Ipopt
coin-trac at coin-or.org
Thu Jan 23 03:38:09 EST 2014
#229: Add "-Wl,--no-as-needed" to LDFLAGS
--------------------------+------------------------
Reporter: galago | Owner: ipopt-team
Type: enhancement | Status: new
Priority: normal | Component: Ipopt
Version: 3.11 | Severity: normal
Resolution: | Keywords: undefined
--------------------------+------------------------
Comment (by kelman):
I suspect this is being caused by similar reasons as a problem that has
been seen with libdl on Ubuntu systems (http://list.coin-
or.org/pipermail/ipopt/2013-November/003569.html). It's not necessarily an
issue with --as-needed, though adding that flag serves as a workaround. I
believe the problem is more likely due to symbols like pthread_create now
being versioned symbols in recent Ubuntu, Mint, and/or Debian
distributions.
Another workaround would be to add the configure flag --disable-pthread-
mumps since MUMPS is probably the only thing in Ipopt using pthreads
(unless you're using a multithreaded BLAS, LAPACK, or newer linear solver)
and it's really not doing much within MUMPS.
I suspect that if libcoinmumps was linked to libpthread and libipopt was
linked to libcoinmumps, you would also not see any problems since the
versioned symbols would be resolved properly by the linker (even without
adding --no-as-needed). This is currently not the default setup in the
Ipopt build system, but it can be optionally enabled by adding the
configure flag --enable-dependency-linking.
The -Wl,--no-as-needed flag isn't the kind of thing we would add by
default anywhere in Ipopt's build system, as it only works around this
issue on some Linux distributions. The flag could easily cause an error if
you're using a compiler other than GCC (Visual Studio, etc) or a linker
other than GNU ld (Darwin dyld, Microsoft link.exe, etc).
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/229#comment:1>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list