Re: Python tests segfault with SWIG 4.1.0

2022-09-20 Thread Yasuhito FUTATSUKI
On 2022/09/20 15:16, Yasuhito FUTATSUKI wrote:
> On 2022/09/20 1:09, Jitka Plesnikova wrote:

>> I reported it to swig upstream
>> https://github.com/swig/swig/issues/2373  and got answer that it is related 
>> to change "Remove -py3 command line option"
>> https://github.com/swig/swig/commit/a343b7e254567a64761bc1be7dc55b7b7424ec52
>>
>> Recommended fix works.
>> https://github.com/swig/swig/issues/2373#issuecomment-1250997124
>>
>> Successful build with swig 4.1.0
>> https://copr.fedorainfracloud.org/coprs/jplesnik/swig-rebuild/build/4863479/
> 
> Thank you for the report. I could confirm the fix with SWIG
> commit 9081e3e87894e018912048c2e4127800efca0feb
> (Mon Sep 19 15:10:30 2022 +0100).

I've commited a fix in r1904167, and nominate it for back port to
1.14.x.

Also, I'll fix the configure script and gen_win_dependency.py
so that we don't pass deprecated options to SWIG > 4.1.0 and
warn against unchecked future versions of SWIG.

Cheers,
-- 
Yasuhito FUTATSUKI 


Re: Python tests segfault with SWIG 4.1.0

2022-09-20 Thread Yasuhito FUTATSUKI
Hello,

On 2022/09/20 1:09, Jitka Plesnikova wrote:
> Hi,
> 
> I am testing rebuild of SWIG dependencies against upcoming version 4.1.0 in 
> Fedora rawhide/38.
> 
> The build of subversion-1.14.2 is failing with this version.
> 
> + make check-swig-py
> mkdir 
> /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn
> if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in 
> /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn_swig_py
>  
> /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/../../../libsvn_*;
>  do if [ -n "$DYLD_LIBRARY_PATH" ]; then 
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; 
> fi; done; export LD_LIBRARY_PATH; fi; \
> cd /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python; \
>   /usr/bin/python3 
> /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/tests/run_all.py
> 
> RPM build errors:
> make: *** [Makefile:947: check-swig-py] Segmentation fault (core dumped)
> + : Python swig test failure.
> + exit 1
> 
> I reported it to swig upstream
> https://github.com/swig/swig/issues/2373  and got answer that it is related 
> to change "Remove -py3 command line option"
> https://github.com/swig/swig/commit/a343b7e254567a64761bc1be7dc55b7b7424ec52
> 
> Recommended fix works.
> https://github.com/swig/swig/issues/2373#issuecomment-1250997124
> 
> Successful build with swig 4.1.0
> https://copr.fedorainfracloud.org/coprs/jplesnik/swig-rebuild/build/4863479/

Thank you for the report. I could confirm the fix with SWIG
commit 9081e3e87894e018912048c2e4127800efca0feb
(Mon Sep 19 15:10:30 2022 +0100).

However, it turned out that SWIG may make more backward incompatible
changes in future releases including 4.1.0, and those changes
won't bump up SWIG version number immeidately. So we can support
SWIG only past released versions.


By the way, ./autogen.sh --release assumes single SWIG version
(currently version 3.0.12) for SWIG_PY_OPT, which is hard coded in
build/generator/gen_make.py. This is because we use the option
only for generate release tar balls and assuming the environment
for it, without configure options.

To override it, please use

env SWIG_PY_OPT='-python -nofastpack' ./autogen.sh --release

for SWIG after commit a343b7e254567a64761bc1be7dc55b7b7424ec52
(or use ./autogen.sh without --release, and make clean-swig after
doing ./configure with appropriate options, for supported
SWIG version).

Cheers,
-- 
Yasuhito FUTATSUKI 


Python tests segfault with SWIG 4.1.0

2022-09-19 Thread Jitka Plesnikova

Hi,

I am testing rebuild of SWIG dependencies against upcoming version 4.1.0 in 
Fedora rawhide/38.

The build of subversion-1.14.2 is failing with this version.

+ make check-swig-py
mkdir 
/builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn
if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in 
/builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/libsvn_swig_py 
/builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/../../../libsvn_*; do if [ -n 
"$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else 
LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; \
cd /builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python; \
  /usr/bin/python3 
/builddir/build/BUILD/subversion-1.14.2/subversion/bindings/swig/python/tests/run_all.py

RPM build errors:
make: *** [Makefile:947: check-swig-py] Segmentation fault (core dumped)
+ : Python swig test failure.
+ exit 1

I reported it to swig upstream
https://github.com/swig/swig/issues/2373  
and got answer that it is related to change "Remove -py3 command line option"

https://github.com/swig/swig/commit/a343b7e254567a64761bc1be7dc55b7b7424ec52

Recommended fix works.
https://github.com/swig/swig/issues/2373#issuecomment-1250997124

Successful build with swig 4.1.0
https://copr.fedorainfracloud.org/coprs/jplesnik/swig-rebuild/build/4863479/

Regards,
Jitka

--
Jitka Plesnikova
Senior Software Engineer
Red Hat