azymohliad / watchmate

PineTime smart watch companion app for Linux phone and desktop
GNU General Public License v3.0
136 stars 4 forks source link

Update getrandom crate to fix musl open64 link error #35

Closed svmhdvn closed 9 months ago

svmhdvn commented 9 months ago

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 https://github.com/rust-random/getrandom/pull/326

Tested locally on alpine linux aarch64.

svmhdvn commented 9 months ago

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

azymohliad commented 9 months ago

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