[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compiling refblas3 with gfortran 4.2



Hello Camm and GCC maintainers,

I heard about the idea of switch g77 to gfortran as the default Fortran
compiler (actually it was mentioned again today as the reply to the GCC
4.2 transition plan to d-d-a list).  As I use BLAS/LAPACK, I wanted to
play with building these Debian package with gfortran.

The first package I tried is refblas3.  I did some minimal and
incomplete change (the shlibs is definitely wrong, for example) and
successfully built the BLAS library, but then one of the tests failed
so the package FTBFS.  The error is:

awk '/fail/ || /FAIL/ {exit 1}' debian/test/xzcblat1 || (cat debian/test/xzcblat1 && false)
 Complex CBLAS Test Program Results
[...]
 Test of subprogram number 10         CBLAS_IZAMAX   
                                       FAIL

 CASE  N INCX INCY MODE                                COMP                                TRUE     DIFFERENCE

   10  4    1 9999 9999                                   3                                   2           1
   10  4    2 9999 9999                                   3                                   2           1
make: *** [debian/test/xzcblat1] Error 1

The changes I made is in attached debdiff.

It seems the building process only run the CBLAS tests, so I ran the
BLAS (Fortran interface) tests in the test/ directory as well, it turns
out IZAMAX is the only failure.

I also tried to turn optimization off, i.e., change F77FLAGS from "-pipe
-O3 -fomit-frame-pointer" to only "-pipe".  Then the IZMAX test passes,
however unfortunately ICAMAX test fails this time (and is also the only
failure).

As I don't know much about either BLAS implementation or GCC, and I
probably won't have much time to dig deeper, I'll just report my test
result, hope it is useful.

P.S.: I am not subscribed to -gcc list, please cc.

Regards,
Ming
2007.06.28
diff -u refblas3-1.2/debian/changelog refblas3-1.2/debian/changelog
--- refblas3-1.2/debian/changelog
+++ refblas3-1.2/debian/changelog
@@ -1,3 +1,11 @@
+refblas3 (1.2-8.1) UNRELEASED; urgency=low
+
+  * Build with gfortran instead of g77.
+    - Change shared library's SONAME version to 4.  The shlibs version isn't
+      changed though.
+
+ -- Ming Hua <minghua-guest@users.alioth.debian.org>  Thu, 28 Jun 2007 15:42:42 -0500
+
 refblas3 (1.2-8) unstable; urgency=high
 
   * Build depend on tetex-extra to get fancyvrb.sty.
diff -u refblas3-1.2/debian/control refblas3-1.2/debian/control
--- refblas3-1.2/debian/control
+++ refblas3-1.2/debian/control
@@ -2,7 +2,7 @@
 Priority: optional
 Maintainer: Camm Maguire <camm@enhanced.com>
 Standards-Version: 3.6.1
-Build-Depends: g77, debhelper ( >= 4 ), tetex-extra
+Build-Depends: gfortran, debhelper ( >= 4 ), tetex-extra
 Section: libs
 
 Package: refblas3
diff -u refblas3-1.2/debian/rules refblas3-1.2/debian/rules
--- refblas3-1.2/debian/rules
+++ refblas3-1.2/debian/rules
@@ -6,9 +6,9 @@
 # handled now in debian/compat
 #export DH_COMPAT=2
 
-F77:=g77
+F77:=gfortran
 GCC:=gcc
-F77FLAGS:= -pipe -O3 -fomit-frame-pointer -ff90
+F77FLAGS:= -pipe -O3 -fomit-frame-pointer
 #F77FLAGS:= -pipe -g -ff90
 
 ifeq ($(ARCH),alpha)
@@ -30,7 +30,7 @@
 #GCC:=gcc-3.0
 #endif
 
-SO=3
+SO=4
 VERS=$(SO).0
 
 VN:=$(shell pwd)

Reply to: