Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921332 - dev-lang/python-3.11.7::gentoo_prefix failed (compile phase)
Summary: dev-lang/python-3.11.7::gentoo_prefix failed (compile phase)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-04 06:33 UTC by b1tg
Modified: 2024-02-20 11:40 UTC (History)
1 user (show)

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


Attachments
python-3.11.3-build.log (python-3.11.3-build.log.xz,16.59 KB, application/x-xz)
2024-01-04 06:35 UTC, b1tg
Details
stage3.log (stage3.log.xz,618.06 KB, application/x-xz)
2024-01-04 06:35 UTC, b1tg
Details
stage2.log (stage2.log.xz,649.07 KB, application/x-xz)
2024-01-04 06:36 UTC, b1tg
Details
stage1.log (stage1.log.xz,161.05 KB, application/x-xz)
2024-01-04 06:36 UTC, b1tg
Details
stage3.log 2024-01-23 (stage3.log.xz,559.30 KB, application/x-xz)
2024-01-24 01:43 UTC, b1tg
Details
stage3.log 2024-01-24 (wtih LATEST_TREE_YES=1) (stage3.log.xz,560.07 KB, application/x-xz)
2024-01-25 01:43 UTC, b1tg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description b1tg 2024-01-04 06:33:23 UTC
Desc: 

./bootstrap-prefix.sh on OSX failed

Os version:

MacOS Catalina 10.15.7 (19H114)

```
$ uname -a
Darwin aa 19.6.0 Darwin Kernel Version 19.6.0: Tue Nov 10 00:10:30 PST 2020; root:xnu-6153.141.10~1/RELEASE_X86_64 x86_64
```


Toolchain version:

```
$ xcode-select -v
xcode-select version 2373.
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```


Error messsage:



```
/Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Modules/_ctypes/callproc.c:1460:15: error: '_dyld_shared_cache_contains_path' redeclared as different kind of symbol
 1460 | static bool (*_dyld_shared_cache_contains_path)(const char *path);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.3/work/Python-3.11.3/Modules/_ctypes/callproc.c:72:
/Users/ch/Gentoo/MacOSX.sdk/usr/include/mach-o/dyld.h:121:13: note: previous declaration of '_dyld_shared_cache_contains_path' with type '_Bool(const char *)'
  121 | extern bool _dyld_shared_cache_contains_path(const char* path)               __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) DYLD_DRIVERKIT_UNAVAILABLE;
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Comment 1 b1tg 2024-01-04 06:35:33 UTC
Created attachment 881446 [details]
python-3.11.3-build.log
Comment 2 b1tg 2024-01-04 06:35:58 UTC
Created attachment 881447 [details]
stage3.log
Comment 3 b1tg 2024-01-04 06:36:24 UTC
Created attachment 881448 [details]
stage2.log
Comment 4 b1tg 2024-01-04 06:36:44 UTC
Created attachment 881449 [details]
stage1.log
Comment 5 Fabian Groffen gentoo-dev 2024-01-22 18:20:17 UTC
Are you in the position to make a change to the ebuild to test something?

If so, does removing/disabling this bit make a difference?

    if [[ ${CHOST} == *-darwin19 ]] ; then
        # HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH is set because
        # _dyld_shared_cache_contains_path could be found, yet it cannot
        # be resolved when dlopen()ing, so simply pretend it doesn't
        # exist here
        sed -i \
            -e 's/_dyld_shared_cache_contains_path/disabled&/' \
            configure.ac configure || die
    fi
Comment 6 Larry the Git Cow gentoo-dev 2024-01-23 08:06:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7d2508dd078f4a62a4b77a2a76a8034f4db8010c

commit 7d2508dd078f4a62a4b77a2a76a8034f4db8010c
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2024-01-23 08:04:31 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2024-01-23 08:04:31 +0000

    dev-lang/python-3.11.7: fixes for older Darwin
    
    - drop Catalina workaround, likely incorrect bug #921332
    - update Darwin 9 KQUEUE fix, stuff changed here
    
    Bug: https://bugs.gentoo.org/921332
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 dev-lang/python/python-3.11.7.ebuild | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)
Comment 7 b1tg 2024-01-24 01:41:38 UTC
Try the newest, still same error.

Does this means i correctly use the latest patch?
```
➜  Gentoo find . -name python-3.11.7.ebuild
./var/db/repos/gentoo/dev-lang/python/python-3.11.7.ebuild
./var/tmp/portage/dev-lang/python-3.11.7/build-info/python-3.11.7.ebuild
➜  Gentoo vim var/db/repos/gentoo/dev-lang/python/python-3.11.7.ebuild
➜  Gentoo grep dyld ./var/db/repos/gentoo/dev-lang/python/python-3.11.7.ebuild
		# _dyld_shared_cache_contains_path could be found, yet it cannot
			-e 's/_dyld_shared_cache_contains_path/disabled&/' \
```
Comment 8 b1tg 2024-01-24 01:43:13 UTC
Created attachment 883013 [details]
stage3.log 2024-01-23
Comment 9 Fabian Groffen gentoo-dev 2024-01-24 08:01:23 UTC
Hmm, no this seems to indicate you're still using the old ebuild.

Are you able to test separately?  Otherwise can you try a bootstrap with LATEST_TREE_YES=1 exported in your environment?
Comment 10 b1tg 2024-01-25 01:41:45 UTC
New error occurs when bootstrap with LATEST_TREE_YES=1:

```
*** WARNING: renaming "_ctypes" since importing it failed: dlopen(/Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.7/work/Python-3.11.7/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: /Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.7/work/Python-3.11.7/build/lib.macosx-10.15-x86_64-3.11/_ctypes.cpython-311-darwin.bundle
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.7/work/Python-3.11.7/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 "/Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.7/work/Python-3.11.7/./setup.py", line 1600, in <module>
    main()
  File "/Users/ch/Gentoo/var/tmp/portage/dev-lang/python-3.11.7/work/Python-3.11.7/./setup.py", line 1570, in main
    setup(# PyPI Metadata (PEP 301)
```
Comment 11 b1tg 2024-01-25 01:43:13 UTC
Created attachment 883062 [details]
stage3.log 2024-01-24 (wtih LATEST_TREE_YES=1)
Comment 12 Fabian Groffen gentoo-dev 2024-01-25 07:24:32 UTC
ok, this is the original error we suppressed, need to find a way then to sufficiently hide the workaround so it doesn't conflict with the system headers
Comment 13 Fabian Groffen gentoo-dev 2024-02-20 11:40:10 UTC
bootstrap finished today on x64-macos darwin19 without problems.