[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] glpk-4.12 build failure on GNU/Linux
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] glpk-4.12 build failure on GNU/Linux |
Date: |
Thu, 9 Nov 2006 14:28:38 +0300 |
Thank you for your bug report.
> I got multiple undefined references to math functions
> trying to build glpk-4.12 on GNU/Linux x86, gcc 3.3.4,
> binutils 2.15.92, make 3.80.
> Maybe a missing -lm ?
That is right. There is a bug in configure.in which appears if the
configure script detects the GMP library and due to which -lm is not
included in the option list.
There are two ways to fix the bug.
1. Patch configure.in and then run autoconf/automake.
Thanks to Davide Madrisan <address@hidden> who
provided the patch:
--- configure.in.orig 2006-11-09 09:43:01.000000000 +0100
+++ configure.in 2006-11-09 09:43:15.000000000 +0100
@@ -21,7 +21,7 @@
sed -e 's/#undef GLP_USE_GMP/#define GLP_USE_GMP/' \
./include/glpcfg.hin > ./include/glpcfg.h
rm -f ./include/glpcfg.hin
-LIBS="-lgmp"
+LIBS="-lgmp -lm"
else
echo "*** WARNING ***"
echo "To attain a much better performance on using exact arithmetic"
2. After configuring but before running make replace line 1367:
LIBS="-lgmp"
by the following line:
LIBS="-lgmp -lm"
directly in configure script, not in configure.in. This way can be
used if autoconf/automake are not installed.