You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David James <ja...@gmail.com> on 2006/01/01 21:23:03 UTC

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

On 12/30/05, peter@famlundblad.se <pe...@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?

Note the TODO in r17280. (TODO: We should disable this code for new
versions of SWIG, when this SWIG bug is fixed.)

See http://sourceforge.net/mailarchive/forum.php?thread_id=9320590&forum_id=46758
for discussion of this bug on the SWIG list.

> 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.

Cheers,

David



--
David James -- http://www.cs.toronto.edu/~james

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


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

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <df...@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 <ja...@gmail.com> wrote:

> > 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.

In <20...@p12n.org>
  "Re: swig-rb 1.3.x r17949: FAIL (i686-pc-linux-gnu shared)" on Mon, 2 Jan 2006 15:19:20 -0600,
  Peter Samuelson <pe...@p12n.org> wrote:

> >      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)"
> >      ])
> 
> Uh ... -fno-strict-aliasing isn't just to suppress warnings.  It is a
> functional change to work around bugs exposed by gcc type aliasing
> optimisations.  As such, it really has nothing to do with -Wall.  I
> mean, either you want it or you don't.

I fixed this problem in r18015 by overriding SWIG default
typemap instead of -fno-strict-aliasing.


Thanks,
--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Peter Samuelson <pe...@p12n.org>.
[Kouhei Sutou]
>      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)"
>      ])

Uh ... -fno-strict-aliasing isn't just to suppress warnings.  It is a
functional change to work around bugs exposed by gcc type aliasing
optimisations.  As such, it really has nothing to do with -Wall.  I
mean, either you want it or you don't.

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

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <df...@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 <ja...@gmail.com> wrote:

> On 12/30/05, peter@famlundblad.se <pe...@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