SoftwareNetwork / sw

Software Manager. Build System, Build System Generator and Package Manager. C/C++ and other languages. Tools and libraries for Software Management.
https://software-network.org
Other
118 stars 25 forks source link

Build for android failing #99

Closed LoganWillaumez closed 2 years ago

LoganWillaumez commented 2 years ago

Hello,

I've been trying to reproduce #97 to build for android as well, and I have the following error:

Exception in file D:/dev/cppan2/client2/src/sw/driver/module.cpp:120, function operator (): error in module (C:/Users/Devspace/Documents/Projets/satoris-ocr/.sw/cfg/161830/loc.sw.self.
123397-0.0.30.dll): Exception in file D:/dev/cppan2/client2/src/sw/driver/target/native.cpp:771, function findCompiler: Cannot find compiler org.LLVM.clang-* for settings: {"name":"win
2android","native":{"configuration":"release","library":"static","mt":"false","program":{"asm":"org.LLVM.clang","c":{"command":{"do_not_add_target_argument":"1","program":"C:/Users/Dev
space/AppData/Local/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang.cmd"},"package":"org.LLVM.clang"},"cpp":{"command":{"do_not_a
dd_target_argument":"1","program":"C:/Users/Devspace/AppData/Local/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang++.cmd"},"packa
ge":"org.LLVM.clangpp"},"lib":"org.LLVM.ar","link":{"command":{"do_not_add_target_argument":"1","program":"C:/Users/Devspace/AppData/Local/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/
prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang++.cmd"},"package":"org.LLVM.clang"}},"stdlib":{"c":null,"compiler":null,"cpp":null,"kernel":null}},"os":{"arch":"aarch64","kernel":"com.google.android","version":"5.17"}}

I believe I have all the toolchain set up correctly, as well as the same code base.

The only difference is that I could not use the sw.exe client mentionned in #97 as there is a newer one to use.

Do you have any idea of what's hapenning?

egorpugin commented 2 years ago

You have in config. "asm": "org.LLVM.clang", This requires normal clang somewhere on your system. Try to copy settings from "c" and point "asm" to clang.cmd.

LoganWillaumez commented 2 years ago

Thanks for the help, seems like it works with clang12 installed indeed!

FYI, copying c block to asm block did not work.

Cheers,