From owner-freebsd-ports@FreeBSD.ORG Wed Apr 13 18:59:09 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 E234F1065676 for ; Wed, 13 Apr 2011 18:59:09 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id B93AB8FC15 for ; Wed, 13 Apr 2011 18:59:09 +0000 (UTC) Received: by pvg11 with SMTP id 11so421507pvg.13 for ; Wed, 13 Apr 2011 11:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:date:message-id:subject :from:to:cc:content-type; bh=3FZeWLNFz0DVmYDhsRzztBZD2fzcPiBLKA+aTnrY+ow=; b=L5JT59jgYVcn6oecnL5ytm0BXIcUP+m1DOXtujOCXimhDDdjhcM3aPb9qrBhJvVJIN VgwKjyMUJY//Hka6KzfOJDWHGfSreaRLLeW+pgTtKdX7rdHfXoATa1fqlDMQIDfNrGxl +YRe2RT3oqk4+sYJT+e0cGPiC3g6XCKrPWWLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; b=KTwjLk3Ouk4NTZ+jVvwNJZIhJGLlSgpwCqON1mOnSD3EFpRKNHbKliwt2rJTr6knnV X6Fq0n5ygVmOz9W0jNxWlNfpkL2px/PZm6Mawz+UnfTRS+sFMRazeZxzbrAaxZH1F8bO CvFz96dfqmIz2i2AgTZjvm9OZ4sdKGGjHgCPo= MIME-Version: 1.0 Received: by 10.143.84.9 with SMTP id m9mr7733207wfl.54.1302721149170; Wed, 13 Apr 2011 11:59:09 -0700 (PDT) Received: by 10.68.41.129 with HTTP; Wed, 13 Apr 2011 11:59:09 -0700 (PDT) Date: Wed, 13 Apr 2011 18:59:09 +0000 Message-ID: From: "b. f." To: "O. Hartmann" Content-Type: text/plain; charset=ISO-8859-1 Cc: 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 Reply-To: bf1783@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2011 18:59:10 -0000 > 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.