[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: swig-rb 1.3.x r17949: FAIL (i686-pc-linux-gnu shared)

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2006-01-02 10:45:42 CET

Hi,

In <df2177af0601011323rba520den7588bba539372be6@mail.gmail.com>
  "Re: swig-rb 1.3.x r17949: FAIL (i686-pc-linux-gnu shared)" on Sun, 1 Jan 2006 16:23:03 -0500,
  David James <james82@gmail.com> wrote:

> On 12/30/05, peter@famlundblad.se <peter@famlundblad.se> wrote:
> > error: 'SWIG_RubyRemoveTracking' undeclared (first use in this function)
>
> This error is caused by bugs in SWIG 1.3.26/1.3.27, which have not yet
> been fixed. I committed a workaround for this bug in r17280. Should we
> propose this fix for 1.3.1?

+1

> > subversion/bindings/swig/ruby/svn_client.c:7625: warning: dereferencing type-punned pointer will break strict-aliasing rules
> > [... lots of strict-aliasing warnings ...]
>
> Looks like the Ruby bindings need a configure check to add
> -fno-strict-aliasing. It might be possible to figure out whether
> no-strict-aliasing is needed by looking at the flags which were used
> to compile Ruby.

What about the attached patch?

Thanks,

--
kou

Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4 (revision 17953)
+++ build/ac-macros/swig.m4 (working copy)
@@ -176,7 +176,11 @@
     SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes"
 
     AC_CACHE_CHECK([how to compile Ruby extensions], [svn_cv_ruby_compile],[
- svn_cv_ruby_compile="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(CC)), %q( ), Config::CONFIG.fetch(%q(CFLAGS))'` \$(SWIG_RB_INCLUDES)"
+ svn_cv_ruby_compile="`$RUBY -rrbconfig -e 'print Config::CONFIG.fetch(%q(CC)), %q( ), Config::CONFIG.fetch(%q(CFLAGS))'`"
+ if echo $svn_cv_ruby_compile | grep -- -Wall > /dev/null 2>&1; then
+ svn_cv_ruby_compile="$svn_cv_ruby_compile -fno-strict-aliasing"
+ fi
+ svn_cv_ruby_compile="$svn_cv_ruby_compile \$(SWIG_RB_INCLUDES)"
     ])
     SWIG_RB_COMPILE="$svn_cv_ruby_compile"
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 2 10:46:33 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.