Bug#1027025: [Debichem-devel] Bug#1027025: psi4: FTBFS with Python 3.11 as default version

2023-01-07 Thread Michael Banck
Hi James,

On Thu, Jan 05, 2023 at 04:14:24PM +, James Addison wrote:
> Source: psi4
> Version: 1:1.3.2+dfsg-3
> Followup-For: Bug #1027025
> 
> I've opened a merge request[1] to address what I thought was a
> cmake-related build failure cause on Python 3.11, described in my
> previous message.. however it looks like the package has built
> successfully since then - so I might have been on the wrong track
> there (apologies).

Thanks, I've merged it.

I think it always built fine, but psi4 was broken at runtime so all the
tests failed, but that did not lead to a build failure. With your patch,
most of the tests pass and I'll have to investigate the remaining
numerical issues.


Michael



Bug#1027025: psi4: FTBFS with Python 3.11 as default version

2023-01-05 Thread James Addison
Source: psi4
Version: 1:1.3.2+dfsg-3
Followup-For: Bug #1027025

I've opened a merge request[1] to address what I thought was a cmake-related 
build failure cause on Python 3.11, described in my previous message.. however 
it looks like the package has built successfully since then - so I might have 
been on the wrong track there (apologies).

[1] - https://salsa.debian.org/debichem-team/psi4/-/merge_requests/1



Bug#1027025: psi4: FTBFS with Python 3.11 as default version

2023-01-03 Thread James Addison
Source: psi4
Version: 1:1.3.2+dfsg-3
Followup-For: Bug #1027025
X-Debbugs-Cc: j...@jp-hosting.net

Based on some upstream discussion[1] of the same ImportError, it looks like 
this is
related to the PYTHON_MODULE_EXTENSION suffix applied to the 'core' module at 
build-time
by pybind11-related build infrastructure.

During these build failures, the module is compiled with filename 'coreNone' 
instead of
the expected filename 'core.', and that results in import-time 
errors.

The cause relates to a Python distutils.sysconfig config var named "SO" (used to
retrieve a compiled module's filename, including suffix), which was 
deprecated[2] in
Python 3.4 in favour of a var named "EXT_SUFFIX" that provides similar 
information.

The reason that psi4 v1.3.2 breaks in combination with Python 3.11 is that it 
uses a
variant of pybind11's 'FindPythonLibsNew' helper module that predates the
SO-to-EXT_SUFFIX transition (it references[3] only the former var) when 
determining
the value for PYTHON_MODULE_EXTENSION.  In Python 3.11, the SO var is no longer
available.

pybind11 handled this by providing a fallback[4] behaviour from v2.6.0, with 
some
further adjustments[5] applied in v2.6.1.

Upstream psi4 separately resolved the problem by commenting-out[6] a reference 
to
PYTHON_MODULE_EXTENSION from psi4 version v1.4 and subsequent versions.

[1] - https://github.com/psi4/psi4/issues/2656

[2] - 
https://docs.python.org/3/whatsnew/3.4.html?highlight=ext_suffix#deprecations-in-the-python-api

[3] - 
https://github.com/psi4/psi4/blob/ecbda834b4bcce794ce2338873962f36436842a5/cmake/FindPythonLibsNew.cmake#L81

[4] - 
https://github.com/pybind/pybind11/commit/ad2fe0ee7b5c8db7fe134ac568a507cc5bdb0617#diff-db8b532c178000412cf20931528e1e68b1d44cdfb0cbd4ca9abfc6e35f368994R118

[5] - 
https://github.com/pybind/pybind11/commit/3e4d54bc0181eb7aad2ac52a2a18be18c1ab9aee

[6] - 
https://github.com/psi4/psi4/pull/2048/commits/4074de6e76c933308ff092fd48a2420d84384b31#diff-d514c3ebd329db7a94a92197c524ff69f55581d6eff60f7013690e8d7483a353R150



Bug#1027025: psi4: FTBFS with Python 3.11 as default version

2022-12-26 Thread Graham Inggs
Source: psi4
Version: 1:1.3.2+dfsg-3
Severity: serious
Tags: ftbfs
User: debian-pyt...@lists.debian.org
Usertags: python3.11

Hi Maintainer

Psi4 fails its build-time tests with Python 3.11 as the default
version, although the build doesn't fail outright, probably because of
the following in debian/rules:

override_dh_auto_test:
mkdir -p $(CURDIR)/builddir/tmp-scratch
-(cd builddir/tests; CTEST_OUTPUT_ON_FAILURE=TRUE ctest -L quicktests)

I've copied what I hope is the relevant part of the log below.

Regards
Graham


Traceback (most recent call last):
  File "/<>/builddir/stage/bin/psi4", line 177, in 
import psi4
  File "/<>/builddir/stage/lib/x86_64-linux-gnu/psi4/__init__.py",
line 60, in 
raise ImportError("{0}".format(err))
ImportError: cannot import name 'core' from partially initialized
module 'psi4' (most likely due to a circular import)
(/<>/builddir/stage/lib/x86_64-linux-gnu/psi4/__init__.py)
Exit Status: infile ( 1 ); autotest ( None ); sowreap ( None ); overall ( 1 )


0% tests passed, 143 tests failed out of 143