-
Notifications
You must be signed in to change notification settings - Fork 643
Zlibcloudflare #3946
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
Closed
Closed
Zlibcloudflare #3946
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Note that this script can accept some limited command-line arguments, run | ||
| # `julia build_tarballs.jl --help` to see a usage message. | ||
| using BinaryBuilder, Pkg | ||
|
|
||
| name = "Zlibcloudflare" | ||
| version = v"1.2.8" | ||
|
|
||
| # Collection of sources required to complete build | ||
| sources = [ | ||
| GitSource("https://github.com/cloudflare/zlib.git", "959b4ea305821e753385e873ec4edfaa9a5d49b7") | ||
| ] | ||
|
|
||
| # Bash recipe for building across all platforms | ||
| script = raw""" | ||
| cd $WORKSPACE/srcdir/zlib* | ||
| cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release -DUNIX=true -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=ON | ||
| make -j ${nproc} | ||
| make install | ||
| install_license ../README | ||
| """ | ||
|
|
||
| # These are the platforms we will build for by default, unless further | ||
| # platforms are passed in on the command line | ||
| platforms = [ | ||
| Platform("x86_64", "linux"; libc = "glibc"), | ||
| Platform("x86_64", "linux"; libc = "musl") | ||
| ] | ||
|
|
||
|
|
||
| # The products that we will ensure are always built | ||
| products = [ | ||
| LibraryProduct("libz", :libz) | ||
| ] | ||
|
|
||
| # Dependencies that must be installed before this package can be built | ||
| dependencies = Dependency[ | ||
| ] | ||
|
|
||
| # Build the tarballs, and possibly a `build.jl` as well. | ||
| build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6") | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I like having multiple libraries around with same name (and likely soname?), point which I made repeatedly in #3801. That's going to be brittle, to say the least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with renaming it since I think few ppl would use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you plan to link other libraries to this or you just want to
ccallinto this library directly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I probably need to copy the source code of https://github.com/JuliaIO/CodecZlib.jl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When trying to build for aarch64:
sigh... 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Judging by the plethora of
-marchand other-moptions they really like to use, this might be a good exercise for our totally-untested-in-the-wild multiarchitecture infrastructure 🙃Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the variable
:libz->:libzcloudfareis hardly a problem at all 🙂 My suggestion was to rename the library, with, most importantly, its SONAME everywhere in the build system and inside the pkgconfig file, which should also be renamed 🙂 Unless you can show that you can build the JLL and call into the right libz as it is now (which I have many doubts with, especially in relation with JuliaPackaging/JLLWrappers.jl#31).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the output is a single SO file, can we just rename it after
make?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I'm trying to say repeatedly here and in #3801, I'm worried about the soname, not just the filename itself. And to do that consistently you must fix the soname everywhere in the build system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, not familiar with ABI/linker, guess this is too much patching work for too little gain. Thanks for the explanation.