extconf.rb always fails at databases/rrdtool with CC=clang in /etc/make.conf

RyōTa SimaMoto liangtai.s4 at gmail.com
Fri Nov 9 17:37:46 UTC 2012


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?


More information about the freebsd-ports mailing list