[Ipopt-tickets] [Ipopt] #229: Add "-Wl,--no-as-needed" to LDFLAGS

Ipopt coin-trac at coin-or.org
Wed Jan 22 21:58:01 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
Keywords:  undefined    |
------------------------+------------------------
 I was compiling Ipopt 3.11.5 on Linux(LinuxMint_16_amd64) with gcc-4.8.1.
 The command "../configure" reported no errors.

 However, "make" stopped with "undefined reference to `pthread_create'"
 even if I already had '-lpthread' flag when running makefile in
 'src/apps/AmplSolver' directory.

 After searching for a few hours, I found that after gcc-4.6 "-Wl,--as-
 needed" is used by default. Then I typed "LDFLAGS="-Wl,--no-as-needed"
 ../configure" in console and the error disappeared.

 I suggest adding "-Wl,--no-as-needed" by default in your LDFLAGS for those
 who are using gcc>=4.6.

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/229>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list