Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#69697 closed defect (invalid)

Error: Failed to configure mpv: no files matched glob pattern "MacOSX*.sdk"

Reported by: jf (Jeffrey 'jf' Lim) Owned by: Ionic (Mihai Moldovan)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: i0ntempest
Port: mpv

Description

after a port selfupdate, when I try to do a port upgrade outdated, I get this with mpv:

--->  Computing dependencies for mpv
--->  Fetching archive for mpv
--->  Attempting to fetch mpv-0.37.0_3+bundle+network+opengl+osd+python312+rubberband.darwin_23.arm64.tbz2 from https://packages.macports.org/mpv
--->  Attempting to fetch mpv-0.37.0_3+bundle+network+opengl+osd+python312+rubberband.darwin_23.arm64.tbz2 from http://jog.id.packages.macports.org/macports/packages/mpv
--->  Attempting to fetch mpv-0.37.0_3+bundle+network+opengl+osd+python312+rubberband.darwin_23.arm64.tbz2 from https://pek.cn.packages.macports.org/macports/packages/mpv
--->  Configuring mpv
Error: Failed to configure mpv: no files matched glob pattern "MacOSX*.sdk"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Not entirely sure where ports is searching for this glob... but I've never seen this before.

Am attaching /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/main.log

Attachments (1)

main.log (36.1 KB) - added by jf (Jeffrey 'jf' Lim) 8 months ago.
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/main.log

Download all attachments as: .zip

Change History (20)

Changed 8 months ago by jf (Jeffrey 'jf' Lim)

Attachment: main.log added

/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/main.log

comment:1 Changed 8 months ago by christophecvr (christophecvr)

Hi I do not know if there is a relation but after upgrading macports-base a lot of packages using meson to build do not configure anymore like for example totem-pl-parser. There it fails with ./configure not found. By downgrading the macports-base back to commit :

[e185203ec0a52e02d6636638d777cd8a7df5f066/macports-base]

All configure and build fine. So there is a bug in one off the commits of 8 April.

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

comment:2 Changed 8 months ago by christophecvr (christophecvr)

Sorry I tried by me with downgraded macports-base . Totem and a couple others build fine again. But mpv still fails on configure. Like mentioned in this ticket.

comment:3 Changed 8 months ago by kencu (Ken)

you have a pretty weird setup:

DEVELOPER_DIR='/Users/jf/USR_LOCAL/Xcode.app/Contents/Developer

are there any SDKs in here?

/Users/jf/USR_LOCAL/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

You might need to debug this with some "puts" statements, etc, to see what is going on with this setup.

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

Replying to christophecvr:

after upgrading macports-base a lot of packages using meson to build do not configure anymore like for example totem-pl-parser. There it fails with ./configure not found.

This ticket is about the error message Error: Failed to configure mpv: no files matched glob pattern "MacOSX*.sdk". Please file additional tickets for other problems.

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

Replying to kencu:

you have a pretty weird setup:

DEVELOPER_DIR='/Users/jf/USR_LOCAL/Xcode.app/Contents/Developer

It's perfectly fine to have Xcode.app anywhere as long as it is the complete Xcode.app (including SDKs and everything else) and its location is selected with xcode-select.

comment:6 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

I do have my Xcode.app install selected, with sudo xcode-select -s ~/USR_LOCAL/Xcode.app/Contents/Developer/, and in fact I just set it again, just to be sure. I still have the same issue.

comment:7 Changed 8 months ago by kencu (Ken)

and, you have not yet said, are there any SDKs in here?

/Users/jf/USR_LOCAL/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

I know Ryan says all should be hunky-dory when you do any weird setup you want to use. Ideally, that should be true.

However, it is just -- not really that black and white that things are really that way, when you go off-piste like that.

So --before we waste any more time on this, let's just get the details on whether there are, or are not, any SDKs in

/Users/jf/USR_LOCAL/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs

comment:8 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

$ lh /Users/jf/USR_LOCAL/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 0
drwxr-xr-x  7 jf  staff   224B Mar  7 21:01 MacOSX.sdk
lrwxr-xr-x  1 jf  staff    10B Mar  7 21:00 MacOSX14.4.sdk -> MacOSX.sdk
lrwxr-xr-x  1 jf  staff    10B Mar  7 21:00 MacOSX14.sdk -> MacOSX.sdk

comment:9 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

I've had to xcode-select it before to install stuff with macports. No reason to suspect that anything's changed with the install.

comment:10 Changed 8 months ago by kencu (Ken)

OK, so now you know there are SDKs in there, and you have used xcode-select in the past.

That is all fine.

Now -- you need to sort out why this is not finding them:

        if {${use_xcode}} {
            set sdks_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
            set sdks [glob -directory ${sdks_dir} MacOSX*.sdk]
            configure.sdkroot [lindex [lsort -command vercmp ${sdks}] end]
        }

