> I am doing research on optimization. I tried to build GLPK-4.2 on > FreeBSD 4.1 (32 bit i-386) but failed in the last step: when tried to > build example executables. The errors I got are:
> *************************************************************************************************** > Making all in examples > gmake[2]: Entering directory > `/home/rzhang/workspace/glpk-4.20/examples' > /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -o glpsol > glpsol.o ../src/libglpk.la -lgmp -lm > gcc -g -O2 -o glpsol glpsol.o ../src/.libs/libglpk.a -lgmp -lm > ../src/.libs/libglpk.a(glplpx10.o): In function `set_d_eps': > /homes/rzhang/workspace/glpk-4.20/src/glplpx10.c:82: undefined > reference to `mpq_set_d' > /homes/rzhang/workspace/glpk-4.20/src/glplpx10.c:83: undefined > reference to `mpq_set_d' > ../src/.libs/libglpk.a(glpssx01.o): In function `_glp_ssx_chuzr': > /homes/rzhang/workspace/glpk-4.20/src/glpssx01.c:535: undefined > reference to `mpq_abs' > /homes/rzhang/workspace/glpk-4.20/src/glpssx01.c:551: undefined > reference to `mpq_abs' > collect2: ld returned 1 exit status > gmake[2]: *** [glpsol] Error 1 > gmake[2]: Leaving directory > `/home/rzhang/workspace/glpk-4.20/examples' > gmake[1]: *** [all-recursive] Error 1 > gmake[1]: Leaving directory `/home/rzhang/workspace/glpk-4.20' > gmake: *** [all] Error 2 > **************************************************************************************************** > It's strange. Why when glpsol was built from glpsol.o, the undefined > reference to 'mpq_set_d' in src/glplpx10.c was popped up? But actually > function 'mpq_set_d' is defined in glpgmp.c and the object gplgmp.o is > in the generated library src/.libs/libglpk.a. > Anyone has met the same problem? Could you please give any insights? To detect if GNU MP library is installed the configure script checks for header gmp.h. Looks like the header is available, but the library itself is not. You can disable using GNU MP library by passing option --disable-gmp to configure. Please note that the most recent version of glpk is 4.20. _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
