Christoph Egger <christ...@debian.org> writes: > Package: src:openblas > Version: 0.1.1-3 > Severity: serious > Tags: sid wheezy > User: debian-bsd@lists.debian.org > Usertags: kfreebsd > X-Debbugs-Cc: debian-bsd@lists.debian.org > Justification: fails to build from source (but built successfully in the past)
> Your package failed to build on the kfreebsd-* buildds: > > gcc -c -O2 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT > -fPIC -DDYNAMIC_ARCH -DNO_LAPACK -DNO_LAPACKE -DSMP_SERVER > -DMAX_CPU_NUMBER=2 -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ > -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY > -I.. -I. -UDOUBLE -UCOMPLEX gemm.c -o sgemm.o > gemm.c: In function 'sgemm_': > gemm.c:401:16: error: 'GEMM_MULTITHREAD_THRESHOLD' undeclared (first use in > this function) > gemm.c:401:16: note: each undeclared identifier is reported only once for > each function it appears in > make[2]: *** [sgemm.o] Error 1 > > Full build log at > https://buildd.debian.org/status/logs.php?pkg=openblas&ver=0.1.1-3&arch=kfreebsd-amd64 The build fails because the CPU is not correctly detected on some kfreebsd buildds (finzi, fano). From the old logs, it looks that the CPU is correctly detected on some others kfreebsd buildds (field, fasch). The failure to detect the CPU is a bug in itself, but we need to know the exact CPU architecture of these buildds in order to report an upstream bug. Is this information available? Anyways, I think that the build of the generic openblas package should not depend on the CPU detection of the buildd. The solution seems to force the "generic" target (only possible when building the dynamic arch binaries). I attach a patch to debian/rules. A second patch is attached which fixes an error in the "generic" profile; it should probably be forwarded upstream. I tried to test these patches on a kfreebsd-i386 virtual machine, but the CPU was correctly detected there and the build was not failing. As an alternative, I tested the patches on a source tree for which I had manually broken the CPU detection (so that getarch_2nd does not compile as on the faulty buildds), and the compilation succeeded with the patch. Hope this helps,
--- openblas-0.1.1/debian/rules 2012-06-03 06:40:28.000000000 +0000 +++ /home/sebastien/debian/openblas-0.1.1/debian/rules 2012-06-12 19:16:43.004368375 +0000 @@ -9,6 +9,7 @@ ENABLE_DYNAMIC_ARCHS := amd64 i386 kfreebsd-amd64 kfreebsd-i386 ifneq (,$(findstring $(DEB_HOST_ARCH),$(ENABLE_DYNAMIC_ARCHS))) DYNAMIC_ARCH_ARG="DYNAMIC_ARCH=1" + TARGET_GENERIC_ARG="TARGET=GENERIC" endif build: build-arch @@ -18,7 +19,7 @@ build-stamp: if test "$(TARGET)" = ""; then \ echo "Support multiple architectures"; \ - $(MAKE) $(COMMON_MAKE_OPTIONS) $(DYNAMIC_ARCH_ARG); \ + $(MAKE) $(COMMON_MAKE_OPTIONS) $(DYNAMIC_ARCH_ARG) $(TARGET_GENERIC_ARG); \ fi if test "$(TARGET)" = "custom"; then \
Description: Fix profile for generic CPU The macros have been renamed for all CPU except the generic one. This patch fixes this. Author: Sébastien Villemot <sebastien.ville...@ens.fr> Last-Update: 2012-06-12 Forwarded: no --- openblas-0.1.1.orig/param.h +++ openblas-0.1.1/param.h @@ -1586,26 +1586,26 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF #define XGEMM_DEFAULT_UNROLL_M 1 #endif -#define SGEMM_P sgemm_p -#define DGEMM_P dgemm_p -#define QGEMM_P qgemm_p -#define CGEMM_P cgemm_p -#define ZGEMM_P zgemm_p -#define XGEMM_P xgemm_p +#define SGEMM_DEFAULT_P sgemm_p +#define DGEMM_DEFAULT_P dgemm_p +#define QGEMM_DEFAULT_P qgemm_p +#define CGEMM_DEFAULT_P cgemm_p +#define ZGEMM_DEFAULT_P zgemm_p +#define XGEMM_DEFAULT_P xgemm_p -#define SGEMM_R sgemm_r -#define DGEMM_R dgemm_r -#define QGEMM_R qgemm_r -#define CGEMM_R cgemm_r -#define ZGEMM_R zgemm_r -#define XGEMM_R xgemm_r +#define SGEMM_DEFAULT_R sgemm_r +#define DGEMM_DEFAULT_R dgemm_r +#define QGEMM_DEFAULT_R qgemm_r +#define CGEMM_DEFAULT_R cgemm_r +#define ZGEMM_DEFAULT_R zgemm_r +#define XGEMM_DEFAULT_R xgemm_r -#define SGEMM_Q 128 -#define DGEMM_Q 128 -#define QGEMM_Q 128 -#define CGEMM_Q 128 -#define ZGEMM_Q 128 -#define XGEMM_Q 128 +#define SGEMM_DEFAULT_Q 128 +#define DGEMM_DEFAULT_Q 128 +#define QGEMM_DEFAULT_Q 128 +#define CGEMM_DEFAULT_Q 128 +#define ZGEMM_DEFAULT_Q 128 +#define XGEMM_DEFAULT_Q 128 #define SYMV_P 16
-- Sébastien Villemot Researcher in Economics & Debian Maintainer http://www.dynare.org/sebastien Phone: +33-1-40-77-84-04 - GPG Key: 4096R/381A7594
pgpyca07ia2MJ.pgp
Description: PGP signature