classification
Title: EXT_SUFFIX too short on FreeBSD and AIX
Type: Stage: resolved
Components: Build Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: mattip, miss-islington, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2020-12-08 21:53 by mattip, last changed 2021-01-29 23:59 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23708 merged mattip, 2020-12-08 22:09
PR 23866 merged miss-islington, 2020-12-20 02:57
PR 23867 merged miss-islington, 2020-12-20 02:57
Messages (13)
msg382767 - (view) Author: mattip (mattip) * Date: 2020-12-08 21:53
Continuation of bpo 39825, this time for FreeBSD and AIX. As commented there, the test added in the fix to 39825 fails on FreeBSD and AIX:

FAIL: test_EXT_SUFFIX_in_vars (test.test_sysconfig.TestSysConfig)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_sysconfig.py", line 368, in test_EXT_SUFFIX_in_vars
    self.assertEqual(vars['EXT_SUFFIX'], _imp.extension_suffixes()[0])
AssertionError: '.so' != '.cpython-310d.so'
- .so
+ .cpython-310d.so

So somehow EXT_SUFFIX is being set to .so rather than .cpython-310d.so.

It seems the difference in EXT_SUFFIX comes from this stanza in configure:

case $ac_sys_system in
    Linux*|GNU*|Darwin|VxWorks)
	EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
    *)
	EXT_SUFFIX=${SHLIB_SUFFIX};;
esac

where $ac_sys_system is `uname -s`. On FREEBSD, this is "FreeBSD", and I think on AIX it is "AIX". My preference would be to always set EXT_SUFFIX to ${SOABI}${SHLIB_SUFFIX}, with no option for setting it to a different value. Does that seem right?
msg383299 - (view) Author: mattip (mattip) * Date: 2020-12-18 14:05
vstinner: ping. Are merge builds still failing or can I close this?
msg383306 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-12-18 17:23
test_sysconfig still fails:

* POWER6 AIX 3.x: https://buildbot.python.org/all/#/builders/302/builds/563
* PPC64 AIX 3.x: https://buildbot.python.org/all/#/builders/438/builds/593
* AMD64 FreeBSD Shared 3.x: https://buildbot.python.org/all/#/builders/483/builds/572
msg383387 - (view) Author: mattip (mattip) * Date: 2020-12-19 16:53
The linked PR 23708 is meant to fix the failures. Any chance you can take a look?
msg383413 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-20 02:57
New changeset a44ce6c9f725d336aea51a946b42769f29fed613 by Matti Picus in branch 'master':
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708)
https://github.com/python/cpython/commit/a44ce6c9f725d336aea51a946b42769f29fed613
msg383414 - (view) Author: miss-islington (miss-islington) Date: 2020-12-20 03:17
New changeset b01091a3e71e6636d2df4db45920e820cdf7df3b by Miss Islington (bot) in branch '3.8':
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708)
https://github.com/python/cpython/commit/b01091a3e71e6636d2df4db45920e820cdf7df3b
msg383415 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-20 04:54
New changeset 4b155967b3e743cbdc31600f13f1bfcf07f7b6ce by Miss Islington (bot) in branch '3.9':
bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708) (GH-23866)
https://github.com/python/cpython/commit/4b155967b3e743cbdc31600f13f1bfcf07f7b6ce
msg383417 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-12-20 04:55
Thanks for the PR, mattip!
msg385347 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-20 15:35
I reopen the issue.

It seems like Python no long builds on PPC64 AIX 3.x buildbot:
https://buildbot.python.org/all/#/builders/438/builds/753

"setup.py build" crash with an assertion error:

Assertion failed: (item != NULL) ^ (PyErr_Occurred() != NULL), file  Objects/abstract.c, line 163

The linker also displays tons of warnings. Examples:

ld: 0711-327 WARNING: Entry point not found: PyInit__uuid.cpython-310d
ld: 0711-327 WARNING: Entry point not found: PyInit__multiprocessing.cpython-310d
ld: 0711-327 WARNING: Entry point not found: PyInit__tkinter.cpython-310d

Can it be related to the commit a44ce6c9f725d336aea51a946b42769f29fed613 of this issue?
msg385351 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-01-20 16:06
> Can it be related to the commit a44ce6c9f725d336aea51a946b42769f29fed613 of this issue?

Quite likely. @mattip, can you investigate?
msg385356 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-20 17:26
> Assertion failed: (item != NULL) ^ (PyErr_Occurred() != NULL), file  Objects/abstract.c, line 163

This is bpo-42979: "_zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure".

It's a side effect of the broken _datetime module.
msg385357 - (view) Author: mattip (mattip) * Date: 2021-01-20 18:02
I think this issue can only cause failed tests. `sysconfig.get_config_var('EXT_SUFFIX')` is, as far as I can tell, not used internally by any cpython build or import code.
msg385959 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-29 23:59
> It seems like Python no long builds on PPC64 AIX 3.x buildbot:
> https://buildbot.python.org/all/#/builders/438/builds/753

Sorry, it was unrelated to this issue. I fixed it with:

New changeset 0837f99d3367ecf200033bbddfa05d061ae9f483 by Victor Stinner in branch 'master':
bpo-42323: Fix math.nextafter() on AIX (GH-24381)

> This is bpo-42979: "_zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure".

_zoneinfo has also been fixed.
History
Date User Action Args
2021-01-29 23:59:05vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg385959
2021-01-20 18:02:12mattipsetmessages: + msg385357
2021-01-20 17:26:39vstinnersetmessages: + msg385356
2021-01-20 16:06:24pablogsalsetmessages: + msg385351
2021-01-20 15:35:50vstinnersetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg385347
2020-12-20 04:55:05pablogsalsetstatus: open -> closed
resolution: fixed
messages: + msg383417

stage: patch review -> resolved
2020-12-20 04:54:26pablogsalsetmessages: + msg383415
2020-12-20 03:17:49miss-islingtonsetmessages: + msg383414
2020-12-20 02:57:22miss-islingtonsetpull_requests: + pull_request22729
2020-12-20 02:57:13miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22728
2020-12-20 02:57:06pablogsalsetnosy: + pablogsal
messages: + msg383413
2020-12-19 16:53:04mattipsetmessages: + msg383387
2020-12-18 17:23:33vstinnersetmessages: + msg383306
2020-12-18 14:05:22mattipsetmessages: + msg383299
2020-12-08 22:09:01mattipsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22572
2020-12-08 21:53:22mattipcreate