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

[question] Howto build own code with build preset? #17903

Open
1 task
KUGA2 opened this issue Mar 6, 2025 · 0 comments
Open
1 task

[question] Howto build own code with build preset? #17903

KUGA2 opened this issue Mar 6, 2025 · 0 comments

Comments

@KUGA2
Copy link
Contributor

KUGA2 commented Mar 6, 2025

What is your question?

Hi,

I got a project that generates code. I create an executable that needs to run at build time producing input for another compile step.

I made a demo project using the the regular cmake template (conan new ...).

conan.zip

This works when host=build (or compatible arch). However, if I build for arm on intel, this does not work. The executable can not be run (unless i set up automatic emulation using qemu and binfmt). Or in my case, i just do not have the correct libs installed:

[build] [1/7] Building CXX object src/codegen/CMakeFiles/codegen_main.dir/main.cpp.o
[build] [2/7] Linking CXX executable src/codegen/codegen_main
[build] [3/7] Generating code /home/user/testprojects/conan/build/armv8-linux-gcc-release/src/generated.cpp
[build] FAILED: src/generated.cpp /home/user/testprojects/conan/build/armv8-linux-gcc-release/src/generated.cpp 
[build] cd /home/user/testprojects/conan/build/armv8-linux-gcc-release/src && /home/user/testprojects/conan/build/armv8-linux-gcc-release/src/codegen/codegen_main /home/user/testprojects/conan/build/armv8-linux-gcc-release/src/generated.cpp ---baked\ into\ generated\ code---
[build] aarch64-binfmt-P: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory

What is conan2's suggested solution to this problem? I guess, there must be a solution how I can build the target codegen_main with the build-profile?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
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

1 participant