moritz-wundke / Boost-for-Android

Android port of Boost C++ Libraries
MIT License
1.01k stars 483 forks source link

Having a problem building for x86 and x86_64 with NDK 20.0.5594570 with VS2019 Version 16.4.0 Preview 4.0 #184

Open Devacor opened 4 years ago

Devacor commented 4 years ago

I am able to build arm v7 and v8 without trouble, but am unable to build for the emulator architectures with my setup.

I have VS2019 Version 16.4.0 Preview 4.0 I am using the latest NDK that comes with their Microsoft Android SDK Repo. 20.0.55945870

Any advice would be appreciated. I was previously able to build all architectures with a slightly different configuration with NDK 16b, but want the latest if at all possible.

Devacor commented 4 years ago
clang-linux.compile.c++.without-pch ..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\pool_resource.o

  "C:/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -c -x c++ -fvisibility-inlines-hidden -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_STATIC_LINK=1 -DNDEBUG -I"." -o "..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\pool_resource.o" "libs\container\src\pool_resource.cpp"

common.copy C:\git\Boost-for-Android\build\out\x86_64\include\boost-1_70\boost\compatibility\cpp_c_headers\cwctype

    copy /b "C:\git\Boost-for-Android\boost_1_70_0\boost\compatibility\cpp_c_headers\cwctype" + this-file-does-not-exist-A698EE7806899E69 "C:\git\Boost-for-Android\build\out\x86_64\include\boost-1_70\boost\compatibility\cpp_c_headers\cwctype"

C:\git\Boost-for-Android\boost_1_70_0\boost\compatibility\cpp_c_headers\cwctype
        1 file(s) copied.
common.copy C:\git\Boost-for-Android\build\out\x86_64\lib\libboost_chrono-clang-mt-x64-1_70.a

    copy /b "..\build\build\x86_64\boost\bin.v2\libs\chrono\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\libboost_chrono-clang-mt-x64-1_70.a" + this-file-does-not-exist-A698EE7806899E69 "C:\git\Boost-for-Android\build\out\x86_64\lib\libboost_chrono-clang-mt-x64-1_70.a"

..\build\build\x86_64\boost\bin.v2\libs\chrono\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\libboost_chrono-clang-mt-x64-1_70.a
        1 file(s) copied.
common.mkdir ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static

        if not exist "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\\" mkdir "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static"

common.mkdir ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android

        if not exist "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\\" mkdir "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android"

common.mkdir ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi

        if not exist "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\\" mkdir "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi"

common.mkdir ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden

        if not exist "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\\" mkdir "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden"

common.mkdir ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm

        if not exist "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm\\" mkdir "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm"

clang-linux.compile.asm ..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm\make_x86_64_ms_pe_gas.o

    "C:/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -x assembler-with-cpp -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm\make_x86_64_ms_pe_gas.o" "libs\context\src\asm\make_x86_64_ms_pe_gas.asm"

CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application.
clang-linux.compile.c++.without-pch ..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\synchronized_pool_resource.o

  "C:/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -c -x c++ -fvisibility-inlines-hidden -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_STATIC_LINK=1 -DNDEBUG -I"." -o "..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\synchronized_pool_resource.o" "libs\container\src\synchronized_pool_resource.cpp"

clang-linux.compile.c++.without-pch ..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\unsynchronized_pool_resource.o

  "C:/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -c -x c++ -fvisibility-inlines-hidden -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_STATIC_LINK=1 -DNDEBUG -I"." -o "..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\unsynchronized_pool_resource.o" "libs\container\src\unsynchronized_pool_resource.cpp"

clang-linux.compile.c.without-pch ..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\alloc_lib.o

  "C:/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -c -x c -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTAINER_STATIC_LINK=1 -DNDEBUG -I"." -c -o "..\build\build\x86_64\boost\bin.v2\libs\container\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\alloc_lib.o" "libs\container\src\alloc_lib.c"

...failed updating 1 target...
shmilycode commented 4 years ago

Same problem as above. CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application. can anyone help ?

shmilycode commented 4 years ago

I also work fine with --arch=armeabi-v7a, but failed with --arch=x86 Build in windows10 64, with msys2. @Kagetsuki

Executing raw command directly

Command string for CreateProcessA(): '"F:/code/broadcast/src/third_party/android/ndk_r19c/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android21-clang++" -x assembler-with-cpp -m32 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\make_i386_ms_pe_gas.o" "libs\context\src\asm\make_i386_ms_pe_gas.asm"'

clang-linux.compile.asm bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\make_i386_ms_pe_gas.o

    "F:/code/broadcast/src/third_party/android/ndk_r19c/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android21-clang++" -x assembler-with-cpp -m32 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\make_i386_ms_pe_gas.o" "libs\context\src\asm\make_i386_ms_pe_gas.asm"

CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application.

0.000000 sec system; 0.000000 sec user; 0.000000 sec clock

Executing raw command directly

Command string for CreateProcessA(): '"F:/code/broadcast/src/third_party/android/ndk_r19c/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android21-clang++" -x assembler-with-cpp -m32 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\jump_i386_ms_pe_gas.o" "libs\context\src\asm\jump_i386_ms_pe_gas.asm"'

clang-linux.compile.asm bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\jump_i386_ms_pe_gas.o

    "F:/code/broadcast/src/third_party/android/ndk_r19c/android-ndk-r19c/toolchains/llvm/prebuilt/windows-x86_64/bin/i686-linux-android21-clang++" -x assembler-with-cpp -m32 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "bin.v2\libs\context\build\ae2809f669ab60487570e945d2f4ec44\asm\jump_i386_ms_pe_gas.o" "libs\context\src\asm\jump_i386_ms_pe_gas.asm"

CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application.

0.000000 sec system; 0.000000 sec user; 0.000000 sec clock
shmilycode commented 4 years ago

@Kagetsuki I modified the build script build-android.sh to enable show execcmds()'s work. You can try it by adding -d+4 argument to bjam.

./bjam -q                         \
       -d+2                         \
       -d+4                         \

I think my problem is same as the author, because we got the same error log. But maybe unrelated to your issue. I'm try to build again in Ubuntu, hope it can work find.

dhirajnitk commented 3 years ago

@shmilycode same error with boost1.74 & ndk 19/20/21/22 releases. CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application.

Did you manage to find any solution for emulator (x86, x86_64) target

lozpeng commented 2 years ago

is here any progress with this problem? same error with boost1.78.0 & ndk 23.1.7779620 releases for x86 and x86_64 CreateProcessA() Windows API failed: 193 - %1 is not a valid Win32 application.

Garefield commented 2 years ago

"D:/Android/android-sdk/ndk/19.2.5345600/toolchains/llvm/prebuilt/windows-x86_64/bin/x86_64-linux-android21-clang++" -x assembler-with-cpp -m64 -O3 -Wall -fvisibility=hidden -Wno-inline -fPIC -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wformat -Werror=format-security -frtti -fexceptions -DNDEBUG -g -Oz -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE -DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "..\build\build\x86_64\boost\bin.v2\libs\context\build\clang-linux-x8664\release\link-static\target-os-android\threading-multi\visibility-hidden\asm\make_x86_64_ms_pe_gas.o" "libs\context\src\asm\make_x86_64_ms_pe_gas.asm" error at this. win10,ndk 19/21/23,boost 1.74 1.76