[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] can't compile glpk 4.12
From: |
Davide Madrisan |
Subject: |
[Bug-glpk] can't compile glpk 4.12 |
Date: |
Thu, 9 Nov 2006 14:06:35 +0300 |
I all.
I've got some trouble compiling glpk 4.12 on a Linux box.
These are the error messages displayed by make:
make[1]: Entering directory `/usr/src/RPM/BUILD/glpk-4.12/examples'
gcc -DPACKAGE=\"GLPK\" -DVERSION=\"4.12\" -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -I.
-I. -I../include -O2 -fomit-frame-pointer -pipe -march=i586
-mtune=pentiumpro -c
glpsol.c
gcc -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro -o glpsol
glpsol.o ../src/libglpk.a -lgmp
../src/libglpk.a(glplpx4.o): In function `gm_scal':
glplpx4.c:(.text+0x5d6): undefined reference to `sqrt'
glplpx4.c:(.text+0x842): undefined reference to `sqrt'
../src/libglpk.a(glpipm.o): In function `glp_ipm_main':
glpipm.c:(.text+0xdb8): undefined reference to `sqrt'
glpipm.c:(.text+0x1b6c): undefined reference to `sqrt'
glpipm.c:(.text+0x1bbf): undefined reference to `sqrt'
../src/libglpk.a(glpipm.o):glpipm.c:(.text+0x1c9c): more undefined references
to `sqrt' follow
This patch solves the problem to me:
--- 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"
Some platform infos:
$ uname -a
Linux zeus 2.6.17smp #1 SMP Wed Sep 6 10:36:01 CEST 2006 i686 pentium4 i386
GNU/Linux
$ gcc --version
gcc (GCC) 4.0.2
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i586-qilinux-linux-gnu
$ rpm -q glibc
glibc-2.4-3qilnx.i586
address@hidden SPECS]$ rpm -q libgmp
libgmp-4.2.1-1qilnx.i586
#include <best/regards.h>
---
Davide Madrisan
QiLinux Developer -- http://www.qilinux.org
PGP keyID: 0x4B72B0B9 fp: 2B79 BFF1 EE33 EE8C 3258 E43C CDA8 EFF3 4B72 B0B9
PGP public key: <http://pgp.mit.edu/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] can't compile glpk 4.12,
Davide Madrisan <=