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

RyōTa SimaMoto liangtai.s4 at gmail.com
Sat Nov 10 00:00:31 UTC 2012


I am sorry I made misunderstanding to this issue.

Once CC= 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ōTa SimaMoto <liangtai.s4 at gmail.com>:
> 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