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

[Bug] Failed build zenoh-c with unstable api for arm-unknown-linux-gnueabi #740

Closed
muzili opened this issue Oct 4, 2024 · 3 comments · Fixed by eclipse-zenoh/zenoh#1559
Assignees
Labels
bug Something isn't working

Comments

@muzili
Copy link

muzili commented Oct 4, 2024

Describe the bug

As the title said, failed to build zenoh-c library with ZENOHC_BUILD_WITH_UNSTABLE_API flag, there's no this issue if ZENOHC_BUILD_WITH_UNSTABLE_API is set to false.

To reproduce

  1. export RUSTFLAGS="-Clinker=/usr/bin/arm-linux-gnueabi-gcc -Car=/usr/bin//usr/bin/arm-linux-gnueabi-ar"
  2. mkdir build && cd build && cmake -DZENOHC_BUILD_WITH_UNSTABLE_API=true -DZENOHC_BUILD_WITH_SHARED_MEMORY=true -DZENOHC_CUSTOM_TARGET=arm-unknown-linux-gnueabi .. && make -j16
error[E0080]: evaluation of constant value failed
   --> src/shm/provider/types.rs:195:1
    |
195 | / decl_c_type!(
196 | |     owned(z_owned_chunk_alloc_result_t, option ChunkAllocResult),
197 | |     loaned(z_loaned_chunk_alloc_result_t),
198 | | );
    | |_^ the evaluated program panicked at 'Size mismatch: type z_loaned_chunk_alloc_result_t has size 16 while type z_owned_chunk_alloc_result_t has size 20', src/shm/provider/types.rs:195:1
    |
    = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `decl_c_type` (in Nightly builds, run with -Z macro-backtrace for more info)

System info

  • Platform: Debian 12
  • Version: zenoh-c 1.0.0.10
@muzili muzili added the bug Something isn't working label Oct 4, 2024
@yellowhatter yellowhatter self-assigned this Oct 4, 2024
@yellowhatter
Copy link
Contributor

it looks like ZENOHC_CUSTOM_TARGET is not passed to opaque-types

@yellowhatter
Copy link
Contributor

@muzili please check, now everything should be fixed in main

@muzili
Copy link
Author

muzili commented Oct 24, 2024

@muzili please check, now everything should be fixed in main

Verified, thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants