Bug 187501 - math/atlas : really needs USE_GCC
Summary: math/atlas : really needs USE_GCC
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brendan Fabeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-12 19:10 UTC by Christoph Moench-Tegeder
Modified: 2014-03-15 19:10 UTC (History)
0 users

See Also:


Attachments
patch.txt (766 bytes, text/plain)
2014-03-15 00:15 UTC, arjangijsberts
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Moench-Tegeder freebsd_committer 2014-03-12 19:10:00 UTC
	The build of math/atlas fails:

: 1 warning generated.
: cmnd=make IRunCComp CC='cc' CCFLAGS='-O -fomit-frame-pointer -Wl,-rpath=   ' | fgrep SUCCESS
:    cc -O -fomit-frame-pointer -Wl,-rpath=    : SUCCESS!
: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc47/libgfortran.so.3 not found
: cmnd=make IRunF77Comp F77='gfortran47' F77FLAGS='-O -Wl,-rpath=   -m64' | fgrep SUCCESS
:    gfortran47 -O -Wl,-rpath=   -m64 : FAILURE!
: g77: not found
: cmnd=make IRunF77Comp F77='g77' F77FLAGS='-O -Wl,-rpath=   ' | fgrep SUCCESS
   g77 -O -Wl,-rpath=    : FAILURE!
: f77: not found
: cmnd=make IRunF77Comp F77='f77' F77FLAGS='-O -Wl,-rpath=   ' | fgrep SUCCESS
:    f77 -O -Wl,-rpath=    : FAILURE!
:
:
: Unable to find usable compiler for F77; abortingMake sure compilers are in your path, and specify good compilers to configure
: (see INSTALL.txt or 'configure --help' for details)*** Error code 7

Relevant part is the "/lib/libgcc_s.so.1: version GCC_4.6.0 required by
/usr/local/lib/gcc47/libgfortran.so.3 not found", also please note
"-Wl,-rpath=". mat/atlas' Makefile uses EXTRA_FLAGS to pass the rpath to
the linker, as in "EXTRA_FLAGS?=   -Wl,-rpath=${_GCC_RUNTIME}", but
_GCC_RUNTIME is not set:
: cmt@elch:atlas$ make -V _GCC_RUNTIME
: 
: cmt@elch:atlas$

I traced this back to USE_GCC not being set, even though ports commit r344614
http://svnweb.freebsd.org/ports?view=revision&sortby=date&revision=344614
explicitly mentions using "USES=fortran, USE_GCC=yes". Looks like
math/atlas needs the USE_GCC after all.

For lack of time I did not test this with other ports modified in r344614.

Fix: Simple patch:



Regards,
Christoph--imft9FrvDYTEMvlwBpnB39DXC9U3BUaZQmFmSfApxaZzFJZX
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: Makefile
===================================================================
--- Makefile	(revision 347994)
+++ Makefile	(working copy)
@@ -18,6 +18,7 @@
 
 USE_BZIP2=	yes
 USES=		fortran
+USE_GCC=	yes
 
 CONFLICTS=	atlas-devel-[0-9]* cblas-[0-9]*
 MANUAL_PACKAGE_BUILD=	Optimizes for the local machine.
Comment 1 Edwin Groothuis freebsd_committer 2014-03-12 19:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bf

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 arjangijsberts 2014-03-15 00:15:12 UTC
Hi,

I ran into the same problem on a 9.2 system. The underlying problem seems to
be that the required rpath should be set via EXTRA_FLAGS, which in return
relies on _GCC_RUNTIME. This latter variable is however not set by
Uses/fortran.mk, causing the linking problem with the base libraries.

USE=gcc sets _GCC_RUNTIME  and thus solves this issue, but it might be
neater to instead replace EXTRA_FLAGS in the Makefile with FFLAGS. The
latter variable is set by Uses/fortran.mk and specifies the correct rpath.
This solution would avoid the need for USE=gcc and for the EXTRA_FLAGS
variable in the Makefile. This solution compiles and runs fine on my system
(see attached patch).

Best,

Arjan
Comment 3 dfilter service freebsd_committer 2014-03-15 19:01:43 UTC
Author: tijl
Date: Sat Mar 15 19:01:39 2014
New Revision: 348373
URL: http://svnweb.freebsd.org/changeset/ports/348373
QAT: https://qat.redports.org/buildarchive/r348373/

Log:
  Fixup for USES=fortran conversion.  These ports require USE_GCC=yes
  because they depend on gcc specific optimisation flags.
  
  While here use USES=tar:bzip2.
  
  PR:		ports/187501
  Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net>

Modified:
  head/math/atlas-devel/Makefile
  head/math/atlas/Makefile

Modified: head/math/atlas-devel/Makefile
==============================================================================
--- head/math/atlas-devel/Makefile	Sat Mar 15 18:48:53 2014	(r348372)
+++ head/math/atlas-devel/Makefile	Sat Mar 15 19:01:39 2014	(r348373)
@@ -16,8 +16,8 @@ IGNORE =	: dependent ports have been alt
 use that port instead of math/atlas-devel, while the latter is being revised
 MANUAL_PACKAGE_BUILD=	Optimizes for the local machine.
 
-USES=		fortran gmake
-USE_BZIP2=	yes
+USES=		fortran gmake tar:bzip2
+USE_GCC=	yes
 WRKSRC=		${WRKDIR}/ATLAS
 USE_LDCONFIG=	yes
 CONFLICTS=	atlas-[0-9]* cblas-[0-9]*

Modified: head/math/atlas/Makefile
==============================================================================
--- head/math/atlas/Makefile	Sat Mar 15 18:48:53 2014	(r348372)
+++ head/math/atlas/Makefile	Sat Mar 15 19:01:39 2014	(r348373)
@@ -16,8 +16,8 @@ LICENSE=	BSD
 
 BUILD_DEPENDS=	${NONEXISTENT}:${PORTSDIR}/math/lapack:checksum
 
-USE_BZIP2=	yes
-USES=		fortran
+USES=		fortran tar:bzip2
+USE_GCC=	yes
 
 CONFLICTS=	atlas-devel-[0-9]* cblas-[0-9]*
 MANUAL_PACKAGE_BUILD=	Optimizes for the local machine.
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Tijl Coosemans freebsd_committer 2014-03-15 19:02:07 UTC
State Changed
From-To: open->closed

Committed in r348373.