Failed to build ics-openvpn in Windows 10

392 views Asked by At

I am try to build ics-openvpn on Windows 10 by Android Studio 4.2.1. I have installed cmake, ndk and sdk and successfully run the first gradle build (Sync project with gradle files). Unfortunately, I am not able to build the main. Below are the logs. It seems it is trying to copy the missing files cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a. And, it is also missing "asio.hpp". Where could I find these files?

> Android Version 11 
> Version of the app 0.7.22

Error 1:

[1031/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/pie_openvpn.armeabi-v7a 
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/pie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o  -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\pie_openvpn.armeabi-v7a  C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so -fPIE -pie libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/pie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1032/1039] Linking C executable C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a
FAILED: C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/nopie_openvpn.armeabi-v7a 
cmd.exe /C "cd . && C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -Wl,--gc-sections CMakeFiles/nopie_openvpn.armeabi-v7a.dir/minivpn/minivpn.c.o  -o C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\build\intermediates\cmake\skeletonDebug\obj\armeabi-v7a\nopie_openvpn.armeabi-v7a  C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/build/intermediates/cmake/skeletonDebug/obj/armeabi-v7a/libopenvpn.so libssl.a libcrypto.a liblzo.a -latomic -lm && cmd.exe /C "cd /D C:\Users\project-user\Desktop\ics-openvpn-0.7.22\main\.cxx\cmake\skeletonDebug\armeabi-v7a && C:\Users\project-user\AppData\Local\Android\Sdk\cmake\3.10.2.4988404\bin\cmake.exe -E copy C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets""
Error copying file "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/.cxx/cmake/skeletonDebug/armeabi-v7a/nopie_openvpn.armeabi-v7a" to "C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/../../../build/ovpnassets".
[1033/1039] Generating ovpncli_wrap.cxx
ninja: build stopped: subcommand failed.

Error 2:

[1038/1039] Building CXX object CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o
FAILED: CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o 
C:\Users\project-user\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi16 --gcc-toolchain=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=C:/Users/project-user/AppData/Local/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/windows-x86_64/sysroot  -DASIO_STANDALONE -DGIT_VERSION_STRING=\"GIT-NOTFOUND\" -DHAVE_CONFIG_H -DHAVE_LZ4 -DHAVE_LZO -DNO_ROUTE_EXCLUDE_EMULATION -DOPENSSL_API_COMPAT=0x10200000L -DOPENVPN_SHOW_SESSION_TOKEN -DUSE_ASIO -DUSE_OPENSSL -Dovpn3_EXPORTS -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lzo/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/asio/asio/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/mbedtls/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448/arch_32 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/crypto/ec/curve448 -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/common/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openssl/providers/implementations/include -IC:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/lz4/lib -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -fPIC   -std=c++1y -MD -MT CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -MF CMakeFiles\ovpn3.dir\openvpn3\client\ovpncli.cpp.o.d -o CMakeFiles/ovpn3.dir/openvpn3/client/ovpncli.cpp.o -c C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp
In file included from C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3/client/ovpncli.cpp:30:
C:/Users/project-user/Desktop/ics-openvpn-0.7.22/main/src/main/cpp/openvpn3\openvpn/io/io.hpp:28:10: fatal error: 'asio.hpp' file not found
#include <asio.hpp>
         ^~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
1

There are 1 answers

0
MultipleMonomials On

Did you run git submodule update --init after cloning the repository?