subversion-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anatol Pomozov (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SVN-4841) Subversion fails to compile with ruby-2.7
Date Sat, 09 May 2020 19:29:00 GMT

    [ https://issues.apache.org/jira/browse/SVN-4841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103442#comment-17103442
] 

Anatol Pomozov commented on SVN-4841:
-------------------------------------

I do not know the decision making arguments behind the current Subversion's maintenance schedule.
But I wonder if there is a chance to make a point release for the latest released version
- 1.13. A lot of distros (including Arch Linux that I am focusing at) use 1.13 and it will
be helpful for them to get SWIG4, ruby27 and other fixes.

Or maybe 1.14 can be released in the nearest future?

> Subversion fails to compile with ruby-2.7
> -----------------------------------------
>
>                 Key: SVN-4841
>                 URL: https://issues.apache.org/jira/browse/SVN-4841
>             Project: Subversion
>          Issue Type: Bug
>          Components: bindings_swig_ruby
>    Affects Versions: 1.13.0
>         Environment: Arch Linux with ruby 2.7
>            Reporter: Anatol Pomozov
>            Assignee: James McCoy
>            Priority: Major
>             Fix For: 1.14.0
>
>
> I am trying to compile subversion with ruby-2.7 and there is an issue:
>  
> first there is a suspicious compiler warning:
> {noformat}
> gcc: error: unrecognized command line option ‘-prefer-pic’
> [root@wolf subversion-1.13.0]# gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -pthread
-Wno-int-to-pointer-cast -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -DQT_DBUS_LIB
-DQT_GUI_LIB -DQT_CORE_LIB -I/build/subversion/src/subversion-1.13.0/subversion -I/build/subversion/src/subversion-1.13.0/subversion/include
-I/build/subversion/src/subversion-1.13.0/subversion/bindings/swig -I/build/subversion/src/subversion-1.13.0/subversion/bindings/swig/include
-I/build/subversion/src/subversion-1.13.0/subversion/bindings/swig/proxy -I/build/subversion/src/subversion-1.13.0/subversion/bindings/swig/proxy
-I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include -I. -I/usr/include/ruby-2.7.0 -I/usr/include/ruby-2.7.0/ruby
-I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0/x86_64-linux -I/build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/libsvn_swig_ruby
-c -o subversion/bindings/swig/ruby/svn_client.lo subversion/bindings/swig/ruby/svn_client.c
> subversion/bindings/swig/ruby/svn_client.c: In function ‘SWIG_Ruby_ConvertPtrAndOwn’:
> subversion/bindings/swig/ruby/svn_client.c:1666:13: warning: implicit declaration of
function ‘assert’ [-Wimplicit-function-declaration]
>  1666 | assert(own); /* badly formed typemap which will lead to a memory leak - it must
set and use own to delete *ptr */
>  | ^~~~~~
> subversion/bindings/swig/ruby/svn_client.c:1394:1: note: ‘assert’ is defined in header
‘<assert.h>’; did you forget to ‘#include <assert.h>’?
>  1393 | #include "assert.h"
>  +++ |+#include <assert.h>
>  1394 |{noformat}
>  
> Then ruby tests fail:
> {noformat}
> /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': /build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/libsvn_swig_ruby/.libs/libsvn_swig_ruby-1.so.0:
undefined symbol: assert - /build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/.ext/svn/ext/core.so
(LoadError)
> 	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
> 	from /build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/svn/error.rb:21:in
`<top (required)>'
> 	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
> 	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
> 	from /build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/svn/core.rb:25:in
`<top (required)>'
> 	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
> 	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
> 	from /build/subversion/src/subversion-1.13.0/subversion/bindings/swig/ruby/test/run-test.rb:47:in
`<main>'
> make: *** [Makefile:962: check-swig-rb] Error 1{noformat}
>  
> After some debugging I found that ruby-2.7 introduced a new file under '/usr/include/ruby-2.7.0/ruby/assert.h'
and subversion build includes path '/usr/include/ruby-2.7.0/' before standard includes path.
Thus ruby's version of "assert.h" gets included and it contains no definition of assert()
function.
>  
> Is it something you can fix?
>  
> I feel that /usr/include/ruby-2.7.0/ include path should be enough for subversion. No
need to include /usr/include/ruby-2.7.0/ruby and /usr/include/ruby-2.7.0/backward in build/ac-macros/swig.m4
> {noformat}
>     AC_CACHE_CHECK([for Ruby include path], [svn_cv_ruby_includes],[
>     if test -d "$rbconfig_rubyhdrdir"; then
>       dnl Ruby >=1.9
>       svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward"
>       if test -d "$rbconfig_rubyarchhdrdir"; then
>         dnl Ruby >=2.0
>         svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir"
>       else
>         svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch"
>       fi
>     else
>       dnl Ruby 1.8
>       svn_cv_ruby_includes="-I. -I$rbconfig_archdir"
>     fi
>     ])
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message