GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.49k stars 309 forks source link

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

Open dataCobra opened 1 week ago

dataCobra commented 1 week ago

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 commented 1 week ago

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 cxxbridge-cmd@1.0.128

maybe that is a useful workaround for the moment?

djmitche commented 1 week ago

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

dataCobra commented 1 week ago

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

djmitche commented 1 day ago

@dataCobra any updates?

dataCobra commented 1 day ago

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