From owner-freebsd-ports@FreeBSD.ORG Thu Apr 14 06:00:40 2011 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 548EF1065672 for ; Thu, 14 Apr 2011 06:00:40 +0000 (UTC) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA0F8FC13 for ; Thu, 14 Apr 2011 06:00:39 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1QAFbb-0003Hb-5M>; Thu, 14 Apr 2011 08:00:39 +0200 Received: from e178006238.adsl.alicedsl.de ([85.178.6.238] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1QAFbb-0000Q2-2C>; Thu, 14 Apr 2011 08:00:39 +0200 Message-ID: <4DA68D86.3000102@mail.zedat.fu-berlin.de> Date: Thu, 14 Apr 2011 08:00:38 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110319 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: bf1783@gmail.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.6.238 Cc: brooks@freebsd.org, "b. f." , freebsd-ports@FreeBSD.org Subject: Re: Does USE_GCC= 4.5+ also set C++ and Fortran to g++45/46 and gfortran45/46? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2011 06:00:40 -0000 On 04/13/11 20:59, b. f. wrote: >> Using a self brewn port of a scientific software package which is >> intended to use gcc 4.5 or higher, I use "USE_GCC= 4.5+" in the top >> level Makefile. But I get an error when starting the application: >> >> /libexec/ld-elf.so.1: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.11 >> required by /usr/local/isis/3.2.1/bin/qview not found >> >> Building the software without the ports-framework but with explicitely >> set GCC/G++/GFORTRAN results in a working binary. >> >> My question: is USE_GCC setting C++ and Fortran compilers as desired as >> well as the C compiler? > > You should be using USE_FORTRAN if a Fortran compiler is needed (this > also enforces USE_GCC=4.5), and USE_GCC if only C and/or C++ compilers > are needed. This should set the right variables in your build > environment (see ports/Mk/bsd.gcc.mk), but a build can still fail if > your local, port, or distribution Makefiles do not respect CC, CXX, > CFLAGS, CXXFLAGS, F77, FC, FFLAGS, or LDFLAGS. It sounds as if this > is the case, and the Wl,-rpath=... component of the flags added in > bsd.gcc.mk is not being used. > > b. The package/software, called ISIS3 (USGS software), uses old-style, cascaded scripts and plain ASCII config files. It seems that in one of them CC or CXX got overwritten. I fixed that and the first attempt with the plain gcc as it comes with the system had a positive result. I'll try the USE_FORTRAN tag to force using gcc45. I looked into ports/Mk/bsd.gcc.mk and found that only gcc45 is set in case of using USE_FORTRAN, not gcc46. It would be nice also having gcc46 set, since we try to optimise for AVX in the new Intel Sandy-Bridge CPUs and gcc46 is supoorting new facilities like that. Thanks, I'll report if having success anyway. Oliver