Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2007 14:15:14 -0800 (PST)
From:      Don Lewis <truckman@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        maho@FreeBSD.org
Subject:   ports/118270: ports/math/atlas (3.6.0_4, 1) does not build with gcc 4.2.x on i386
Message-ID:  <200711262215.lAQMFERC027345@mousie.catspoiler.org>
Resent-Message-ID: <200711262230.lAQMU1TO063293@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118270
>Category:       ports
>Synopsis:       ports/math/atlas (3.6.0_4,1) does not build with gcc 4.2.x on i386
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 26 22:30:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Don Lewis
>Release:        FreeBSD 7.0-BETA3 i386
>Organization:
totally disorganized
>Environment:
System: FreeBSD mousie.catspoiler.org 7.0-BETA3 FreeBSD 7.0-BETA3 #32: Fri Nov 23 09:50:45 PST 2007 dl@mousie.catspoiler.org:/usr/obj/usr/src/sys/GENERICDDB i386


>Description:

The atlas port build fails with a misleading message about not having a
pre-2.9.6 version of gcc installed when building on a version of FreeBSD
7 or 8 where the native compiler is gcc 4.2.x.

[snip]
     /usr/bin/gcc  : v4.2.1
  F77 = /usr/local/bin/gfortran42 -O
  CC = /usr/bin/cc -fomit-frame-pointer -O -mfpmath=387 -m32
  MCC = /usr/bin/cc -fomit-frame-pointer -O -mfpmath=387 -m32
  
  
  
  ATLAS has detected that you are running on an x86 architecture
  (eg., Athlon, P4, PIII, etc), but do not have a pre-2.96 gcc installed.
  Using gcc 3/2.96 will result in a performance loss of 10-20% IN THE BEST CASE
  over a gcc previous to 2.96.  If your install goes slightly wrong, performance
  drops of 50% are more normal with these compilers.  Full details of this
  problem can be found at:
     http://www.cs.utk.edu/~rwhaley/ATLAS/gcc30.html
  In the meantime, we suggest you abondon this ATLAS install, and install a gcc
  that delivers decent x86 performance, and restart the install then.  You
  do not need to be root to install, and full instructions, along with all
  needed files, are given in the ATLAS errata file at:
     http://math-atlas.sourceforge.net/errata.html#UnixGccInst
  
     Stop ATLAS install? [y]: *** Error code 255


According to <http://math-atlas.sourceforge.net/errata3.6.0.html#gcc4>,
gcc 4.2.x should work well for building ATLAS, but 4.0.x and 4.1.x should
not be used.

>How-To-Repeat:

Attempt to build the atlas port on an i386 machine with a version of
FreeBSD that uses gcc 4.2.x as its native compiler.

>Fix:

Either upgrade the port to the new stable version of ATLAS (3.8.0), or
apply the following patch to the port:

Index: math/atlas/files/patch-config.c
===================================================================
RCS file: /home/ncvs/ports/math/atlas/files/patch-config.c,v
retrieving revision 1.15
diff -u -r1.15 patch-config.c
--- math/atlas/files/patch-config.c	8 Mar 2007 08:26:19 -0000	1.15
+++ math/atlas/files/patch-config.c	21 Nov 2007 18:20:03 -0000
@@ -195,3 +195,15 @@
     char BC[256], BCFLAGS[256];
     int GOGO=0, L2IsKnown=0, Use3DNow=0, TuneL1=1;
     int USEDEFL1=0;
+--- config.c.orig	2007-11-21 10:14:34.000000000 -0800
++++ config.c	2007-11-21 10:15:38.000000000 -0800
+@@ -696,7 +696,8 @@
+       iret = 0;
+    else if ( MachIsX86(mach) ) /* don't use gcc 2.96 - 3.0 */
+    {
+-      if ((major == 2 && minor < 96) || (major == 3 && minor > 1))
++      if ((major == 2 && minor < 96) || (major == 3 && minor > 1) ||
++          (major == 4 && minor > 1))
+          iret = 1;
+    }
+    else if (mach == IA64Itan || mach == IA64Itan2 || MachIsUS(mach) ||

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711262215.lAQMFERC027345>