Skip to content

Conversation

@hjmjohnson
Copy link
Contributor

CMake building of llvm autodetects zstd and zlib from homebrew and automatically links against them.

A compiler warning is given:

```
ld: warning: building for macOS-11.0, but linking with dylib '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' which was built for newer version 15.0
```

Additionally, this prevents castxml from running on many systems due to the dependence on homebrew being installed with the same or newer version as was present during compilation.

hjmjohnson and others added 4 commits December 20, 2025 07:42
…configuration

The value of 10.11 was hard-coded for the external project build, but was not exposed at
the SuperBuild level.  This change makes the setting
of the OSX_DEPLOYMENT_TARGET more transparent.
CMake building of llvm autodetects zstd and zlib from homebrew and automatically links against them.

A compiler warning is given:

```
ld: warning: building for macOS-11.0, but linking with dylib '/opt/homebrew/opt/zstd/lib/libzstd.1.dylib' which was built for newer version 15.0
```

Additionally, this prevents castxml from running on many systems due to the dependence on homebrew being installed with the same or newer version as was present during compilation.
@hjmjohnson
Copy link
Contributor Author

hjmjohnson commented Dec 20, 2025

otool -L ./clang-prefix/src/clang-build/lib/libclang-cpp.dylib
./clang-prefix/src/clang-build/lib/libclang-cpp.dylib:
	@rpath/libclang-cpp.dylib (compatibility version 0.0.0, current version 0.0.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1226.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0)

         \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
	/opt/homebrew/opt/zstd/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.7)
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   #undesirable dependency was automatically added.
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12)
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   #This is probably OK, but also not needed, so remove.
	
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2000.67.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 4201.0.0)

@hjmjohnson
Copy link
Contributor Author

@thewtex This addresses an issue that was described with castxml on macs as being linked to homebrew zstd and zlib. This PR removes the unnecessary dependencies by disabling both ZSTD and ZLIB support.

Copy link
Collaborator

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance

Copy link
Contributor

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hjmjohnson thank you!



if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "Set the minimum supported OSX target" FORCE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want FORCE here

endif()
# 2025-12-11 master
set(CastXML_GIT_TAG bca6af13daf298f6d63bf2e4d4488c11c7e99b22 CACHE STRING "CastXML Git revision.")
set(CastXML_GIT_TAG "216-Followup-MSVC-fix" CACHE STRING "CastXML Git revision." FORCE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want FORCE here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants