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

Update getrandom crate to fix musl open64 link error #35

Merged
merged 1 commit into from Oct 9, 2023

Conversation

svmhdvn
Copy link
Contributor

@svmhdvn svmhdvn commented Oct 8, 2023

When testing a build in Alpine Linux (which uses musl libc), I get the following error:

  = note: /usr/lib/gcc/aarch64-alpine-linux-musl/13.1.1/../../../../aarch64-alpine-linux-musl/bin/ld: /home/siva/src/aports/testing/watchmate/src/watchmate-0.4.5/target/release/deps/watchmate-635e55ee89f429aa.watchmate.d4e0a412e3baaeac-cgu.0.rcgu.o: in function `getrandom::util_libc::open_readonly':
          watchmate.d4e0a412e3baaeac-cgu.0:(.text._ZN9getrandom9util_libc13open_readonly17h309c222360f0ee49E+0x1c): undefined reference to `open64'
          collect2: error: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `watchmate` (bin "watchmate") due to previous error

This was fixed in getrandom-0.2.9 as is shown here rust-random/getrandom#326

Tested locally on alpine linux aarch64.

Copy link
Owner

@azymohliad azymohliad left a comment

Choose a reason for hiding this comment

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

Thanks!

@azymohliad azymohliad merged commit ca67827 into azymohliad:main Oct 9, 2023
@svmhdvn
Copy link
Contributor Author

svmhdvn commented Oct 9, 2023

Awesome, I'm planning on packaging this for Alpine Linux, could you tag a new release version with this fix?

@azymohliad
Copy link
Owner

Done. Thank you for doing this! Alpine package would be really awesome to have!

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.

None yet

2 participants