Opened 11 months ago

Closed 5 months ago

#72733 closed defect (fixed)

x264 port cannot be parsed by MacPorts earlier than 2.11.0 because it uses git livecheck

Reported by: cgilles (HumanDynamo) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.11.3
Keywords: Cc: BjarneDMat, jmroot (Joshua Root), ryandesign (Ryan Carsten Schmidt), mohd-akram (Mohamed Akram), dbevans (David B. Evans)
Port: x264

Description

--->  Computing dependencies for ffmpeg7
Error: Dependency 'x264' not found.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port ffmpeg7 failed
FAILED COMMAND: port install ffmpeg7 +gpl2 +nonfree

x264 port is marked as removed in the Macports web interface. Why?

Change History (17)

comment:1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Port: x264 added; ffmpeg removed
Summary: ffmpeg7 (and all other versions) not compilable due to missing x264 ports (removed)x264 port cannot be parsed by MacPorts earlier than 2.11.0 because it uses git livecheck

Presumably because x264 was changed 2 days ago to use git livecheck, and git livecheck is a new feature introduced in MacPorts 2.11.0, and presumably both you and the server running the ports.macports.org web site are using a version of MacPorts earlier than 2.11.0 and the port cannot be parsed on those old MacPorts versions. The solution is to upgrade to a newer version of MacPorts by running sudo port selfupdate.

We typically wait two weeks after a new version of MacPorts is released before adopting its features in ports. It has been over 2 weeks since MacPorts 2.11.0 was released so using the new git livecheck type in the x264 port is fair game.

comment:2 in reply to:  1 Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

I filed https://github.com/macports/macports-webapp/issues/388 to update the ports.macports.org web site's copy of MacPorts.

comment:3 Changed 10 months ago by BjarneDMat

It's not enough to upgrade to MacPorts base version 2.11.3
Due to the broken backend it't no longer present in ports.tar.gz

#=> port -d selfupdate
MacPorts base version 2.11.3 installed,
#=> port info x264
Error: Port x264 not found
#=> port -q installed x264
  x264 @0.164.3108_1 (active)

I discovered the issue during a routine port reclaim

comment:4 Changed 10 months ago by BjarneDMat

Cc: BjarneDMat added

comment:5 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmroot added
Component: portsbase
Version: 2.11.3

When you say "the broken backend", you are talking about something different than I thought we were talking about.

I mentioned the ports.macports.org web site.

You are talking about ports.tar.gz which is created by a different server (the buildmaster). It automatically updates its copies of MacPorts so it should not be affected.

However, I checked the buildmaster's mprsyncup log and it says the reason for the problem is:

Failed to parse file multimedia/x264/Portfile: invalid command name "livecheck.branch"

Further, I found that the copy of MacPorts used by mprsyncup is stuck at version 2.10.7. It has not auto-updated like it's supposed to.

The auto-update has failed on every MacPorts version after 2.10.7 due to this error:

2025-07-23T07:23:00+0000 chmod: /Volumes/RAID/var/tmp/mprsyncup/release/base/vendor/vendor-destroot/Volumes/RAID/var/tmp/mprsyncup/opt/local/libexec/macports/lib/critcl*: No such file or directory
2025-07-23T07:23:00+0000 make[1]: *** [.stamp-critcl] Error 1
2025-07-23T07:23:00+0000 make: *** [all] Error 1

comment:6 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Such an error was previously reported in comment:ticket:72061:3.

comment:7 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

In 581d5c60faf1c35ebab642dbec8fa0b1bed4cedf/macports-ports (master):

x264: Restore compatibility with MacPorts < 2.11.0

Restore compatibility with MacPorts < 2.11.0 while we figure out why
the servers aren't able to update to 2.11.x.

See: #72733

comment:8 in reply to:  5 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

chmod: /Volumes/RAID/var/tmp/mprsyncup/release/base/vendor/vendor-destroot/Volumes/RAID/var/tmp/mprsyncup/opt/local/libexec/macports/lib/critcl*: No such file or directory

On macOS /var is a symlink to /private/var and on the buildmaster additionally /Volumes/RAID/var is a symlink to /Volumes/RAID/private/var.

There is no /Volumes/RAID/var/tmp/mprsyncup/release/base/vendor/vendor-destroot/Volumes/RAID/var/tmp/mprsyncup/opt/local/libexec/macports/lib/critcl*

But there is /Volumes/RAID/var/tmp/mprsyncup/release/base/vendor/vendor-destroot/Volumes/RAID/private/var/tmp/mprsyncup/opt/local/libexec/macports/lib/critcl*

So someone is resolving a symlink in some cases but not in all cases.

comment:9 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

comment:10 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

A simple reproduction recipe is:

./configure --prefix=/tmp/mp && make -j$(sysctl -n hw.activecpu)

(since /tmp is a symlink to /private/tmp). Result:

Installed package:      /Volumes/Shared/macports-base/vendor/vendor-destroot/private/tmp/mp/libexec/macports/lib/critcl_callback_tcl8-1.1
Installed headers:      /Volumes/Shared/macports-base/vendor/vendor-destroot/private/tmp/mp/libexec/macports/include/critcl_callback
chmod: /Volumes/Shared/macports-base/vendor/vendor-destroot/tmp/mp/libexec/macports/lib/critcl*: No such file or directory
make[1]: *** [.stamp-critcl] Error 1
make: *** [all] Error 1

I suspect that we either need to make build.tcl not normalize paths, which probably involves patching, or we need to make vendor/Makefile.in normalize ${PREFIX} when referring to ${DESTROOT}${PREFIX}, however I don't know how to normalize. readlink -f, for example, does not work when the path doesn't yet exist (in BSD readlink, although it would work with GNU readlink). I guess invoking tclsh and using its [file normalize] would be the most reliable. Potentially the entire chmod command could be done in Tcl.

comment:11 Changed 10 months ago by jmroot (Joshua Root)

Cc: ryandesign added

I'll aim to get a fix in the next base release. We could also switch to the new buildmaster, which doesn't have this problem (and as a bonus, has the fix for #71755 in place).

comment:12 Changed 10 months ago by jmroot (Joshua Root)

In 2a7829df70273b1ac7c1221f2ee8e9786e60fb00/macports-base (master):

Fix building with a prefix containing symlinks

See: #72733

comment:13 in reply to:  5 Changed 10 months ago by jmroot (Joshua Root)

Replying to ryandesign:

Further, I found that the copy of MacPorts used by mprsyncup is stuck at version 2.10.7. It has not auto-updated like it's supposed to.

The auto-update has failed on every MacPorts version after 2.10.7 due to this error:

Was it able to update to 2.11.4?

comment:14 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Yes! I'll revert the livecheck change to x264.

comment:15 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

No I won't because I don't know if the webapp's copy has been updated yet.

Last edited 10 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:16 Changed 6 months ago by jmroot (Joshua Root)

Cc: mohd-akram dbevans added

The linked macports-webapp issue is closed and it looks like the x264 port is avoiding use of git livecheck when parsed by older base versions. Can this ticket be closed?

comment:17 Changed 5 months ago by mohd-akram (Mohamed Akram)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.