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

Cross compilaton fails - cxxbridge not built for correct arch #3683

Open
dataCobra opened this issue Nov 15, 2024 · 5 comments
Open

Cross compilaton fails - cxxbridge not built for correct arch #3683

dataCobra opened this issue Nov 15, 2024 · 5 comments
Labels
build-system Related to build system (Cmake)

Comments

@dataCobra
Copy link

To report a bug...

While trying to build the new version for aarch64 and armv7l in a cross compilation setup, it fails.

Here is the information about the failure:

[2/134] Running utility command for _cargo-build_taskchampion_lib
[3/134] Building cxxbridge (version 1.0.128)
[4/134] Generating cxx bindings for crate taskchampion_lib
FAILED: src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/include/taskchampion-cpp/lib.h src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/src/lib.cpp /builddir/task-3.2.0/build/src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/include/taskchampion-cpp/lib.h /builddir/task-3.2.0/build/src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/src/lib.cpp
cd /builddir/task-3.2.0/build/src/taskchampion-cpp && /builddir/task-3.2.0/build/corrosion/cxxbridge_v1.0.128/bin/cxxbridge /builddir/task-3.2.0/src/taskchampion-cpp/src/lib.rs --header --output /builddir/task-3.2.0/build/src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/include/taskchampion-cpp/lib.h && /builddir/task-3.2.0/build/corrosion/cxxbridge_v1.0.128/bin/cxxbridge /builddir/task-3.2.0/src/taskchampion-cpp/src/lib.rs --output /builddir/task-3.2.0/build/src/taskchampion-cpp/corrosion_generated/cxxbridge/taskchampion-cpp/src/lib.cpp --include taskchampion-cpp/lib.h
/bin/sh: line 1: /builddir/task-3.2.0/build/corrosion/cxxbridge_v1.0.128/bin/cxxbridge: cannot execute binary file: Exec format error
ninja: build stopped: subcommand failed.
@djmitche
Copy link
Collaborator

Hm, maybe this is part of why this interface is labeled "EXPERIMENTAL": https://corrosion-rs.github.io/corrosion/ffi_bindings.html#cxx-integrationt

Reading through https://github.com/corrosion-rs/corrosion/blob/master/cmake/Corrosion.cmake it looks like you could install cxxbridge-cmd locally and cxx will use it:

cargo install [email protected]

maybe that is a useful workaround for the moment?

@djmitche djmitche changed the title [3.2.0] Cross compilaton fails. Cross compilaton fails - cxxbridge not built for correct arch Nov 15, 2024
@djmitche djmitche added the build-system Related to build system (Cmake) label Nov 15, 2024
@djmitche
Copy link
Collaborator

Can you share your CMake invocation(s) so that I can try to reproduce?

@dataCobra
Copy link
Author

I'll try to send you the requested data today, but I can't promise it.

@djmitche
Copy link
Collaborator

@dataCobra any updates?

@dataCobra
Copy link
Author

Not yet, currently ill and not able to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system Related to build system (Cmake)
Projects
Status: Backlog
Development

No branches or pull requests

2 participants