Opened 11 months ago
Closed 11 months ago
#72455 closed defect (fixed)
mercurial 7.0.2 is badly broken
| Reported by: | barracuda156 | Owned by: | danchr (Dan Villiom Podlaski Christiansen) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.10.7 |
| Keywords: | Cc: | danchr (Dan Villiom Podlaski Christiansen) | |
| Port: | mercurial |
Description
The last update did not go well. The port does not build now.
To begin with, it does not respect MacPorts compiler settings and chosen Python – compiler is forced to cc when the build goes into docs directory. That is wrong, but not breaking, however it also forces python3, which is not found, expectedly (it is defined to that in Makefile). Once these are fixed, the build succeeds, but destroot fails with the error that hg does not exist, and portfile tries to run a command on it. (hg is in bin, but it is a symlink to something; I had no time today to look into that further.)
I will return to this with the log tomorrow, but at least for compiler and python choice it should be evident without a log either. I am not sure yet why destroot is broken.
- S. Also portfile is lacking
compiler_blacklist_versionsPG, which it should use, but that is inherited from 6.x and probably my own omission on an earlier update.
Attachments (2)
Change History (18)
comment:1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
My bad; I wanted to have the build system invoke the Python build directly while retaining the other parts. I’ll revert those change later today.
comment:3 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
| Owner: | set to danchr |
|---|---|
| Status: | new → accepted |
comment:4 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
Changed 11 months ago by akierig (akierig)
| Attachment: | mercurial-20250509-fail.log added |
|---|
comment:5 Changed 11 months ago by akierig (akierig)
I just tried building it plain vanilla, sorry to report it's still failing for me on MacOS 15.4.1/Xcode 16.3 Build version 16E140.
Full debug log is attached above.
---> Patching hg: 1s,.*,#!/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13,
DEBUG: Executing reinplace: /usr/bin/sed 1s,.*,#!/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13, </opt/local/var/
macports/build/_Users_akierig_proj_macports-ports_devel_mercurial/mercurial/work/destroot/opt/local/bin/hg >@file11
DEBUG: couldn't read file "/opt/local/var/macports/build/_Users_akierig_proj_macports-ports_devel_mercurial/mercurial/work/destroot/opt/local/
bin/hg": no such file or directory
while executing
"exec -ignorestderr -- {*}$cmdline"
Error: reinplace: couldn't read file "/opt/local/var/macports/build/_Users_akierig_proj_macports-ports_devel_mercurial/mercurial/work/destroot
/opt/local/bin/hg": no such file or directory
Error: Failed to destroot mercurial: reinplace sed(1) failed
DEBUG: Error code: NONE
DEBUG: Backtrace: reinplace sed(1) failed
while executing
"$post $targetname"
DEBUG: dropping privileges: euid changed to 504, egid changed to 501.
comment:6 follow-ups: 7 8 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
That’s odd… Could you check the contents of the destroot? Is there a similar hg file somewhere? Does it have the right shebang?
comment:7 Changed 11 months ago by barracuda156
Replying to danchr:
That’s odd… Could you check the contents of the
destroot? Is there a similarhgfile somewhere? Does it have the right shebang?
It fails at destroot, like yesterday, even after today's update.
byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/verify.py to verify.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/vfs.py to vfs.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/win32.py to win32.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/windows.py to windows.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/wireprotoframing.py to wireprotoframing.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/wireprotoserver.py to wireprotoserver.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/wireprototypes.py to wireprototypes.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/wireprotov1peer.py to wireprotov1peer.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/wireprotov1server.py to wireprotov1server.cpython-313.pyc byte-compiling /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial/worker.py to worker.cpython-313.pyc running install_egg_info running egg_info writing mercurial.egg-info/PKG-INFO writing dependency_links to mercurial.egg-info/dependency_links.txt writing top-level names to mercurial.egg-info/top_level.txt reading manifest file 'mercurial.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'COPYING' writing manifest file 'mercurial.egg-info/SOURCES.txt' Copying mercurial.egg-info to /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/mercurial-7.0.2-py3.13.egg-info running install_scripts creating /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin copying build/scripts-3.13/hg -> /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin changing mode of /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/hg to 755 running install_completion creating /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/bash-completion/completions copying contrib/bash_completion -> /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/bash-completion/completions/hg creating /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/zsh/site-functions copying contrib/zsh_completion -> /opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/zsh/site-functions/_hg ---> Patching hg: 1s,.*,#!/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13, Error: reinplace: couldn't read file "/opt/local/var/macports/build/_opt_local_ppcports_devel_mercurial/mercurial/work/destroot/opt/local/bin/hg": no such file or directory Error: Failed to destroot mercurial: reinplace sed(1) failed Error: See /opt/local/var/macports/logs/_opt_local_ppcports_devel_mercurial/mercurial/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
comment:8 Changed 11 months ago by akierig (akierig)
Replying to danchr:
That’s odd… Could you check the contents of the
destroot? Is there a similarhgfile somewhere? Does it have the right shebang?
ah HAH! it does not.
here's the contents of /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/hg
#!python
#
# mercurial - scalable distributed SCM
#
# Copyright 2005-2007 Olivia Mackall <olivia@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import annotations
import os
import sys
try:
from hgdemandimport import tracing
except ImportError:
sys.stderr.write(
"abort: couldn't find mercurial libraries in [%s]\n"
% ' '.join(sys.path)
)
sys.stderr.write("(check your install and PYTHONPATH)\n")
sys.exit(-1)
with tracing.log('hg script'):
# enable importing on demand to reduce startup time
import hgdemandimport
hgdemandimport.enable()
from mercurial import dispatch
dispatch.run()
Changed 11 months ago by wyuenho (Jimmy Yuen Ho Wong)
rust variant build log
comment:9 Changed 11 months ago by wyuenho (Jimmy Yuen Ho Wong)
The rust variant build failed as well
:info:destroot creating /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/bash-completion/completions
:info:destroot copying contrib/bash_completion -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/bash-completion/completions/hg
:info:destroot creating /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/zsh/site-functions
:info:destroot copying contrib/zsh_completion -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/Library/Frameworks/Python.framework/Versions/3.13/share/zsh/site-functions/_hg
:debug:destroot Executing proc-post-org.macports.destroot-destroot-0
:debug:destroot Executing proc-post-org.macports.destroot-destroot-1
:info:destroot ---> Patching hg: 1s,.*,#!/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13,
:debug:destroot Executing reinplace: /usr/bin/sed 1s,.*,#!/opt/local/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13, </opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/bin/hg >@file12
:debug:destroot couldn't read file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/bin/hg": no such file or directory
:debug:destroot while executing
:debug:destroot "exec -ignorestderr -- {*}$cmdline"
:error:destroot reinplace: couldn't read file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/work/destroot/opt/local/bin/hg": no such file or directory
:error:destroot Failed to destroot mercurial: reinplace sed(1) failed
:debug:destroot Error code: NONE
:debug:destroot Backtrace: reinplace sed(1) failed
:debug:destroot while executing
:debug:destroot "$post $targetname"
:debug:destroot dropping privileges: euid changed to 502, egid changed to 501.
:error:destroot See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_mercurial/mercurial/main.log for details.
comment:10 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
comment:11 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
Okay, I really do hope I got it building this time 🤞 I'll keep this bug open as the port is still somewhat broken, lacking its man-pages and so on. I'll try to find a nice way of adressing that.
comment:12 Changed 11 months ago by akierig (akierig)
yeah it did build for me, thanks! both with and without +rust
and man hg gave me... This manpage is not compatible with mandoc(1) and might display incorrectly. but still looked qfine.
comment:13 Changed 11 months ago by wyuenho (Jimmy Yuen Ho Wong)
Yep, works now. Thanks for the fix!
comment:14 Changed 11 months ago by barracuda156
The portgroup still missing, but otherwise it builds now.
comment:15 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
Not sure which manual pages you were seeing, but I doubt they were from the port. I posted a PR that should address that, along with moving the Rust extensions to a separate port so that both can get nice binary builds. I'm not 100% certain, but there should only be a small runtime overhead to allow Mercurial to search for them if they're not present.
comment:16 Changed 11 months ago by danchr (Dan Villiom Podlaski Christiansen)
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |

Replying to barracuda156:
Yeah, that's caused by the
post-buildblock just callingmakemanually, which doesn't use any of the MacPorts environment variables.Instead of:
Maybe something like this (untested) would be better:
That's assuming the build system still requires you to invoke all of those manually in different directories, which seems odd. I'd've assume their top-level Makefile would have targets for anything one might want to use, which could be added as needed. For example, why are we running
makeseparately for the rust variant, rather than just addingbuild-rhgtobuild.targetwhen the rust variant is selected?