1

I finally upgraded from Catalina to Monterey. An important use of my Mac is for development for a LAMP stack. Ever since Sierra, when upgrading the OS, there are just some standard tweaks that I have to do to reconfigure the development environment. I have used MacPorts for many years for installing the components.

However on this upgrade, it seems that MacPorts installs are not workable at this time. In particular, no recent version of mariadb will install, always erroring with a clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=12.0'. Since I am on macOS 12.4, I am guessing that 12.0 is the last supported version.

I have tried mariadb versions 10.5, 10.6, 10.7, 10.8 and 10.9. All hit the same error.

Has anyone solved this problem?

2
  • If you upgraded macOS on this machine have you followed the macports upgrade instructions. Have you gopt the latest Xcode command line tools. The latter is an answer to this macports issue trac.macports.org/ticket/65372 which looks similar to yours
    – mmmmmm
    Commented Jun 21, 2022 at 8:24
  • Also note that macports buildbots have build mariadb-10.9 so port install should not be doing a compile but a download of the binary ports.macports.org/port/mariadb-10.9/builds
    – mmmmmm
    Commented Jun 21, 2022 at 8:41

1 Answer 1

1

I haven’t ported in years, but there are extra steps called out that you may have missed.

sudo port -v selfupdate  
sudo port install cmake jemalloc judy openssl boost gnutls  

Hopefully you don’t need to open a bug for the maintainers to investigate or someone to have self-solved this.

That invalid version number has some up in the past when Xcode or command line tools are not updated or you have multiple versions to choose from.

bmike@m1 ~ % clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
bmike@m1 ~ % sw_vers
ProductName:    macOS
ProductVersion: 12.4
BuildVersion:   21F79
6
  • macports should not require the last line as a correct port would install those if needed
    – mmmmmm
    Commented Jun 21, 2022 at 8:22
  • This package also requires it from homebrew when building from source, @mmmmmm curious indeed
    – bmike
    Commented Jun 21, 2022 at 8:28
  • One thing that macports packages do is list and load ALL the other packages that are needed to compiler the package. If you need to explicitly install another package that is a bug in the macports Portfile.
    – mmmmmm
    Commented Jun 21, 2022 at 8:35
  • 1
    I actually did open a bug with the maintainers! They strongly recommended that I uninstall Command Line Tools and reinstall. I thought I had upgraded CLT but their response seemed to indicate it was the wrong version. Net result was a complete uninstall of Macports and reinstall. This time everything worked as expected. No issues. I am going to mark this as the answer, because of the part about "command line tools not updated", which is exactly what the problem was. Commented Jun 22, 2022 at 18:37
  • Thanks @JeffreySimon I would encourage an edit if you didn’t need any of the selfupdate or port commands. Sometimes it takes so much extra time to repeat the issue and test for a minimal fix, though.
    – bmike
    Commented Jun 23, 2022 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .