Re: wfmath
Michael Koch wrote:
> Hi list,
>
>
> I have uploaded a new version of a library I maintain, wfmath_0.2.9-3.
> The problem is that the mips/el autobuilders didnt built it. Can
> someone please sent me a config.log of wfmath ?
>
> I think I dont need an account on a mips machine, the config.log
> should be enough. ;-)
jokamies!joey(ttyp1):/tmp/wfmath-0.2.10> make -f debian/rules build
dh_testdir
CC="gcc-3.2" CXX="g++-3.2" CFLAGS="-g -Wall -O2" LDFLAGS="-lstdc++" \
./configure \
--host=mipsel-linux \
--build=mipsel-linux \
--prefix=/usr \
--mandir=\${prefix}/share/man \
--infodir=\${prefix}/share/info \
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.4... missing
checking for working autoconf... missing
checking for working automake-1.4... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking for c++... g++-3.2
checking whether the C++ compiler (g++-3.2 -lstdc++) works... yes
checking whether the C++ compiler (g++-3.2 -lstdc++) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++-3.2 accepts -g... yes
checking for Cygwin environment... no
checking for mingw32 environment... no
checking how to run the C preprocessor... gcc-3.2 -E
checking host system type... mipsel-unknown-linux-gnu
checking build system type... mipsel-unknown-linux-gnu
checking for gcc... gcc-3.2
checking whether the C compiler (gcc-3.2 -g -Wall -O2 -lstdc++) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** [config.status] Error 1
The problem is that this fails:
jokamies!joey(ttyp0):/tmp> gcc-3.2 -o conftest -g -Wall -O2 -lstdc++ conftest.c
configure:1516: warning: return type defaults to `int'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `log'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `sqrt'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `cosh'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `cos'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `tanh'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `sin'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `atan2'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `pow'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `sinh'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `log10'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `exp'
/usr/lib/gcc-lib/mipsel-linux/3.2.1/libstdc++.so: undefined reference to `tan'
collect2: ld returned 1 exit status
jokamies!joey(ttyp0):/tmp> cat conftest.c
#line 1514 "configure"
#include "confdefs.h"
main(){return(0);}
Looks like somebody forgot to add -lm to the gcc commandline. Adding that
indeed fixes the problem.
The following change should fix this. However, I wonder why it built fine on
other architectures. If you update your rules file and you don't notice the
package building on mipsel, you'll probably need to notify rmurray@debian.org
to remove wfmath from the mipsel blacklist. (not sure if it's in, though)
diff -u -Nur --exclude CVS orig/wfmath-0.2.10/debian/rules wfmath-0.2.10/debian/rules
--- orig/wfmath-0.2.10/debian/rules 2002-10-20 19:05:10.000000000 +0200
+++ wfmath-0.2.10/debian/rules 2002-10-20 19:05:59.000000000 +0200
@@ -16,10 +16,12 @@
CC=gcc
CXX=g++
CFLAGS=-g -Wall
+LDFLAGS=-lstdc++
ifneq (,$(findstring mips,$(DEB_BUILD_GNU_TYPE)))
CC=gcc-3.2
CXX=g++-3.2
+ LDFLAG += -lm
endif
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
@@ -32,7 +34,7 @@
config.status: configure
dh_testdir
- CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" LDFLAGS="-lstdc++" \
+ CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
Regards,
Joey
--
Every use of Linux is a proper use of Linux. -- Jon "Maddog" Hall
Reply to:
- Follow-Ups:
- Re: wfmath
- From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
- Re: wfmath
- From: Karsten Merker <karsten@excalibur.cologne.de>
- Re: wfmath
- From: Michael Koch <konqueror@gmx.de>
- References:
- wfmath
- From: Michael Koch <konqueror@gmx.de>