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

Re: [PATCH] fix unable to load *.pyd files with Python 3.8.x on Windows

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 12 May 2020 12:17:17 +0200

On Tue, May 12, 2020 at 7:47 AM Jun Omae <jun66j5_at_gmail.com> wrote:
>
> Hi,
>
> On Tue, May 12, 2020 at 4:33 AM Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> > [[[
> > C:\research\svn\dev\trunk>python win-tests.py --log-level=DEBUG
> > --debug --swig=python R:\test_swigpython
> > Testing Debug configuration on local repository.
> > -- Running Swig Python tests --
> > Fatal Python error: _PyInterpreterState_Get(): no current thread state
> > Python runtime state: unknown
> >
> > [Test runner reported failure]
> > ]]]
> >
> > Any ideas?
> > (Note: it's entirely possible that I did something wrong here locally :-))
>
> Python bindings is unable to build with Debug mode. Instead, try to
> build and test with Release mode.
>
> The limitation is described in subversion/bindings/swig/INSTALL:
>
> [[[
> NOTE: Our Python SWIG bindings will currently NOT compile in Debug mode
> unless you have python24_d.lib (which binary distributions of
> Python do not contain). Therefore, the Python bindings will only
> compile in Release mode. (This is due to pyconfig.h using the
> _DEBUG flag too and setting a #pragma comment(lib) value.)
> ]]]

I'm not sure that's the problem, because I did build them (seemingly
successfully) in Debug mode.

Yes, first the build failed (with an error about missing
python38_d.lib). But then I reran the Python 3.8.2 installer (Windows
32-bit -- I have everything built with 32-bit for now), and on the
last screen of the installer I checked "Install debug symbols" and
"Install debug binaries (Requires at least Visual Studio 2015)". After
that, the file python38_d.lib was present in the Python installation:

[[[
C:\research\svn\dev\trunk>dir C:\Python38-32\libs
 Volume in drive C has no label.
 Volume Serial Number is 2636-2424

 Directory of C:\Python38-32\libs

10/05/2020 16:26 <DIR> .
10/05/2020 16:26 <DIR> ..
25/02/2020 23:30 174.392 python3.lib
25/02/2020 23:30 364.012 python38.lib
25/02/2020 23:30 368.618 python38_d.lib
25/02/2020 23:30 176.006 python3_d.lib
25/02/2020 23:30 1.746 _tkinter.lib
]]]

And building the __SWIG_PYTHON__ target in Debug configuration (x86)
did succeed.

But then I got that new error when trying to run the swig-python tests.

I'll try again later with Release mode. But just wanted to let you
know that the problem was not with building, but rather at runtime.

-- 
Johan
Received on 2020-05-12 12:17:41 CEST

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.