Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AmplSolver fails to link due to missing libcoinasl symbols #416

Closed
notwa opened this issue Oct 23, 2020 · 3 comments
Closed

AmplSolver fails to link due to missing libcoinasl symbols #416

notwa opened this issue Oct 23, 2020 · 3 comments

Comments

@notwa
Copy link

notwa commented Oct 23, 2020

this is occurring when attempting to build Ipopt 3.13.3 with MSYS2 (mingw64 target) and my build script which downloads and builds the coin-or dependency chain up to Bonmin.

make[2]: Entering directory '/home/notwa/src/coin-or/coin-or-Ipopt-fbe82f5/contrib/sIPOPT/AmplSolver'
/bin/sh ../../../libtool  --tag=CXX   --mode=link g++  -O2 -DNDEBUG  -version-number 3:13:3 -no-undefined  -o ipopt_sens.exe ampl_sipopt.o SensAmplTNLP.o ../src/libsipopt.la ../../../src/Apps/AmplSolver/libipoptamplinterface.la
libtool: warning: '-version-info' is ignored for programs
libtool: link: g++ -O2 -DNDEBUG -o .libs/ipopt_sens.exe ampl_sipopt.o SensAmplTNLP.o  ../src/.libs/libsipopt.dll.a ../../../src/Apps/AmplSolver/.libs/libipoptamplinterface.dll.a -LC:/msys64/opt/coin-or/lib /home/notwa/src/coin-or/coin-or-Ipopt-fbe82f5/src/Interfaces/.libs/libipopt.dll.a -L/opt/coin-or/lib
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: SensAmplTNLP.o:SensAmplTNLP.cpp:(.text+0x15f0): undefined reference to `suf_rput_ASL'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: SensAmplTNLP.o:SensAmplTNLP.cpp:(.text+0x1668): undefined reference to `suf_rput_ASL'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: SensAmplTNLP.o:SensAmplTNLP.cpp:(.text+0x16e8): undefined reference to `suf_rput_ASL'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: SensAmplTNLP.o:SensAmplTNLP.cpp:(.text+0x1720): undefined reference to `suf_rput_ASL'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:447: ipopt_sens.exe] Error 1

the symbol suf_rput_ASL is defined in libcoinasl.a, so I suppose the solution is to append its path to the command, or as a libtool dependency, but I can't figure out which variable to edit due to all the indirection induced by autoconf, automake, libtool and pkg-config.

svigerske added a commit that referenced this issue Oct 23, 2020
- on some platforms, it isn't sufficient to have the ASL lib linked into
  the ipopt-amplinterface lib
- fixes #416
@svigerske
Copy link
Member

Yes. I guess it's not sufficient that libipoptamplinterface links against the ASL lib already.
Can you try whether the fix on branch 416-fix works?

@notwa
Copy link
Author

notwa commented Oct 23, 2020

yes, that works, thank you!
I suspect there will be similar linking errors for Bonmin. I'm already running into one, but not one that I expected. I'll have to make an issue on the Bonmin project if I can't get it to work.

@tkralphs
Copy link
Member

@notwa Just wanted to quickly mention that coinbrew does what your build script is doing, but has a lot of additional bells and whistles. I haven't gotten to modifying the READMEs of the projects downstream of Cbc yet.

coinbrew fetch Bonmin@master
coinbrew build Bonmin -j 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants