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-43112: detect musl as a separate SOABI #24502

Merged
merged 10 commits into from Jan 28, 2022
Merged

Conversation

ncopa
Copy link
Contributor

@ncopa ncopa commented Feb 10, 2021

musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.

Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.

https://bugs.python.org/issue43112

Automerge-Triggered-By: GH:brettcannon

musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.

Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.
tiran
tiran previously requested changes Feb 10, 2021
Copy link
Member

@tiran tiran left a comment

You also have to re-generate configure script with autoreconf and commit the new configure file.

@bedevere-bot
Copy link

bedevere-bot commented Feb 10, 2021

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ncopa
Copy link
Contributor Author

ncopa commented Feb 10, 2021

I have made the requested changes; please review again

@bedevere-bot
Copy link

bedevere-bot commented Feb 10, 2021

Thanks for making the requested changes!

@tiran: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from tiran Feb 10, 2021
@tiran
Copy link
Member

tiran commented Feb 11, 2021

@uranusjr
Copy link
Contributor

uranusjr commented Feb 11, 2021

Unfortunately I don’t have the required autoconf knowledge to understand what’s going on here :(

@stratakis
Copy link
Contributor

stratakis commented Feb 11, 2021

I'd remove the runstatedir changes, as those are generated due to either a later version of autoconf, or from one where that change was backported from upstream. However when someone makes another change to the configure script it can be removed again depending on the autoconf capabilities of the developer's machine.

See also: https://bugs.python.org/issue40216

@tiran
Copy link
Member

tiran commented Feb 12, 2021

Unfortunately I don’t have the required autoconf knowledge to understand what’s going on here :(

The magic happens here:

  case "$build_os" in
  linux-musl*)
    PLATFORM_TRIPLET=`echo "$PLATFORM_TRIPLET" | sed 's/linux-gnu/linux-musl/'`
    ;;
  esac

The shell code roughly translates to

if build_os.startswith("linux-musl"):
    PLATFORM_TRIPLET = PLATFORM_TRIPLET.replace("linux-gnu", "linux-musl")

This changes the SOABI from cpython-39-x86_64-linux-gnu to cpython-39-x86_64-linux-musl on all platforms that identify as Linux with musl libc.

@uranusjr
Copy link
Contributor

uranusjr commented Feb 12, 2021

Thanks for the explaination. Where does $build_os come from?

Am I correct to assume this needs to be done in the post-processing instead of conftest.c because musl provides no compile time detection on its usage (instead of glibc)?

@tiran
Copy link
Member

tiran commented Feb 12, 2021

build_os is provided by autoconf, https://www.gnu.org/software/autoconf/manual/autoconf-2.68/autoconf.html#index-build_005fos-1848

We could modify conftest.c, but it would take much more effort. We would have add a dozen ifdef checks for musl. GCC uses a similar approach like this patch in https://github.com/gcc-mirror/gcc/blob/master/gcc/config/t-musl . $(subst ...) is a Makefile command to substitute text.

@uranusjr
Copy link
Contributor

uranusjr commented Feb 12, 2021

Thanks. I still can’t say I really know how the code works, but kind of understand now what’s going on, and the approach makes sense to me.

@ncopa
Copy link
Contributor Author

ncopa commented Mar 2, 2021

I think we may also need something like this:

diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index e279957e26..83ce74aa6f 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -387,10 +387,13 @@ def test_triplet_in_ext_suffix(self):
         if re.match('(i[3-6]86|x86_64)$', machine):
             if ctypes.sizeof(ctypes.c_char_p()) == 4:
                 self.assertTrue(suffix.endswith('i386-linux-gnu.so') or
-                                suffix.endswith('x86_64-linux-gnux32.so'),
+                                suffix.endswith('x86_64-linux-gnux32.so') or
+                                suffix.endswith('i386-linux-musl.so'),
                                 suffix)
             else: # 8 byte pointer size
-                self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix)
+                self.assertTrue(suffix.endswith('x86_64-linux-gnu.so') or
+                                suffix.endswith('x86_64-linux-musl.so'),
+                                suffix)
 
     @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test')
     def test_osx_ext_suffix(self):

@github-actions
Copy link

