Opened 12 months ago

Closed 8 months ago

#71708 closed defect (worksforme)

cmake: build failure on macOS 15: stale libxml2, still linked to icu 74

Reported by: josmithiii Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.5
Keywords: sequoia Cc: michaelld (Michael Dickens), mascguy (Christopher Nielsen), mohd-akram (Mohamed Akram)
Port: libxml2 cmake icu clang-17

Description

port install cmake fails with

:info:destroot Install the project...
:info:destroot dyld[23346]: Library not loaded: /opt/local/lib/libicuuc.74.dylib
:info:destroot   Referenced from: <8AFACEA7-8429-3E05-89C9-B37516B64F8A> /opt/local/lib/libxml2.2.dylib
:info:destroot   Reason: tried: '/opt/local/lib/libicuuc.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libicuuc.74.dylib' (no such file), '/opt/local/lib/libicuuc.74.dylib' (no such file)
:info:destroot make: *** [install] Abort trap: 6

port search icu only shows version 76.1 available.

Change History (14)

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

Cc: michaelld mascguy added
Keywords: cmake libicuuc removed
Owner: set to ryandesign
Port: libxml2 added
Status: newassigned

comment:2 Changed 12 months ago by mascguy (Christopher Nielsen)

The issue is actually libxml2.2.dylib, which is still linked to the older version of libicu. Can you run port -v installed libxml2, and paste the output?

comment:3 Changed 12 months ago by mascguy (Christopher Nielsen)

After that, can you run sudo port rev-upgrade? That should catch broken binaries like this, and rebuild components as necessary.

comment:4 Changed 12 months ago by mascguy (Christopher Nielsen)

Keywords: sequoia added
Summary: cmake does not install on Mac OS Sequoia 15.2 because it looks for /opt/local/lib/libicuuc.74.dylib when only v76 is availablecmake: build failure on macOS 15: stale libxml2, still linked to icu 74

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

The revisions of libxml2 and other ports linking with icu were increased 11 days ago specifically to rebuild them with the new icu so this problem should not occur if your ports are up to date.

comment:6 Changed 12 months ago by josmithiii

Sure, thanks:

> port -v installed libxml2
The following ports are currently installed:
  libxml2 @2.13.5_2 (active) requested_variants='' platform='darwin 24' archs='arm64' date='2024-12-27T09:07:30-0800'
> sudo port rev-upgrade
--->  Scanning binaries for linking errors
--->  Found 32 broken files, matching files to ports
--->  Found 6 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 libxml2 @2.13.5
 pstoedit @4.01
 boost176 @1.76.0+no_single+no_static+python312
 qt5-qtbase @5.15.15+openssl
 octave @9.2.0+app+docs+gfortran+graphicsmagick+openblas+qt5+sound+sundials
 qt5-qtlocation @5.15.15
Continue? [Y/n]:
--->  Computing dependencies for libxml2
--->  Cleaning libxml2
--->  Computing dependencies for cmake
--->  Fetching archive for cmake
Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. See this page for more information: <https://trac.macports.org/wiki/MisbehavingServers>
--->  Attempting to fetch cmake-3.31.3_0.darwin_24.arm64.tbz2 from https://packages.macports.org/cmake
--->  Attempting to fetch cmake-3.31.3_0.darwin_24.arm64.tbz2 from http://mirror.fcix.net/macports/packages/cmake
--->  Attempting to fetch cmake-3.31.3_0.darwin_24.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/cmake
--->  Building cmake
--->  Staging cmake into destroot
Error: Failed to destroot cmake: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/main.log for details.
Error: Problem while installing cmake
Error: rev-upgrade failed: Error rebuilding pstoedit

The failure is the same:

:info:destroot Install the project...
:info:destroot dyld[37786]: Library not loaded: /opt/local/lib/libicuuc.74.dylib
:info:destroot   Referenced from: <8AFACEA7-8429-3E05-89C9-B37516B64F8A> /opt/local/lib/libxml2.2.dylib
:info:destroot   Reason: tried: '/opt/local/lib/libicuuc.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/libicuuc.74.dylib' (no such file), '/opt/local/lib/libicuuc.74.dylib' (no such file)
:info:destroot make: *** [install] Abort trap: 6

Some things I tried:

> sudo port clean cmake
--->  Cleaning cmake
> sudo port install libxml2
<no change>

Maybe libxml2 should try to depend on cmake-bootstrap instead of cmake? I have that installed ok.

comment:7 in reply to:  6 ; Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: ryandesign deleted
Port: icu clang-17 added

Ok, so a dependency cycle exists; MacPorts doesn't support dependency cycles.

libxml2 doesn't use cmake at all. But libxml2 depends on icu which (at least on my macOS 12 machine) depends on clang-17 which depends on cmake which depends on libarchive which depends on libxml2.

comment:8 in reply to:  7 Changed 12 months ago by mascguy (Christopher Nielsen)

Cc: mohd-akram added

comment:9 Changed 12 months ago by mohd-akram (Mohamed Akram)

ICU shouldn't depend on MacPorts Clang on newer versions of macOS, and for older versions it should use clang-bootstrap. I'm on macOS 15 too. If I do port info icu it shows clang-19 as a build dependency, but if I do port info inside the icu directory I don't see it. I also don't understand why it depends on clang-17 for you Ryan instead of clang-19.

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

Replying to mohd-akram:

If I do port info icu it shows clang-19 as a build dependency, but if I do port info inside the icu directory I don't see it.

Hm, yes I see that too (with clang-17 instead of clang-19). port info icu consults the PortIndex; port info in a port directory consults the Portfile.

The PortIndex files are generated on a machine running OS X 10.11. Maybe the method that mprsyncup uses to fake the OS version is insufficient; it just gives portindex different platform values in the -p flag.

I also don't understand why it depends on clang-17 for you Ryan instead of clang-19.

I'm on macOS 12. MacPorts only offers clang 18 and later to macOS 13 and later:

https://github.com/macports/macports-ports/blob/760f78dc91f5285a54ab8bc19f28824c61036c2f/_resources/port1.0/compilers/clang_compilers.tcl#L20-L29

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

comment:11 Changed 12 months ago by mohd-akram (Mohamed Akram)

Thanks Ryan. It doesn't actually try to install clang-19 for me when I try to install icu though, so I'm not sure why OP is getting that issue. The revision of libxml2 is also correct so it should have linked against icu 76. I would try uninstalling libxml2 and installing it again. If that fails, post the log here.

comment:12 Changed 8 months ago by mascguy (Christopher Nielsen)

Port libxml2 was just updated a few days ago. Is this still an issue?

comment:13 Changed 8 months ago by josmithiii

port install cmake works now, thanks

comment:14 in reply to:  13 Changed 8 months ago by mascguy (Christopher Nielsen)

Resolution: worksforme
Status: assignedclosed

Replying to josmithiii:

port install cmake works now, thanks

Great, thank you for confirming!

Note: See TracTickets for help on using tickets.