> I compiled glpk 4.51 with MinGW64 compiler. When I try to solve any > problem I get a segfault after problem is read in. I tried various > versions and toolchains of MinGW64 gcc with the same result. > > From GDB I have got: > > (gdb) run xyz.mps > Starting program: C:\mingw64\msys\1.0\local\bin\glpsol.exe xyz.mps > [New Thread 5208.0x15c8] > GLPSOL: GLPK LP/MIP Solver, v4.51 > Parameter(s) specified in the command line: > xyz.mps > Reading problem data from `xyz.mps'... > Problem: RUNTIME > Objective: R0 > 36975 rows, 40653 columns, 240407 non-zeros > 174637 records were read > warning: Invalid parameter passed to C runtime function. > > > Program received signal SIGSEGV, Segmentation fault. > glp_time () at env/time.c:61 > 61 j = jday(tm->tm_mday, tm->tm_mon + 1, 1900 + tm->tm_year); > > (gdb) bt > #0 glp_time () at env/time.c:61 > #1 0x00000000004029e5 in glp_main (argc=<optimized out>, > argv=<optimized out>) at glpapi21.c:1160 > #2 0x00000000004013d9 in __tmainCRTStartup () > #3 0x000000000040113f in mainCRTStartup () >
Thank you for your bug report. The exception happens in a Posix version of glp_time function. It is difficult to say what is wrong, most likely it is some MINGW64 inconsistency, because under GNU/Linux this code works. To fix the bug you may simply to disable using the configuration header (created by the configure script) by replacing the fragment in file glpk-4.51/src/env/time.c, lines 24-26: #ifdef HAVE_CONFIG_H #include <config.h> #endif with the following one: #if 0 #include <config.h> #endif In this case an ANSI portable version will be used, which should work on any platform. Hope this helps. BTW, who displays the message "warning: Invalid parameter passed to C runtime function." ? It is not a glpk message. _______________________________________________ Bug-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-glpk