github-actions bot commented Apr 2, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 2, 2021
@tiran tiran removed their request for review Apr 17, 2021
@alex
Copy link
Member

alex commented Nov 1, 2021

@ncopa I believe you are correct that those tests need to be updated

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/125/builds/1335) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/125/builds/1335

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_gdb: 3 min 11 sec
  • test_concurrent_futures: 3 min 9 sec
  • test_peg_generator: 2 min 57 sec
  • test_multiprocessing_spawn: 2 min 44 sec
  • test_tokenize: 1 min 34 sec
  • test_asyncio: 1 min 31 sec
  • test_multiprocessing_forkserver: 1 min 30 sec
  • test_unparse: 1 min 17 sec
  • test_multiprocessing_fork: 1 min 15 sec
  • test_capi: 1 min 8 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 3 min 19 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_bfac2716'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/234/builds/1338) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/234/builds/1338

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_asyncio: 5 min 51 sec
  • test_concurrent_futures: 3 min 41 sec
  • test_multiprocessing_spawn: 3 min 38 sec
  • test_tokenize: 3 min 29 sec
  • test_unparse: 3 min 5 sec
  • test_capi: 2 min 12 sec
  • test_lib2to3: 2 min 3 sec
  • test_multiprocessing_forkserver: 1 min 55 sec
  • test_unicodedata: 1 min 29 sec
  • test_multiprocessing_fork: 1 min 28 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 5 min 59 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/244/builds/1593) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/244/builds/1593

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

416 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 7 sec
  • test_multiprocessing_spawn: 2 min 6 sec
  • test_tools: 1 min 52 sec
  • test_multiprocessing_forkserver: 1 min 25 sec
  • test_multiprocessing_fork: 1 min 18 sec
  • test_tokenize: 1 min 16 sec
  • test_unparse: 1 min 7 sec
  • test_asyncio: 53.3 sec
  • test_signal: 50.8 sec
  • test_lib2to3: 49.5 sec

1 test failed:
test_sysconfig

15 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_smtpnet test_ssl test_startfile test_tix test_tk
test_ttk_guionly test_winconsoleio test_winreg test_winsound
test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 5 min 59 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_ec48f60d'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_e36178fd'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_5e7d5339'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/442/builds/1498) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/442/builds/1498

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

417 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 7 sec
  • test_tools: 2 min 24 sec
  • test_multiprocessing_fork: 1 min 29 sec
  • test_multiprocessing_spawn: 1 min 26 sec
  • test_multiprocessing_forkserver: 1 min 10 sec
  • test_nntplib: 1 min 8 sec
  • test_signal: 47.4 sec
  • test_asyncio: 42.8 sec
  • test_imaplib: 36.6 sec
  • test_tokenize: 36.5 sec

1 test failed:
test_sysconfig

14 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib test_nis
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 4 min 27 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_ceff1fcc'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_d85ba40d'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_fa0a7f59'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang Installed 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/14/builds/1380) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/14/builds/1380

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

414 tests OK.

1 test failed:
test_sysconfig

16 tests skipped:
test_asdl_parser test_check_c_globals test_clinic test_devpoll
test_gdb test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 2 min 52 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.11/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_79ae5246'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.11/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_4ad7a7fd'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.11/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/78/builds/1567) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/78/builds/1567

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

418 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 52 sec
  • test_multiprocessing_spawn: 1 min 40 sec
  • test_multiprocessing_forkserver: 1 min 13 sec
  • test_asyncio: 1 min 13 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_nntplib: 1 min 7 sec
  • test_signal: 47.4 sec
  • test_io: 38.3 sec
  • test_imaplib: 32.4 sec
  • test_xmlrpc: 27.6 sec

1 test failed:
test_sysconfig

13 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 3 min 4 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_e1f4053a'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_8af0922b'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_11d570d8'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL7 LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/402/builds/1589) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/402/builds/1589

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

417 tests OK.

10 slowest tests:

  • test_peg_generator: 3 min 8 sec
  • test_concurrent_futures: 3 min 6 sec
  • test_multiprocessing_spawn: 2 min 2 sec
  • test_tools: 1 min 52 sec
  • test_multiprocessing_forkserver: 1 min 23 sec
  • test_unparse: 1 min 19 sec
  • test_multiprocessing_fork: 1 min 17 sec
  • test_tokenize: 1 min 16 sec
  • test_asyncio: 59.5 sec
  • test_signal: 49.7 sec

