python / cpython

The Python programming language
https://www.python.org
Other
62.59k stars 30.04k forks source link

EXT_SUFFIX too short on FreeBSD and AIX #86770

Closed mattip closed 3 years ago

mattip commented 3 years ago
BPO 42604
Nosy @vstinner, @mattip, @pablogsal, @miss-islington
PRs
  • python/cpython#23708
  • python/cpython#23866
  • python/cpython#23867
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['3.8', 'build', '3.7', '3.9', '3.10'] title = 'EXT_SUFFIX too short on FreeBSD and AIX' updated_at = user = 'https://github.com/mattip' ``` bugs.python.org fields: ```python activity = actor = 'vstinner' assignee = 'none' closed = True closed_date = closer = 'vstinner' components = ['Build'] creation = creator = 'mattip' dependencies = [] files = [] hgrepos = [] issue_num = 42604 keywords = ['patch'] message_count = 13.0 messages = ['382767', '383299', '383306', '383387', '383413', '383414', '383415', '383417', '385347', '385351', '385356', '385357', '385959'] nosy_count = 4.0 nosy_names = ['vstinner', 'mattip', 'pablogsal', 'miss-islington'] pr_nums = ['23708', '23866', '23867'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = None url = 'https://bugs.python.org/issue42604' versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10'] ```

    mattip commented 3 years ago

    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?

    mattip commented 3 years ago

    vstinner: ping. Are merge builds still failing or can I close this?

    vstinner commented 3 years ago

    test_sysconfig still fails:

    mattip commented 3 years ago

    The linked PR 23708 is meant to fix the failures. Any chance you can take a look?

    pablogsal commented 3 years ago

    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

    miss-islington commented 3 years ago

    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

    pablogsal commented 3 years ago

    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

    pablogsal commented 3 years ago

    Thanks for the PR, mattip!

    vstinner commented 3 years ago

    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: PyInituuid.cpython-310d ld: 0711-327 WARNING: Entry point not found: PyInitmultiprocessing.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?

    pablogsal commented 3 years ago

    Can it be related to the commit a44ce6c9f725d336aea51a946b42769f29fed613 of this issue?

    Quite likely. @mattip, can you investigate?

    vstinner commented 3 years ago

    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.

    mattip commented 3 years ago

    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.

    vstinner commented 3 years ago

    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.