Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908187 - macOS Catalina prefix bootstrap fails: dev-lang/python-3.11.3: raise RuntimeError("Failed to build some stdlib modules")
Summary: macOS Catalina prefix bootstrap fails: dev-lang/python-3.11.3: raise RuntimeE...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-09 14:41 UTC by 2857
Modified: 2023-09-10 11:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
stage3.log, zstd compressed (stage3.log.zst,575.95 KB, application/zstd)
2023-06-09 14:41 UTC, 2857
Details
stage2.log, zstd compressed (stage2.log.zst,638.56 KB, application/zstd)
2023-06-09 14:42 UTC, 2857
Details
stage1.log, zstd compressed (stage1.log.zst,155.20 KB, application/zstd)
2023-06-09 14:42 UTC, 2857
Details
build.log, zstd compressed (build.log.zst,16.97 KB, application/zstd)
2023-06-09 14:46 UTC, 2857
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 2857 2023-06-09 14:41:34 UTC
Created attachment 863606 [details]
stage3.log, zstd compressed

Trying to install Gentoo prefix on macOS Catalina (10.15.7) fails:

$ ./bootstrap-prefix.sh 
... <snip> ...
 * 	/Volumes/backup/gentoo_prefix/tmp/usr/lib/pkgconfig/openssl.pc
 * 	/Volumes/backup/gentoo_prefix/tmp/usr/lib/pkgconfig/libssl.pc
 * 	/Volumes/backup/gentoo_prefix/tmp/usr/lib/pkgconfig/libcrypto.pc
 * 	/Volumes/backup/gentoo_prefix/tmp/etc/ssl/openssl.cnf
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * None of the installed packages claim the file(s).
 * 
 * Package 'dev-libs/openssl-1.1.1u' merged despite file collisions. If
 * necessary, refer to your elog messages for the whole content of the
 * above message.
 * Messages for package dev-lang/python-3.11.3:
 * ERROR: dev-lang/python-3.11.3::gentoo_prefix failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/python-3.11.3::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/python-3.11.3::gentoo_prefix'`.
 * The complete build log is located at '/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/temp/build.log'.
 * The ebuild environment file is located at '/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/temp/environment'.
 * Working directory: '/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3'
 * S: '/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3'
 * GNU info directory index is up-to-date.

Hmmmm, I was already afraid of this to happen.  Running
  /Volumes/backup/gentoo_prefix/usr/bin/bash ./bootstrap-prefix.sh "/Volumes/backup/gentoo_prefix" stage3
somewhere failed :(  Details might be found in the build log:
  /Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/temp/build.log
  (no build logs found?!?)
I have no clue, really.  Please find friendly folks in #gentoo-prefix on
irc.gentoo.org, gentoo-alt@lists.gentoo.org mailing list, or file a bug
at bugs.gentoo.org under Gentoo/Alt, Prefix Support.  This is most
inconvenient, and it crushed my ego.  Sorry, I give up.
Should you want to give it a try, there is /Volumes/backup/gentoo_prefix/stage3.log
Comment 1 2857 2023-06-09 14:42:34 UTC
Created attachment 863607 [details]
stage2.log, zstd compressed
Comment 2 2857 2023-06-09 14:42:59 UTC
Created attachment 863608 [details]
stage1.log, zstd compressed
Comment 3 2857 2023-06-09 14:46:37 UTC
Created attachment 863609 [details]
build.log, zstd compressed
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-10 04:30:29 UTC
*** WARNING: renaming "_ctypes" since importing it failed: dlopen(/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/build/lib.macosx-10.15-x86_64-3.11/_ctypes.cpython
-311-darwin.bundle, 2): Symbol not found: __dyld_shared_cache_contains_path
  Referenced from: /Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/build/lib.macosx-10.15-x86_64-3.11/_ctypes.cpython-311-darwin.bundle
  Expected in: flat namespace
 in /Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/build/lib.macosx-10.15-x86_64-3.11/_ctypes.cpython-311-darwin.bundle

The following modules found by detect_modules() in setup.py have not
been built, they are *disabled* by configure:
_dbm                  _gdbm                 _scproxy
_tkinter              nis                   ossaudiodev
readline


Following modules built successfully but were removed because they could not be imported:
_ctypes

Traceback (most recent call last):
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/./setup.py", line 1600, in <module>
    main()
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/./setup.py", line 1570, in main
    setup(# PyPI Metadata (PEP 301)
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Lib/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/./setup.py", line 523, in build_extensions
    self.summary(mods_built, mods_disabled)
  File "/Volumes/backup/gentoo_prefix/tmp/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/./setup.py", line 601, in summary
    raise RuntimeError("Failed to build some stdlib modules")
RuntimeError: Failed to build some stdlib modules
make: *** [Makefile:872: sharedmods] Error 1
 * ERROR: dev-lang/python-3.11.3::gentoo_prefix failed (compile phase):
 *   emake failed
Comment 5 Larry the Git Cow gentoo-dev 2023-06-28 06:27:51 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=849472dfa3e08b890b31bf72e11f5969e9ce2db2

commit 849472dfa3e08b890b31bf72e11f5969e9ce2db2
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2023-06-28 06:26:35 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2023-06-28 06:26:35 +0000

    dev-lang/python-3.11.3: hide __dyld_shared_cache_contains_path on macOS 10.15
    
    Bug: https://bugs.gentoo.org/908187
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 dev-lang/python/python-3.11.3.ebuild | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 6 Fabian Groffen gentoo-dev 2023-09-10 11:04:19 UTC
when possible, please confirm whether the fix works for you