RoaringBitmap / croaring-rs

Rust FFI wrapper for CRoaring
Apache License 2.0
157 stars 43 forks source link

macOS Sonoma builds fail #127

Closed sneurlax closed 9 months ago

sneurlax commented 9 months ago

Hi, when building for macOS or iOS on macOS Sonoma using Rust versions 1.67.1 or 1.72.0, I get the following errors:

error: expected one of `:`, `;`, or `=`, found `(`
 --> /Users/user/src/stack_wallet/crypto_plugins/flutter_libepiccash/scripts/ios/build/rust/target/aarch64-apple-ios/release/build/stack-croaring-sys-1c707c2e04b5e3ce/out/croaring-sys.rs:3:3660
  |
3 | ...st SERIALIZATION_CONTAINER : u32 = 2 ; pub const enum_(unnamed_at_CRoaring/roaring_h_27_1)_ROARING_VERSION_MAJOR : enum_(unnamed_at_CRoaring/ro...
  |                                                          ^ expected one of `:`, `;`, or `=`

error: missing type for `const` item
 --> /Users/user/src/stack_wallet/crypto_plugins/flutter_libepiccash/scripts/ios/build/rust/target/aarch64-apple-ios/release/build/stack-croaring-sys-1c707c2e04b5e3ce/out/croaring-sys.rs:3:3660
  |
3 | ...IALIZATION_CONTAINER : u32 = 2 ; pub const enum_(unnamed_at_CRoaring/roaring_h_27_1)_ROARING_VERSION_MAJOR : enum_(unnamed_at_CRoaring/roaring_...
  |                                                    ^ help: provide a type for the item: `: <type>`

The following warnings were emitted during compilation:

warning: CRoaring/roaring.c:11924:13: warning: variable 'run_count' set but not used [-Wunused-but-set-variable]
warning:         int run_count = 0;
warning:             ^
warning: CRoaring/roaring.c:248:20: warning: unused function 'croaring_avx2' [-Wunused-function]
warning: static inline bool croaring_avx2() {
warning:                    ^
warning: CRoaring/roaring.c:456:19: warning: unused function 'hammingbackup' [-Wunused-function]
warning: static inline int hammingbackup(uint64_t x) {
warning:                   ^
warning: CRoaring/roaring.c:1704:20: warning: unused function 'array_container_clear' [-Wunused-function]
warning: static inline void array_container_clear(array_container_t *array) {
warning:                    ^
warning: CRoaring/roaring.c:1929:20: warning: unused function 'array_container_add' [-Wunused-function]
warning: static inline bool array_container_add(array_container_t *arr, uint16_t value) {
warning:                    ^
warning: CRoaring/roaring.c:2057:20: warning: unused function 'array_container_add_range' [-Wunused-function]
warning: static inline void array_container_add_range(array_container_t *array,
warning:                    ^
warning: CRoaring/roaring.c:2224:20: warning: unused function 'bitset_container_unset' [-Wunused-function]
warning: static inline void bitset_container_unset(bitset_container_t *bitset,
warning:                    ^
warning: CRoaring/roaring.c:2337:20: warning: unused function 'bitset_container_nonzero_cardinality' [-Wunused-function]
warning: static inline bool bitset_container_nonzero_cardinality(
warning:                    ^
warning: CRoaring/roaring.c:2884:20: warning: unused function 'run_container_clear' [-Wunused-function]
warning: static inline void run_container_clear(run_container_t *run) {
warning:                    ^
warning: CRoaring/roaring.c:3186:20: warning: unused function 'run_container_add_range' [-Wunused-function]
warning: static inline void run_container_add_range(run_container_t* run,
warning:                    ^
warning: CRoaring/roaring.c:4301:27: warning: unused function 'get_container_name' [-Wunused-function]
warning: static inline const char *get_container_name(uint8_t typecode) {
warning:                           ^
warning: CRoaring/roaring.c:7045:20: warning: unused function 'tellmeall' [-Wunused-function]
warning: static inline void tellmeall() {
warning:                    ^
warning: 12 warnings generated.

error: could not compile `stack-croaring-sys` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
[ERROR cargo_lipo] Failed to build "epic-cash-wallet" for "aarch64-apple-ios": Executing CARGO="/Users/user/.rustup/toolchains/1.72.0-aarch64-apple-darwin/bin/cargo" CARGO_HOME="/Users/user/.cargo" DYLD_FALLBACK_LIBRARY_PATH="/Users/user/.rustup/toolchains/1.72.0-aarch64-apple-darwin/lib:/Users/user/lib:/usr/local/lib:/usr/lib" HOME="/Users/user" LANG="en_US.UTF-8" LOGNAME="user" OLDPWD="/Users/user/src/stack_wallet/crypto_plugins/flutter_libepiccash/scripts/ios" PATH="/Users/user/.cargo/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin" PWD="/Users/user/src/stack_wallet/crypto_plugins/flutter_libepiccash/scripts/ios/build/rust" RUSTUP_HOME="/Users/user/.rustup" RUSTUP_TOOLCHAIN="1.72.0-aarch64-apple-darwin" RUST_RECURSION_COUNT="1" SHELL="/bin/zsh" SHLVL="2" SSH_AUTH_SOCK="/private/tmp/com.apple.launchd.5d5S4icp7v/Listeners" TERM="xterm-256color" TERM_PROGRAM="Apple_Terminal" TERM_PROGRAM_VERSION="452" TERM_SESSION_ID="2A09CD6A-DF76-4313-B8F6-68EEF68C8942" TMPDIR="/var/folders/m9/b_mpdj7s2pq7l9kmbyq55c2w0000gn/T/" USER="user" XPC_FLAGS="0x0" XPC_SERVICE_NAME="0" _="/Users/user/.cargo/bin/cargo" __CFBundleIdentifier="com.apple.Terminal" __CF_USER_TEXT_ENCODING="0x1F5:0x0:0x0" "/Users/user/.rustup/toolchains/1.72.0-aarch64-apple-darwin/bin/cargo" "--color" "auto" "build" "-p" "epic-cash-wallet" "--target" "aarch64-apple-ios" "--release" "--lib" finished with error status: exit status: 101

Any tips?

Dr-Emann commented 9 months ago

stack-croaring-sys appears to be some sort of fork of croaring-sys. It appears to be based on croaring-rs 0.3.9 (about 5 years old), updated to use CRoaring 0.3.3 (about 3 years old).

I'm sorry, but my suggestion is going to be just: we can't really support any issues from using such a fork, and use a more recent version of croaring-rs.

sneurlax commented 9 months ago

Thanks so much for taking a look and I apologize for making the issue without having discovered that myself first--I'm not familiar with the package. I'll update croaring-sys! Picking up where a coworker left off :)