Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2012 02:37:43 +0900
From:      =?UTF-8?Q?Ry=C5=8DTa_SimaMoto?= <liangtai.s4@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   extconf.rb always fails at databases/rrdtool with CC=clang in /etc/make.conf
Message-ID:  <CABDoUfCLgWqfD1j6-Kv-eGer_9=zb89n7SwYW9V=KO30Lk_i5A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

Selecting RUBY_MODULE option for databases/rrdtool, and if you use
'clang' as the default compiler
by setting CC=clang at /etc/make.conf, this port would stop with the
following error message,
and any environmental setting like as USE_GCC=any 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=/usr/local
sitedir=/usr/local/lib/ruby RUBYARCHDIR=
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=/usr/lib:/usr/local/lib'
clang: warning: argument unused during compilation:
'-rpath=/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=clang
  CXX=clang++
  CPP=clang-cpp
  RUBY_DEFAULT_VER=1.9
  PERL_VERSION=5.14.2

Port's switches for running make (WITH_GCC=4.6 and WITH_GCC=any) are
ignored when the ruby
binding module creates Makefile from extconf.rb, then it always
invokes clang, and note
that CC=clang 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= and CXX= settings in
/etc/make.conf?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABDoUfCLgWqfD1j6-Kv-eGer_9=zb89n7SwYW9V=KO30Lk_i5A>