Opened 3 years ago
Closed 3 years ago
#65152 closed defect (fixed)
Error: Failed to destroot python310: command execution failed
Reported by: | water137780117 | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | water137780117 | |
Port: | python310 |
Description (last modified by water137780117)
Today I tried to upgrade outdated ports but got an error when upgrading python310(universal)
sudo port upgrade outdated ---> Computing dependencies for pkgconfig ---> Fetching archive for pkgconfig ---> Attempting to fetch pkgconfig-0.29.2_0+universal.darwin_21.arm64-x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/pkgconfig ---> Attempting to fetch pkgconfig-0.29.2_0+universal.darwin_21.arm64-x86_64.tbz2.rmd160 from https://pek.cn.packages.macports.org/macports/packages/pkgconfig ---> Installing pkgconfig @0.29.2_0+universal ---> Activating pkgconfig @0.29.2_0+universal ---> Cleaning pkgconfig ---> Computing dependencies for python310 ---> Fetching archive for python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://kmq.jp.packages.macports.org/python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://packages.macports.org/python310 ---> Fetching distfiles for python310 ---> Attempting to fetch Python-3.10.4.tar.xz from https://pek.cn.distfiles.macports.org/macports/distfiles/python310 ---> Verifying checksums for python310 ---> Extracting python310 ---> Applying patches to python310 ---> Configuring python310 ---> Building python310 [ • • • • • • • • • • • • ] ---> Staging python310 into destroot Error: Failed to destroot python310: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_mirrors.tuna.tsinghua.edu.cn_macports_release_lang_python310/python310/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Then I uninstalled, cleaned and installed python310 again but also failed.
sudo port uninstall python310 Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents. The following ports will break: glib2 @2.64.6_2 py310-setuptools @62.1.0_0 py310-markupsafe @2.1.1_0 py310-mako @1.2.0_0 py310-markdown @3.3.6_0 boost176 @1.76.0_3 Continue? [y/N]: y Warning: Uninstall forced. Proceeding despite dependencies. ---> Deactivating python310 @3.10.4_0+lto+optimizations+universal ---> Cleaning python310 ---> Uninstalling python310 @3.10.4_0+lto+optimizations+universal ---> Cleaning python310
sudo port clean python310 ---> Cleaning python310
sudo port install python310 +universal ---> Computing dependencies for python310 ---> Fetching archive for python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://kmq.jp.packages.macports.org/python310 ---> Attempting to fetch python310-3.10.4_1+lto+optimizations+universal.darwin_21.arm64-x86_64.tbz2 from https://packages.macports.org/python310 ---> Fetching distfiles for python310 ---> Attempting to fetch Python-3.10.4.tar.xz from https://pek.cn.distfiles.macports.org/macports/distfiles/python310 ---> Verifying checksums for python310 ---> Extracting python310 ---> Applying patches to python310 ---> Configuring python310 ---> Building python310 ---> Staging python310 into destroot Error: Failed to destroot python310: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_mirrors.tuna.tsinghua.edu.cn_macports_release_lang_python310/python310/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. Error: Processing of port python310 failed
Finally I uninstalled all ports on my mac and only install python310+universal, but met the same issue.
Attachments (4)
Change History (19)
Changed 3 years ago by water137780117
comment:1 Changed 3 years ago by water137780117
Cc: | water137780117 added |
---|
Changed 3 years ago by water137780117
Attachment: | removing all ports and only install python310.log added |
---|
remove all ports and only install python
comment:2 Changed 3 years ago by water137780117
Description: | modified (diff) |
---|
comment:3 follow-up: 5 Changed 3 years ago by jmroot (Joshua Root)
That's very strange; the build succeeded on all the buildbot platforms and for me locally. Are you building on a case-sensitive or case-insensitive filesystem? Is the executable in the worksrcdir python.exe
or python
? And what are the permissions on it?
comment:4 Changed 3 years ago by water137780117
It seems there is something wrong with the latest Portfile /opt/local/var/macports/sources/mirrors.tuna.tsinghua.edu.cn/macports/release/lang/python310/Portfile.
I replaced it with the previous version https://github.com/macports/macports-ports/blob/7543522fd8fb8dfe8121875bbf21c9ea750f4ef1/lang/python310/Portfile.
Then the error disappeared.
comment:5 Changed 3 years ago by water137780117
Replying to jmroot:
That's very strange; the build succeeded on all the buildbot platforms and for me locally. Are you building on a case-sensitive or case-insensitive filesystem? Is the executable in the worksrcdir
python.exe
orpython
? And what are the permissions on it?
The executable file and the its permission is
$ ls -la |grep python -rw-r--r-- 1 macports wheel 44582112 May 10 19:30 libpython3.10.a -rw-r--r-- 1 macports wheel 2094 May 10 19:27 python-config -rw-r--r-- 1 macports wheel 2094 May 10 19:27 python-config.py -rwxr-xr-x 1 macports wheel 115655 May 10 19:31 python.exe -rw-r--r-- 1 macports wheel 65722 May 10 19:27 python.exe-gdb.py
python310-3.10.4_0 can be installed correctly while python310-3.10.4_0 can't. It seems the only diffrence is the Portfile
(/opt/local/var/macports/sources/mirrors.tuna.tsinghua.edu.cn/macports/release/lang/python310/Portfile
).
comment:6 Changed 3 years ago by jmroot (Joshua Root)
Reverting the Portfile will give you a broken universal build. The change was made to fix #63782.
comment:7 Changed 3 years ago by jmroot (Joshua Root)
Owner: | set to jmroot |
---|---|
Status: | new → accepted |
OK, so you do have python.exe
, but the failed command is trying to run ./python
. That means the file exists
call on line 150 of the current Portfile must be returning false despite the file existing?
Changed 3 years ago by jmroot (Joshua Root)
Attachment: | debug-output.diff added |
---|
add debug output to python310 Portfile
comment:8 follow-up: 9 Changed 3 years ago by jmroot (Joshua Root)
Would you be able to apply the attached patch to the Portfile in order to add some extra output to help debug this?
comment:9 Changed 3 years ago by water137780117
Replying to jmroot:
Would you be able to apply the attached patch to the Portfile in order to add some extra output to help debug this?
I'm willing to help debug, but failed to patch the file...
$ sudo patch ./Portfile ./debug-output.diff -b Password: patching file ./Portfile Hunk #1 FAILED at 150. 1 out of 1 hunk FAILED -- saving rejects to file ./Portfile.rej
Did I patch the file in a wrong way?
comment:10 Changed 3 years ago by jmroot (Joshua Root)
Make sure you have the very latest version of the file, it has been changed quite recently.
comment:11 follow-up: 12 Changed 3 years ago by jmroot (Joshua Root)
For reference:
% wc lang/python310/Portfile 263 777 9693 lang/python310/Portfile % openssl dgst -sha256 lang/python310/Portfile SHA2-256(lang/python310/Portfile)= 9e172ecbf6644c82035ad7635f8e507d5f259bd813c163624ebce27e6f905d0b
comment:12 Changed 3 years ago by water137780117
Replying to jmroot:
For reference:
% wc lang/python310/Portfile 263 777 9693 lang/python310/Portfile % openssl dgst -sha256 lang/python310/Portfile SHA2-256(lang/python310/Portfile)= 9e172ecbf6644c82035ad7635f8e507d5f259bd813c163624ebce27e6f905d0b
I fetched the latest Portfile
and successfully installed python310@3.10.4_1 even without patching the file. I also tried to reinstall after patching the file and successfully installed the package as well. The log file disappeared after finishing installation. Do I need to provide some additional files?
comment:13 Changed 3 years ago by jmroot (Joshua Root)
Did you perhaps install from a binary this time? If so, you can run sudo port destroot python310
to force a local build.
Changed 3 years ago by water137780117
Attachment: | destroot after patching.log added |
---|
comment:14 Changed 3 years ago by water137780117
The attachment destroot after patching.log
is the main.log
I got after executing sudo port destroot python310
.
comment:15 Changed 3 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
OK, thanks. That seems to have worked fine. I guess we can call this fixed despite not knowing why it broke or what un-broke it. :)
log of installing python310