1 test failed:
test_sysconfig

14 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_smtpnet
test_ssl test_startfile test_tix test_tk test_ttk_guionly
test_winconsoleio test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 6 min 48 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_24734b0b'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_f20ac751'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_90499736'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/567/builds/1481) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/567/builds/1481

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

418 tests OK.

10 slowest tests:

  • test_peg_generator: 3 min 30 sec
  • test_concurrent_futures: 2 min 51 sec
  • test_tools: 2 min 24 sec
  • test_multiprocessing_spawn: 2 min 16 sec
  • test_gdb: 2 min 14 sec
  • test_multiprocessing_fork: 1 min 35 sec
  • test_multiprocessing_forkserver: 1 min 16 sec
  • test_nntplib: 1 min 6 sec
  • test_asyncio: 1 min
  • test_signal: 48.0 sec

1 test failed:
test_sysconfig

13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_nis
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 7 min 32 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_4da4559f'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_ff2a6fcf'


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_d92cfde5'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/338/builds/1486) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/338/builds/1486

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_peg_generator: 5 min 20 sec
  • test_concurrent_futures: 2 min 55 sec
  • test_gdb: 2 min 9 sec
  • test_multiprocessing_spawn: 1 min 47 sec
  • test_multiprocessing_forkserver: 1 min 21 sec
  • test_asyncio: 1 min 18 sec
  • test_multiprocessing_fork: 1 min 10 sec
  • test_nntplib: 1 min 7 sec
  • test_signal: 47.6 sec
  • test_io: 41.9 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 5 min 21 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_cfa1b527'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_60c649be'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_7e23ad6b'

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/524/builds/1339) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/524/builds/1339

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

418 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 43 sec
  • test_multiprocessing_spawn: 1 min 42 sec
  • test_multiprocessing_forkserver: 1 min 12 sec
  • test_nntplib: 1 min 6 sec
  • test_multiprocessing_fork: 1 min 5 sec
  • test_subprocess: 55.2 sec
  • test_asyncio: 53.4 sec
  • test_signal: 47.3 sec
  • test_socket: 37.9 sec
  • test_io: 36.3 sec

1 test failed:
test_sysconfig

13 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 2 min 46 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_bd495cf1'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_295005df'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_a627e597'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/559/builds/1261) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/559/builds/1261

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_gdb: 9 min 24 sec
  • test_peg_generator: 3 min 49 sec
  • test_multiprocessing_spawn: 3 min 25 sec
  • test_concurrent_futures: 3 min 24 sec
  • test_unparse: 2 min 52 sec
  • test_tokenize: 2 min 44 sec
  • test_multiprocessing_forkserver: 1 min 48 sec
  • test_capi: 1 min 48 sec
  • test_lib2to3: 1 min 39 sec
  • test_unicodedata: 1 min 32 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 9 min 25 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value

@bedevere-bot
Copy link

bedevere-bot commented Jan 28, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/336/builds/1248) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/336/builds/1248

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_peg_generator: 5 min 13 sec
  • test_concurrent_futures: 2 min 47 sec
  • test_gdb: 1 min 40 sec
  • test_multiprocessing_spawn: 1 min 29 sec
  • test_multiprocessing_forkserver: 1 min 13 sec
  • test_nntplib: 1 min 7 sec
  • test_multiprocessing_fork: 1 min 6 sec
  • test_asyncio: 58.8 sec
  • test_signal: 47.3 sec
  • test_socket: 36.9 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 5 min 22 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_b9701fe7'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_02a1b82c'

self.assertTrue(suffix.endswith(expected_suffixes),
f'unexpected suffix {suffix!r}')
Copy link

@tianon tianon Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally a neophyte here, but I think the buildbot failures might be due to this? This appears like it should've been indented to be inside the if re.match(... block, ala:

Suggested change
self.assertTrue(suffix.endswith(expected_suffixes),
f'unexpected suffix {suffix!r}')
self.assertTrue(suffix.endswith(expected_suffixes),
f'unexpected suffix {suffix!r}')

