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

Build failed on Darwin 24.2.0 with Xcode 16.2 #218

Open
georgik opened this issue Jan 5, 2025 · 1 comment
Open

Build failed on Darwin 24.2.0 with Xcode 16.2 #218

georgik opened this issue Jan 5, 2025 · 1 comment

Comments

@georgik
Copy link

georgik commented Jan 5, 2025

As mentioned in Hyperion repo, it's not possible to build flecs_ecs on Darwin 24.2.0 with Xcode 16.2.

The build fails with:

...
/index.crates.io-1949cf8c6b5b557f/bindgen-0.70.1/lib.rs:892:13:
  assertion `left == right` failed: "arm64-apple-darwin" "aarch64-apple-darwin"
    left: 4
   right: 8
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/a4cb3c831823d9baa56c3d90514b75b2660116fa/library/std/src/panicking.rs:681:5
     1: core::panicking::panic_fmt
               at /rustc/a4cb3c831823d9baa56c3d90514b75b2660116fa/library/core/src/panicking.rs:75:14
     2: core::panicking::assert_failed_inner
     3: core::panicking::assert_failed
               at /rustc/a4cb3c831823d9baa56c3d90514b75b2660116fa/library/core/src/panicking.rs:364:5
     4: bindgen::Bindings::generate
     5: bindgen::Builder::generate
     6: build_script_build::generate_bindings
     7: build_script_build::main
     8: core::ops::function::FnOnce::call_once

It seems that terget architecture is not passed correctly to bindgen.

It seems that solution might be similar to spdm-utils, just adding the following line to flecs_ecs_sys/build.rs:

.clang_arg(format!("--target={}", env::var("HOST").unwrap()))

After this correction it was possible to build the project and it generated just following warning:

warning: unused variable: `world_ptr`
   --> flecs_ecs/src/core/query_tuple.rs:328:13
    |
328 |         let world_ptr = query.world_ptr();
    |             ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_world_ptr`
    |
    = note: `#[warn(unused_variables)]` on by default

Please, consider implementing a correction.

@andrewgazelka
Copy link
Contributor

made #219

I am unsure if this works, however.

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

No branches or pull requests

2 participants