and there -- you may need to use the "puts" or similar mechanisms I mentioned above to show why your non-standard setup is not finding the SDKs.

comment:11 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

ok.. I'm sorry but I am lost here. Where do I put this code? am not familiar with debugging the internals of macports. My guess is that this looks like it should be in the portfile... but a find did not turn up anything.

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

Cc: i0ntempest added
Owner: set to Ionic
Status: newassigned

comment:13 Changed 8 months ago by kencu (Ken)

That block of code is in the Portfile now.

https://github.com/macports/macports-ports/blob/74fd7cf10be3cd8008ec9b61fd9203d5472c620e/multimedia/mpv/Portfile#L166

Apparently it does work (in the default situation) to find the MacOSX.sdk in the SDKs folder. It's non-standard code. I don't know why it is needed. Most ports don't need to use code like this to specify the SDK. But this port uses this code for some reason.

Eyeballing it, it looks like it should work. Yet it doesn't work in your setup.

So what is different about your setup? -- what are the permissions set like in your home folder? Are you dealing with any symlinks or other unusual redirects that might break the code?

To sort that out you perhaps would start sprinkling "puts" in the code to see what the variables are really being set to, just like back in the 1980s when we would debug code with "printf" statements to see what is going on with it.

Somehow, somewhere, that "glob" is not "globbing" the SDK from that directory, when apparently it should be globbing it.

But there is not enough informaiton here to have an idea why not.

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

On my Monterey x86_64 system I created the directory ~/USR_LOCAL, moved Xcode.app into it, pointed xcode-select at it, and mpv configured just fine.

Are the permissions of all of the directories leading up to Xcode.app such that the macports user can access them? What do you get if you run:

ls -dl /Users ~ ~/USR_LOCAL ~/USR_LOCAL/Xcode.app ~/USR_LOCAL/Xcode.app/Contents ~/USR_LOCAL/Xcode.app/Contents/Developer

For each directory I would want to see at least read and execute permission for the "other" column.

comment:15 in reply to:  13 ; Changed 8 months ago by jf (Jeffrey 'jf' Lim)

Replying to kencu:

That block of code is in the Portfile now.

https://github.com/macports/macports-ports/blob/74fd7cf10be3cd8008ec9b61fd9203d5472c620e/multimedia/mpv/Portfile#L166

Apparently it does work (in the default situation) to find the MacOSX.sdk in the SDKs folder. It's non-standard code. I don't know why it is needed. Most ports don't need to use code like this to specify the SDK. But this port uses this code for some reason.

Eyeballing it, it looks like it should work. Yet it doesn't work in your setup.

So what is different about your setup? -- what are the permissions set like in your home folder? Are you dealing with any symlinks or other unusual redirects that might break the code?

To sort that out you perhaps would start sprinkling "puts" in the code to see what the variables are really being set to, just like back in the 1980s when we would debug code with "printf" statements to see what is going on with it.

Somehow, somewhere, that "glob" is not "globbing" the SDK from that directory, when apparently it should be globbing it.

But there is not enough informaiton here to have an idea why not.

thank you, and I appreciate the explanation. My question was actually about how to locate the portfile in the first place so I can modify it for testing; and then after, to install using it.

But regardless, thank you again! the permissions question is indeed the right path. I had chmod 700-ed my home directory. I definitely wasn't expecting that this would be an issue with macports, given that I run with sudo... but that was the issue.

comment:16 in reply to:  14 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

Replying to ryandesign:

On my Monterey x86_64 system I created the directory ~/USR_LOCAL, moved Xcode.app into it, pointed xcode-select at it, and mpv configured just fine.

Are the permissions of all of the directories leading up to Xcode.app such that the macports user can access them? What do you get if you run:

ls -dl /Users ~ ~/USR_LOCAL ~/USR_LOCAL/Xcode.app ~/USR_LOCAL/Xcode.app/Contents ~/USR_LOCAL/Xcode.app/Contents/Developer

For each directory I would want to see at least read and execute permission for the "other" column.

thank you, Ryan. This was indeed the issue. One question though: why do I need r-x for other, when I use sudo to do port upgrade?

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

Resolution: invalid
Status: assignedclosed

You use sudo to start the port command as the root user, which gives it the ability to immediately drop privileges to the macports user. It uses this unprivileged macports user for most things so that port build systems cannot inadvertently (or intentionally) mess with things outside of the build directory.

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

Replying to jf:

My question was actually about how to locate the portfile in the first place so I can modify it for testing; and then after, to install using it.

The command port file mpv shows you where the portfile is. The command port edit mpv (possibly with sudo depending on your editor) edits the portfile in your favorite editor as configured via the EDITOR environment variable.

comment:19 Changed 8 months ago by jf (Jeffrey 'jf' Lim)

thank you, all, for your patience and guidance!

Last edited 8 months ago by jf (Jeffrey 'jf' Lim) (previous) (diff)
Note: See TracTickets for help on using tickets.