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

Fix build on x86_64-unknown-linux-musl because of missing zlib. #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

orium
Copy link
Contributor

@orium orium commented Jun 10, 2024

The failure was:

  = note: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lz: No such file or directory
          collect2: error: ld returned 1 exit status

This PR also updates rust and alpine.

For my future reference. To test builds locally do

docker build -t dev-rust-build.action . && docker run  -e GITHUB_REPOSITORY=orium/cargo-rdme -e GITHUB_WORKSPACE=/rust/build/workspace -e RUSTTARGET=x86_64-unknown-linux-musl -v ~/programming/projects/cargo-rdme/:/rust/build/workspace -ti --entrypoint /bin/bash dev-rust-build.action

Closes #100

@orium
Copy link
Contributor Author

orium commented Jun 16, 2024

@Douile Can you take a look when you have time?

@Douile
Copy link
Member

Douile commented Oct 23, 2024

Could you link to a log where a build fails because of zlib please.

orium added 2 commits October 24, 2024 00:13
The failure was:

```
  = note: /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lz: No such file or directory
          collect2: error: ld returned 1 exit status
```
@orium
Copy link
Contributor Author

orium commented Oct 23, 2024

Could you link to a log where a build fails because of zlib please.

Yes: https://github.com/orium/cargo-rdme/actions/runs/11489666325/job/31978894158

I've also updated the PR to use rust 1.82.

@orium
Copy link
Contributor Author

orium commented Nov 4, 2024

@Douile Hi. Can you take a look at the log/PR when you have time?

@orium
Copy link
Contributor Author

orium commented Nov 6, 2024

It seems this PR does not fix the issue (https://github.com/orium/cargo-rdme/actions/runs/11713088614/job/32625153289).

I'll look at this soon.

@orium
Copy link
Contributor Author

orium commented Nov 8, 2024

Found the issue. The current PR does solve the problem: for some reason even though I pointed to orium/rust-build.action it still used the original docker image.

The problem is the git2 dependency that I have in cargo-rdme. git2 needs zlib-static to be installed.

@Douile
Copy link
Member

Douile commented Nov 8, 2024

If its for a dependency of a crate I don't think it should go in the base image: a pre-build script can be used to install crate dependencies.

@orium
Copy link
Contributor Author

orium commented Nov 8, 2024

If its for a dependency of a crate I don't think it should go in the base image: a pre-build script can be used to install crate dependencies.

That's what I did in orium/cargo-rdme@79b8d25. One one hand I tend to agree that dependencies on system libraries that crates have are out of scope. On the other hand there should be at least a minimum system installation crates should count on. I would say something like libz may arguably be part of that minimum installation.

I think at least rust-build should offer a simple way to install extra packages that do not require a pre-build script. I'm thinking an environment variable where people can define a set of packages to install. What do you think? I'm happy to change this PR to add a EXTRA_PACKAGES or something like that (please feel free to suggest a better name).

beeender added a commit to beeender/richclip that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Update request: update to 1.79
2 participants