Ruby and clang 3.4

Steve Wills swills at freebsd.org
Tue Feb 25 05:44:05 UTC 2014


Hi,

Thanks, I've committed the patch, with slight modifications for 2.0 and 2.1.
I've also reported the bug to upstream.

Steve

On Wed, Feb 19, 2014 at 03:52:33PM +0100, Antoine Brodin wrote:
> Hi there,
> 
> With clang 3.4  (imported 3 days ago in head),  ruby has problems
> configuring / building dl.so.
> Logs for ruby19 and ruby 20 are available at
> http://package21.nyi.freebsd.org/bulk/head-default-baseline/2014-02-18_15h22m08s/logs/errors/ruby-1.9.3.484_1,1.log
>  and  http://package21.nyi.freebsd.org/bulk/head-default-baseline/2014-02-18_15h22m08s/logs/errors/ruby20-2.0.0.353_4,1.log
> 
> ...
> configuring dl
> Failed to configure dl. It will not be installed.
> configuring dl/callback
> Failed to configure dl/callback. It will not be installed.
> configuring dl/win32
> Failed to configure dl/win32. It will not be installed.
> ...
> 
> ===>  Building package for ruby-1.9.3.484_1,1
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/include/ruby-1.9/ruby/dl.h):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/amd64-freebsd11/dl/callback.so):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/amd64-freebsd11/dl.so):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/callback.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/cparser.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/func.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/import.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/pack.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/stack.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/struct.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/types.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/value.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl.rb):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/dl/):
> No such file or directory
> pkg-static: lstat(/wrkdirs/usr/ports/lang/ruby19/work/stage/usr/local/lib/ruby/1.9/amd64-freebsd11/dl/):
> No such file or directory
> 
> 
> This is due to clang 3.4 rejecting -fno-defer-pop
> 
> I have the following patch for ruby19:
> 
> Index: lang/ruby19/files/patch-ext__dl__extconf.rb
> ===================================================================
> --- lang/ruby19/files/patch-ext__dl__extconf.rb (revision 0)
> +++ lang/ruby19/files/patch-ext__dl__extconf.rb (working copy)
> @@ -0,0 +1,12 @@
> +--- ./ext/dl/extconf.rb.orig   2010-02-25 22:49:20.000000000 +0000
> ++++ ./ext/dl/extconf.rb        2014-02-18 22:06:44.000000000 +0000
> +@@ -1,7 +1,8 @@
> + require 'mkmf'
> +
> + if RbConfig::CONFIG['GCC'] == 'yes'
> +-  $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer"
> ++  $CFLAGS << " -fno-defer-pop" unless have_macro("__clang__")
> ++  $CFLAGS << " -fno-omit-frame-pointer"
> + end
> +
> + $INSTALLFILES = [
> 
> Cheers,
> 
> Antoine
> _______________________________________________
> freebsd-ruby at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ruby
> To unsubscribe, send any mail to "freebsd-ruby-unsubscribe at freebsd.org"


More information about the freebsd-ruby mailing list