coin-or / Couenne

Convex Over and Under Envelopes for Nonlinear Estimation
Eclipse Public License 1.0
72 stars 8 forks source link

Undefined reference error when compiling couenne #56

Closed KaadH closed 3 years ago

KaadH commented 3 years ago

I ran "configure" successfully, but with "make" the following error appeared

C:/Daten/D_Part/03_MA/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/03_MA/couenne/build/ThirdParty/Lapack/.libs/libcoinlapack.a(dgetrf.o):dgetrf.f:(.text+0x241): undefined reference to 'dgetrf2_'

C:/Daten/D_Part/03_MA/msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/03_MA_Karen/couenne/build/ThirdParty/Lapack/.libs/libcoinlapack.a(dgetrf.o):dgetrf.f:(.text+0x3e8): undefined reference to 'dgetrf2_'

collect2.exe: error: ld returned 1 exit status

make[3]: *** [Makefile:835: clp.exe] Error 1

make[3]: Leaving directory '/d/03_MA/couenne/build/Clp/src'

make[2]: *** [Makefile:714: all] Error 2

make[2]: Leaving directory '/d/03_MA/couenne/build/Clp/src'

make[1]: *** [Makefile:520: all-recursive] Error 1

make[1]: Leaving directory '/d/03_MA/couenne/build/Clp'

make: *** [Makefile:313: all-recursive] Error 1

so I checked and indeed there are no dgetrf2 files in that folder. There is however a dgetrf2.f in the source folder of my downloaded lapack files, so it's not missing per se. Can anyone please tell me which file I have to edit to include dgetrf2, or alternatively what command to run to create the .lo and .o files manually? Thank you! I'm working on Windows using MSYS2 by the way.

svigerske commented 3 years ago

Which Lapack version did you get?

In my version of ThirdParty-Lapack, INSTALL.LAPACK says to get 3.2.1, but get.Lapack gets 3.4.2. The latter should be correct.

KaadH commented 3 years ago

So apparently I didn't pay attention and downloaded an even newer version of lapack. I tried again with 3.4.2 and everything worked perfectly, including make install. Thanks for the tip!