Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HiGHSstatic] remove Zlib dependency #8409

Merged
merged 5 commits into from
Apr 2, 2024
Merged

Conversation

odow
Copy link
Contributor

@odow odow commented Apr 1, 2024

Closes #8408

Let's just remove this for now. It was added in #8071, and it's only needed for cases where the user wants to read compressed MPS files.

@imciner2
Copy link
Member

imciner2 commented Apr 2, 2024

If you want to statically link ZLib, then I think you can try adding

-DZLIB_USE_STATIC_LIBS=ON

to the CMake invocation when you want the static library (and either setting it to OFF or leaving it out if you want the shared library). That should tell it to use a static library for ZLib instead of the shared library.

This will also require a newer CMake (3.24+), so you will want to add a new dependency as well to get a newer version than what we use by default (this will just pull in the most recent CMake version, which is currently 3.28):

HostBuildDependency(PackageSpec(; name="CMake_jll"))

cd $WORKSPACE/srcdir/HiGHS

# Remove system CMake to use the jll version
apk del cmake
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll need to remember to add HostBuildDependency(PackageSpec(; name="CMake_jll")), to `HiGHS_jll.jl the next time I rebuild it, but that's okay. I'll likely find this comment when I go searching if I forget.

@imciner2
Copy link
Member

imciner2 commented Apr 2, 2024

Looking at the artifacts for the Linux x86_64 build, the libz.so dependency has been removed, so I am guessing this is good to merge if all the builds pass. Any objections @odow?

@odow
Copy link
Contributor Author

odow commented Apr 2, 2024

Let me just check the osx build

@odow
Copy link
Contributor Author

odow commented Apr 2, 2024

Good by me:

(base) oscar@Oscars-MBP ~ % cd ~/Downloads/HiGHSstatic.v1.7.0.x86_64-apple-darwin.tar-2/bin
(base) oscar@Oscars-MBP bin % otool -L highs                                                 
highs:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

@imciner2 imciner2 merged commit 3b07b3e into JuliaPackaging:master Apr 2, 2024
19 checks passed
@odow odow deleted the patch-6 branch April 2, 2024 22:04
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.

HiGHSstatic_jll.jl raises error on missing libz.dll library
2 participants