Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure #23708

Merged
merged 2 commits into from
Dec 20, 2020

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Dec 8, 2020

Continuation of bpo 39825 which was fixed for windows in gh-22088. This fix is for non-linux systems like FreeBSD and AIX. Merging gh-22088 added a test which 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 EXT_SUFFIX is being set to .so rather than .cpython-310d.so. This is wrong, EXT_SUFFIX is expected to be .cpython-310d.so in this case.

The difference in EXT_SUFFIX comes from this stanza in configure and configure.ac:

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. This stanza was in the original version of the files, I am not sure why the original author differentiated between the two values for EXT_SUFFIX.

https://bugs.python.org/issue42604

@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 20, 2020
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit 75e9b23 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 20, 2020
@pablogsal pablogsal self-assigned this Dec 20, 2020
@pablogsal pablogsal requested a review from vstinner December 20, 2020 02:06
@pablogsal pablogsal merged commit a44ce6c into python:master Dec 20, 2020
@miss-islington
Copy link
Contributor

Thanks @mattip for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-23866 is a backport of this pull request to the 3.9 branch.

@bedevere-bot
Copy link

GH-23867 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 20, 2020
…onfigure (pythonGH-23708)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a44ce6c)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
miss-islington added a commit that referenced this pull request Dec 20, 2020
…onfigure (GH-23708)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a44ce6c)

Co-authored-by: Matti Picus <matti.picus@gmail.com>
pablogsal pushed a commit that referenced this pull request Dec 20, 2020
…onfigure (GH-23708) (GH-23866)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
(cherry picked from commit a44ce6c)

Co-authored-by: Matti Picus <matti.picus@gmail.com>

Co-authored-by: Matti Picus <matti.picus@gmail.com>
@fochoao
Copy link

fochoao commented Dec 29, 2020

The code can be made with a function with tuples or lists, instead of writing the same 5 or 6 times.

@pablogsal
Copy link
Member

The code can be made with a function with tuples or lists, instead of writing the same 5 or 6 times.

I think you may have written in the wrong issue/PR

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…onfigure (pythonGH-23708)

Now all platforms use a value for the "EXT_SUFFIX" build variable derived
from SOABI (for instance in FreeBSD, "EXT_SUFFIX" is now ".cpython-310d.so"
instead of ".so"). Previously only Linux, Mac and VxWorks were using a value
for "EXT_SUFFIX" that included "SOABI".

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
@fochoao
Copy link

fochoao commented May 6, 2021

The code can be made with a function with tuples or lists, instead of writing the same 5 or 6 times.
I think you may have written in the wrong issue/PR

Yes, it was the wrong project...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants