> Please compile and run glpk_bug_read_gz.c > $ gcc glpk_bug_read_gz.c -lglpk -o glpk_bug_read_gz > > The program is based on glpk-4.52.1/examples/sample.c and contains > various write/read commands. > The write/read pair fails (it is the only one). > > fprintf(stdout, "glpk version %s\n", glp_version()); > glp_write_lp(lp, NULL, "temp_lp.gz"); > glp_read_lp(lp, NULL, "temp_lp.gz"); > > The terminal output for this program reads: > $ ./glpk_bug_read_gz > glpk version 4.52 > Writing problem data to 'temp_lp.gz'... > 11 lines were written > Reading problem data from 'temp_lp.gz'... > temp_lp.gz:12: read error - > > The bug is reproduced with glpk-4.45 as well. > > See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718392 >
Thank you for your bug report. To fix the bug please replace file glpk-4.52.1/src/glpenv07.c with a patched version (see attachment) and then recompile the package as usual. Andrew Makhorin
glpenv07.c.gz
Description: GNU Zip compressed data