Copy link
Member

@merwok merwok Jan 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, that would be it, only one level of dedent was expected!

brettcannon added a commit to brettcannon/cpython that referenced this issue Jan 29, 2022
@bedevere-bot
Copy link

bedevere-bot commented Jan 29, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 LTO + PGO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/458/builds/1303) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/458/builds/1303

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

418 tests OK.

10 slowest tests:

  • test_concurrent_futures: 3 min 3 sec
  • test_multiprocessing_spawn: 1 min 47 sec
  • test_multiprocessing_forkserver: 1 min 14 sec
  • test_tokenize: 1 min 13 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_asyncio: 57.7 sec
  • test_unparse: 52.9 sec
  • test_capi: 49.0 sec
  • test_signal: 47.9 sec
  • test_io: 40.7 sec

1 test failed:
test_sysconfig

13 tests skipped:
test_devpoll test_gdb test_ioctl test_kqueue test_msilib
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 3 min 58 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_baa5c5d3'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_987e13b0'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_c047c888'

merwok added a commit that referenced this issue Jan 29, 2022
@merwok
Copy link
Member

merwok commented Jan 29, 2022

Thanks tianon, created #31001

@bedevere-bot
Copy link

bedevere-bot commented Jan 29, 2022

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE RHEL8 LTO 3.x has failed when building commit 1f036ed.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/361/builds/1306) and take a look at the build logs.
  4. Check if the failure is related to this commit (1f036ed) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/361/builds/1306

Failed tests:

  • test_sysconfig

Failed subtests:

  • test_triplet_in_ext_suffix - test.test_sysconfig.TestSysConfig

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

419 tests OK.

10 slowest tests:

  • test_peg_generator: 7 min 33 sec
  • test_gdb: 4 min 22 sec
  • test_concurrent_futures: 3 min 12 sec
  • test_multiprocessing_spawn: 1 min 58 sec
  • test_multiprocessing_forkserver: 1 min 18 sec
  • test_tokenize: 1 min 15 sec
  • test_multiprocessing_fork: 1 min 8 sec
  • test_asyncio: 1 min 1 sec
  • test_unparse: 58.7 sec
  • test_io: 57.5 sec

1 test failed:
test_sysconfig

12 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg
test_winsound test_zipfile64

1 re-run test:
test_sysconfig

Total duration: 7 min 56 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/test/test_sysconfig.py", line 439, in test_triplet_in_ext_suffix
    self.assertTrue(suffix.endswith(expected_suffixes),
                                    ^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'expected_suffixes' where it is not associated with a value


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_bce9806a'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_9eb00698'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le.lto/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '/psm_104a5c42'

pablogsal pushed a commit that referenced this issue Jan 29, 2022
@ncopa ncopa deleted the bpo-43112 branch Mar 16, 2022
@@ -5351,6 +5351,11 @@ EOF

if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
case "$build_os" in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken, PLATFORM_TRIPLET should refer to the target platform on which cpython will run. If that is the case, the musl libc vs. glibc decision should be based on $host_os rather than $build_os as the former is based on autoconf's AC_CANONICAL_HOST macro1 which refers to the target platform that might differ from build platform in case of cross-compilation.

For example, the decision based on $build_os leads to
cpython 3.9.13 build failing2 when cross-compiling on AMD64 Linux with glibc for mpc8548 Linux (OpenWrt) with musl. (build runs correctly if $host_os is used)

Footnotes

  1. https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Canonicalizing.html

  2. "internal configure error for the platform triplet, please file a bug report"

Copy link
Member

@tiran tiran Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the code is wrong. In fact the entire block should be revisited. We really should check for __GLIBC__ and use a heuristic to detect musl. Could you please open a new issue for the problem?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, but there's #87278 already. Is yet another issue needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #95855

autobakterie added a commit to autobakterie/packages that referenced this issue Aug 4, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
autobakterie added a commit to autobakterie/packages that referenced this issue Sep 12, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
neheb pushed a commit to openwrt/packages that referenced this issue Sep 12, 2022
Patch 030:
Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI.

Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.

See included patches for more detailed descriptions.

Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled.

[^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI'
[^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf

Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 automerge PR will be merged once it's been approved and all CI passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet