You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lev Serebryakov <le...@FreeBSD.org> on 2020/05/31 15:27:23 UTC

Can not build 1.14.0 python3 bindings without SWIG installed

Hello Users,

   Documentation says, that SWIG is optional to build Python/Perl/Ruby/Java
  bindings. I'm trying to build python bindings, with python 3.7.7
  installed, but without SWIG.

   I get this error:

--- .swig_py_checked ---
--- /usr/home/lev/FreeBSD/ports/devel/py-subversion/work-py37/subversion-1.14.0/subversion/bindings/swig/python/libsvn ---
--- subversion/bindings/swig/python/svn_client.lo ---
--- subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.lo ---
--- .swig_py_checked ---
SWIG python disabled at configure time: SWIG version is not suitable
*** [.swig_py_checked] Error code 1

make[1]: stopped in /usr/home/lev/FreeBSD/ports/devel/py-subversion/work-py37/subversion-1.14.0

 Configure stage looks like this:

configure: Configuring python swig binding
checking for Python includes... -I/usr/local/include/python3.7m
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
configure: py3c library configuration via pkg-config
checking for py3c library... yes
checking for compiling Python extensions... cc -pthread -fPIC
checking for linking Python extensions... cc -pthread -shared -L/usr/local/lib -fstack-protector-strong
checking for linking Python libraries... -L/usr/local/lib
checking for Python >= 3... yes
test: : bad number
configure: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer
test: : bad number


 subversion/bindings/swig/INSTALL says:

    * SWIG installation is optional.  You do not need to install SWIG
      if you are using a Subversion distribution tarball because it already
      contains the source files generated by SWIG.  You will need a suitable
      version of SWIG if you are using a working copy of Subversion's sources
      checked out from the repository; if you want to generate the SWIG
      language bindings C source files by yourself; or if you want to build
      Python 2.x bindings (since the SWIG-generated C source files in the
      distribution tarballs target Python 3.x).

-- 
Best regards,
 Lev                          mailto:lev@FreeBSD.org


Re: Can not build 1.14.0 python3 bindings without SWIG installed

Posted by Lev Serebryakov <le...@FreeBSD.org>.
Hello Yasuhito,

Sunday, May 31, 2020, 10:41:44 PM, you wrote:

> If there is no swig executable, or there exist swig executable which version
> is 3.0.10 or newer in the PATH, then it can be avoid without passing
> --without-swig option to configure.

  `--without-swig` doesn't help without patch. I'll try patch, thank you!


-- 
Best regards,
 Lev                            mailto:lev@FreeBSD.org


Re: Can not build 1.14.0 python3 bindings without SWIG installed

Posted by Lev Serebryakov <le...@FreeBSD.org>.
Hello Yasuhito,

Sunday, May 31, 2020, 10:41:44 PM, you wrote:

> Or alternatively, apply attached patch, and pass --without-swig option
> to configure.
 This (and regeneration of configure) helps, thanks!

-- 
Best regards,
 Lev                            mailto:lev@FreeBSD.org


Re: Can not build 1.14.0 python3 bindings without SWIG installed

Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
Hi,

On 2020/06/01 0:27, Lev Serebryakov wrote:
> Hello Users,
> 
>    Documentation says, that SWIG is optional to build Python/Perl/Ruby/Java
>   bindings. I'm trying to build python bindings, with python 3.7.7
>   installed, but without SWIG.
> 
>    I get this error:
> 
> --- .swig_py_checked ---
> --- /usr/home/lev/FreeBSD/ports/devel/py-subversion/work-py37/subversion-1.14.0/subversion/bindings/swig/python/libsvn ---
> --- subversion/bindings/swig/python/svn_client.lo ---
> --- subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.lo ---
> --- .swig_py_checked ---
> SWIG python disabled at configure time: SWIG version is not suitable
> *** [.swig_py_checked] Error code 1
> 
> make[1]: stopped in /usr/home/lev/FreeBSD/ports/devel/py-subversion/work-py37/subversion-1.14.0
> 
>  Configure stage looks like this:
> 
> configure: Configuring python swig binding
> checking for Python includes... -I/usr/local/include/python3.7m
> checking Python.h usability... yes
> checking Python.h presence... yes
> checking for Python.h... yes
> configure: py3c library configuration via pkg-config
> checking for py3c library... yes
> checking for compiling Python extensions... cc -pthread -fPIC
> checking for linking Python extensions... cc -pthread -shared -L/usr/local/lib -fstack-protector-strong
> checking for linking Python libraries... -L/usr/local/lib
> checking for Python >= 3... yes
> test: : bad number
> configure: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer
> test: : bad number

We are sorry, this is a bug of configure, which is fixed in trunk but
is not back ported to 1.14.x yet.

If there is no swig executable, or there exist swig executable which version
is 3.0.10 or newer in the PATH, then it can be avoid without passing
--without-swig option to configure.

If there is swig executable in the PATH and its version is not 3.0.10 or
newer, it is need to make fake executable like:
[[[
#!/bin/sh
echo Version 3.0.12
]]]
and explicitly specify it by --with-swig=/path/to/fake-script.

Or alternatively, apply attached patch, and pass --without-swig option
to configure.

Cheers,
-- 
Yasuhito FUTATSUKI <fu...@yf.bsclub.org>

Re: Can not build 1.14.0 python3 bindings without SWIG installed

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Lev Serebryakov wrote on Sun, 31 May 2020 15:27 +00:00:
> make[1]: stopped in 
> /usr/home/lev/FreeBSD/ports/devel/py-subversion/work-py37/subversion-1.14.0

Why wasn't this regression found before the final 1.14.0 release?  It
seems to be the kind of bug that the release candidate / soak process
was designed to catch.

Cheers,

Daniel