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
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!

@hjmjohnson hjmjohnson force-pushed the remove-compression-lib-dependance branch from 2762747 to 333307f Compare January 7, 2026 15:00
…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 hjmjohnson force-pushed the remove-compression-lib-dependance branch from 333307f to 0917d93 Compare January 7, 2026 15:06
@hjmjohnson hjmjohnson marked this pull request as ready for review January 7, 2026 17:55
@hjmjohnson
Copy link
Contributor Author

@thewtex I think this will be ready for review and merging after #79 is included.

@hjmjohnson hjmjohnson requested review from dzenanz and thewtex January 7, 2026 17:56
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.

LGTM, deferring merge to Matt/Brad.

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