From cmt@elch.exwg.net  Wed Mar 12 19:02:31 2014
Return-Path: <cmt@elch.exwg.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 5CD573CA
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 19:02:31 +0000 (UTC)
Received: from smtp.burggraben.net (base.exwg.net [IPv6:2a01:4f8:140:50a2::2])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 1B06031C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 19:02:30 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by smtp.burggraben.net (Postfix) with ESMTP id 752346003CF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 20:02:28 +0100 (CET)
Received: from smtp.burggraben.net ([127.0.0.1])
	by localhost (ns.burggraben.net [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id XYlyOssJGIZ1 for <FreeBSD-gnats-submit@freebsd.org>;
	Wed, 12 Mar 2014 20:02:27 +0100 (CET)
Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7b43:1:6a05:caff:fe01:aae9])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "elch.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK))
	by smtp.burggraben.net (Postfix) with ESMTPS
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Mar 2014 20:02:27 +0100 (CET)
Received: by elch.exwg.net (Postfix, from userid 1000)
	id F02BC301A9; Wed, 12 Mar 2014 20:02:24 +0100 (CET)
Message-Id: <20140312190224.F02BC301A9@elch.exwg.net>
Date: Wed, 12 Mar 2014 20:02:24 +0100 (CET)
From: Christoph Moench-Tegeder <cmt@burggraben.net>
Reply-To: Christoph Moench-Tegeder <cmt@burggraben.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: math/atlas : really needs USE_GCC
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         187501
>Category:       ports
>Synopsis:       math/atlas : really needs USE_GCC
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 12 19:10:00 UTC 2014
>Closed-Date:    Sat Mar 15 20:02:59 CET 2014
>Last-Modified:  Sat Mar 15 19:10:00 UTC 2014
>Originator:     Christoph Moench-Tegeder
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD elch.exwg.net 10.0-RELEASE FreeBSD 10.0-RELEASE #2 r260689: Wed Jan 15 18:32:44 CET 2014 cmt@elch.exwg.net:/usr/obj/usr/src/sys/ELCH amd64

gcc-4.7.3                      lang/gcc
atlas-3.8.4_4,1                math/atlas

>Description:
	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.

>How-To-Repeat:

>Fix:

Simple patch:

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.


Regards,
Christoph
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bf 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 12 19:10:08 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187501 

From: "Arjan Gijsberts" <arjangijsberts@gmail.com>
To: <bug-followup@FreeBSD.org>,
	<cmt@burggraben.net>
Cc:  
Subject: Re: ports/187501: math/atlas : really needs USE_GCC
Date: Sat, 15 Mar 2014 01:15:12 +0100

 This is a multipart message in MIME format.
 
 ------=_NextPart_000_000D_01CF3FEC.044C8870
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 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
 
 
 ------=_NextPart_000_000D_01CF3FEC.044C8870
 Content-Type: text/plain;
 	name="patch.txt"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="patch.txt"
 
 --- Makefile.orig	2014-03-14 14:41:40.000000000 +0100=0A=
 +++ Makefile	2014-03-14 14:50:06.000000000 +0100=0A=
 @@ -86,7 +86,6 @@=0A=
  .  endif=0A=
  .endfor=0A=
  =0A=
 -EXTRA_FLAGS?=3D	-Wl,-rpath=3D${_GCC_RUNTIME}=0A=
  SHARED_FLAGS=3D	${PTHREAD_CFLAGS} ${PICFLAG} -DPIC=0A=
  SHARED_LAPACK_WRKSRC=3D	WRKSRC_SHARED=0A=
  STATIC_FLAGS=3D	${PTHREAD_CFLAGS}=0A=
 @@ -108,7 +107,7 @@=0A=
  		${WRKSRC}/CONFIG/ARCHS/Makefile=0A=
  	@${REINPLACE_CMD} -e "s|gcc|${CC}|" ${WRKSRC}/CONFIG/ARCHS/Makefile=0A=
  	@${REINPLACE_CMD} -e "\|OS=3DALL|{N; s|'gcc'|'${CC}'|; \=0A=
 -		s|'gfortran'|'${FC}'|; s|-mavx|-msse3|;s|'| ${EXTRA_FLAGS}'|4;}" \=0A=
 +		s|'gfortran'|'${FC}'|; s|-mavx|-msse3|;s|'| ${FFLAGS}'|4;}" \=0A=
  		${WRKSRC}/CONFIG/src/atlcomp.txt=0A=
  	@${REINPLACE_CMD} -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|" \=0A=
  		-e "s|%%CC%%|${CC}|" \=0A=
 
 ------=_NextPart_000_000D_01CF3FEC.044C8870--
 
State-Changed-From-To: open->closed 
State-Changed-By: tijl 
State-Changed-When: Sat Mar 15 20:02:07 CET 2014 
State-Changed-Why:  
Committed in r348373. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187501 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/187501: commit references a PR
Date: Sat, 15 Mar 2014 19:01:43 +0000 (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"
 
>Unformatted:
