From owner-freebsd-ports@FreeBSD.ORG Sat Nov 10 00:00:31 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 446033F1 for ; Sat, 10 Nov 2012 00:00:31 +0000 (UTC) (envelope-from liangtai.s4@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E359F8FC12 for ; Sat, 10 Nov 2012 00:00:29 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id l1so5805434vba.13 for ; Fri, 09 Nov 2012 16:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=22szkIo96KPTTGO5sNdZfnf+zG7UI5wURNdR6iYzP2I=; b=ZJk8Aag5H6kXhqS/ZrPTsmQ48wjMU6BMtYyy69ZmOTUGuSPR00aNd4g+0f1ymzXEtB wi9q5rfC91Kh2RLtuE9SiMQHk38mzex/CSaSfI7Beb2yTTVemeD4sVhGziwPmcYC+gxp e7d6OvP1sVJhgjrrUbGC376b6+9/1/tPzCbhGlYCaUNpavpMT6r7/qLld6rR5Wog3c8w dmyendjGyTlQ60EpwMy1YutBApmt4BQBScxWJd21Piusr9s1EY5qiAekxG3DPwpmqIum eICHvgqQxt6K5KZX8kScuo4Q0HKMxceXwvZ7HCLKn+0iQ8g7BzePYJqYyyCd3wDOD/F/ ImmQ== MIME-Version: 1.0 Received: by 10.58.221.228 with SMTP id qh4mr7509317vec.49.1352505629083; Fri, 09 Nov 2012 16:00:29 -0800 (PST) Received: by 10.221.6.137 with HTTP; Fri, 9 Nov 2012 16:00:29 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Nov 2012 09:00:29 +0900 Message-ID: Subject: Re: extconf.rb always fails at databases/rrdtool with CC=clang in /etc/make.conf From: =?UTF-8?Q?Ry=C5=8DTa_SimaMoto?= To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 00:00:31 -0000 I am sorry I made misunderstanding to this issue. Once CC=3D is set when ruby is built, it seems that ruby remembers this in lib/ruby/1.9/i386-freebsd9/rbconfig.rb file. That is why generated Makefile from extconf.rb always invokes the same compiler even if environmental parameter is changed to other settings in /etc/make.conf later. 2012/11/10, Ry=C5=8DTa SimaMoto : > Hi, > > Selecting RUBY_MODULE option for databases/rrdtool, and if you use > 'clang' as the default compiler > by setting CC=3Dclang at /etc/make.conf, this port would stop with the > following error message, > and any environmental setting like as USE_GCC=3Dany could not affect. > > gmake[4]: Leaving directory > `/usr/ports/databases/rrdtool/work/rrdtool-1.4.7/bindings/perl-shared' > cd ruby && /usr/local/bin/ruby extconf.rb && gmake EPREFIX=3D/usr/local > sitedir=3D/usr/local/lib/ruby RUBYARCHDIR=3D > checking for rrd_create() in -lrrd... yes > creating Makefile > gmake[4]: Entering directory > `/usr/ports/databases/rrdtool/work/rrdtool-1.4.7/bindings/ruby' > linking shared-object RRD.so > clang: warning: argument unused during compilation: > '-rpath=3D/usr/lib:/usr/local/lib' > clang: warning: argument unused during compilation: > '-rpath=3D/usr/lib:/usr/local/lib' > /usr/local/lib: file not recognized: File format not recognized > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > gmake[4]: *** [RRD.so] Error 1 > gmake[4]: Leaving directory > `/usr/ports/databases/rrdtool/work/rrdtool-1.4.7/bindings/ruby' > gmake[3]: *** [ruby] Error 2 > <..snipped..> > > Here is excerpt from my /etc/make.conf: > CC=3Dclang > CXX=3Dclang++ > CPP=3Dclang-cpp > RUBY_DEFAULT_VER=3D1.9 > PERL_VERSION=3D5.14.2 > > Port's switches for running make (WITH_GCC=3D4.6 and WITH_GCC=3Dany) are > ignored when the ruby > binding module creates Makefile from extconf.rb, then it always > invokes clang, and note > that CC=3Dclang happens at perl module Makefile from Makefile.PL too. > > Is there a way to get a good relationship between clang and ruby > extconf.rb? Or can I > have exact option for completely masking CC=3D and CXX=3D settings in > /etc/make.conf? >