#66242 closed defect (fixed)
python311 @3.11.0 +lto +optimizations fails to build with broken symlink in include path
Reported by: | bakergilx (Dennis Baker) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | upstream | Cc: | chillin-, DaveStrickland (Dave Strickland) |
Port: | python311 python310 |
Description (last modified by jmroot (Joshua Root))
Installation of python311 on OS 13.0.1, Arm64 architecture, Xcode 14.1, generates the following configure warning:
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled: dbm_open: found in Python-3.11.0/config.log, getrandom: found in Python-3.11.0/config.log, le64toh: found in Python-3.11.0/config.log
In addition, the port failed to build with the following error message:
Error: Failed to build python311: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_python311/python311/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port python311 failed
config.log and build.log attached
Attachments (3)
Change History (19)
Changed 2 years ago by bakergilx (Dennis Baker)
Changed 2 years ago by bakergilx (Dennis Baker)
Attachment: | config.log added |
---|
config.log for python311
comment:1 Changed 2 years ago by reneeotten (Renee Otten)
Cc: | jmr@… removed |
---|---|
Owner: | set to jmroot |
Status: | new → assigned |
comment:2 Changed 2 years ago by jmroot (Joshua Root)
Description: | modified (diff) |
---|---|
Keywords: | ventura added |
Summary: | Python @3.11 +lto +optimizations failed to build → python311 @3.11.0 +lto +optimizations failed to build |
:info:build error: [Errno 2] No such file or directory: '/opt/local/include/proj_api.h'
Unfortunately there's no indication in the logs of what is trying to include this header. It would be provided by the various versions of proj
, but none of those should be required by python. Would you be able to find out what is referencing this either in the python build dir or the installed files of python311's dependencies?
comment:3 Changed 2 years ago by kencu (Ken)
Summary: | python311 @3.11.0 +lto +optimizations failed to build → python311 @3.11.0 +lto +optimizations failed to build: No such file or directory: '/opt/local/include/proj_api.h' |
---|
current python311 does install on arm Ventura:
% port -v installed python311 The following ports are currently installed: python311 @3.11.1_0+lto+optimizations (active) requested_variants='' platform='darwin 22' archs='arm64' date='2022-12-25T21:37:07-0800'
I don't have any version of proj
installed, however.
comment:4 Changed 23 months ago by kencu (Ken)
Keywords: | ventura removed |
---|
comment:5 Changed 22 months ago by jmroot (Joshua Root)
Is /opt/local/include/proj_api.h
a broken symlink on your system, by any chance?
comment:6 Changed 22 months ago by jmroot (Joshua Root)
Keywords: | upstream added |
---|---|
Port: | python310 added |
Summary: | python311 @3.11.0 +lto +optimizations failed to build: No such file or directory: '/opt/local/include/proj_api.h' → python311 @3.11.0 +lto +optimizations fails to build with broken symlink in include path |
comment:7 Changed 22 months ago by jmroot (Joshua Root)
Has duplicate #66889. Deleting the broken symlinks in the include directory is an effective workaround.
comment:8 Changed 22 months ago by chillin-
Cc: | chillin- added |
---|
comment:9 Changed 22 months ago by chillin-
python310 was failing to build on Mountain Lion, but succeeded today. python310 still failing to build on Mojave.
comment:10 Changed 22 months ago by JDLH (Jim DeLaHunt)
Has similar or duplicate report #66892. That report mentions the error I saw, which is:
:info:build error: [Errno 2] No such file or directory: '/opt/local/include/lapacke_utils.h'
The proximate problem seems to be that the python310
compilation refers to a broken symlink to a library:
% ls -l /opt/local/include/lapacke_utils.h /opt/local/include/cblas/lapacke_utils.h ls: /opt/local/include/cblas/lapacke_utils.h: No such file or directory lrwxr-xr-x 1 root wheel 21 4 Feb 15:55 /opt/local/include/lapacke_utils.h -> cblas/lapacke_utils.h
It looks like the port OpenBLAS
supplies the broken link:
% port installed \*blas The following ports are currently installed: OpenBLAS @0.3.21_2+gcc12+lapack+native (active) % port contents OpenBLAS | grep lapack /opt/local/include/lapack.h /opt/local/include/lapacke.h /opt/local/include/lapacke_config.h /opt/local/include/lapacke_mangling.h /opt/local/include/lapacke_utils.h /opt/local/include/openblas/lapack.h /opt/local/include/openblas/lapacke.h /opt/local/include/openblas/lapacke_config.h /opt/local/include/openblas/lapacke_mangling.h /opt/local/include/openblas/lapacke_utils.h
I see no listing for a port cblas
, but there is a port clblas
. I do not have it installed.
comment:11 Changed 22 months ago by JDLH (Jim DeLaHunt)
The underlying cause for the lapacke
symlink error may be #66881 . There is a PR for that ticket. It is awaiting review. That ticket acknowledges that the problem blocks compilation of python310
and python311
ports.
comment:12 Changed 22 months ago by bakergilx (Dennis Baker)
On my system (Ventura 13.2, Apple M1 Max, Xcode 14.2, MacPorts 2.8.1) OpenBlas is installed but the Symlinks that port created (I assume) are all incorrect. For example, the link lapack.h -> cblas/lapack.h should be lapack.h -> openblas/lapack.h (and so for all the others). I manually corrected each link and now both Python310 and Python311 build successfully.
comment:13 Changed 22 months ago by jmroot (Joshua Root)
Yes, those specific broken symlinks are #66881, as mentioned in comment:11.
comment:14 Changed 22 months ago by DaveStrickland (Dave Strickland)
Cc: | DaveStrickland added |
---|
comment:15 Changed 11 months ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
main.log for python311