badaix / snapdroid

Snapcast client for Android
GNU General Public License v3.0
135 stars 26 forks source link

Build Snapdroid in Windows 10 #51

Closed masyossi closed 5 months ago

masyossi commented 2 years ago

Hello, I have problem when build the Snapdroid in Windows 10 I used :

I have set maven credentials (username and password) and sync the Gradle. but I getting error:

Task :prepareKotlinBuildScriptModel UP-TO-DATE C/C++: debug|x86 :CMake Error at D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): C/C++: debug|x86 : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) C/C++: debug|x86 :Call Stack (most recent call first): C/C++: debug|x86 : D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C/C++: debug|x86 : D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) C/C++: debug|x86 : CMakeLists.txt:151 (find_package) [CXX1405] error when building with cmake using D:\Workspace Android\snapdroid\Snapcast\src\main\cpp\snapcast\CMakeLists.txt: Build command failed. Error while executing process D:\android-sdk\cmake\3.22.1\bin\cmake.exe with arguments {-HD:\Workspace Android\snapdroid\Snapcast\src\main\cpp\snapcast -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=x86 -DCMAKE_ANDROID_ARCH_ABI=x86 -DANDROID_NDK=D:\android-sdk\ndk\24.0.8215888 -DCMAKE_ANDROID_NDK=D:\android-sdk\ndk\24.0.8215888 -DCMAKE_TOOLCHAIN_FILE=D:\android-sdk\ndk\24.0.8215888\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\android-sdk\cmake\3.22.1\bin\ninja.exe -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Workspace Android\snapdroid\Snapcast\build\intermediates\cxx\Debug\57n3r2m2\obj\x86 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\Workspace Android\snapdroid\Snapcast\build\intermediates\cxx\Debug\57n3r2m2\obj\x86 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_FIND_ROOT_PATH=D:\Workspace Android\snapdroid\Snapcast.cxx\Debug\57n3r2m2\prefab\x86\prefab -BD:\Workspace Android\snapdroid\Snapcast.cxx\Debug\57n3r2m2\x86 -GNinja -DANDROID_STL=c++_static -DBUILD_SERVER=OFF -DBUILD_TESTS=OFF} -- Android: Targeting API '19' with architecture 'x86', ABI 'x86', and processor 'i686' -- Android: Selected unified Clang toolchain -- The CXX compiler identification is Clang 14.0.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/android-sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The C compiler identification is Clang 14.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/android-sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success -- Configuring incomplete, errors occurred! See also "D:/Workspace Android/snapdroid/Snapcast/.cxx/Debug/57n3r2m2/x86/CMakeFiles/CMakeOutput.log".

CMake Error at D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Call Stack (most recent call first): D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) CMakeLists.txt:151 (find_package)

BUILD SUCCESSFUL in 26s

Please help me resolve the error. Thank you

RuhanSA079 commented 1 year ago

Hello, I have problem when build the Snapdroid in Windows 10 I used :

* NDK Version 24.0.8215888

* CMake Version 3.22.1

I have set maven credentials (username and password) and sync the Gradle. but I getting error:

Task :prepareKotlinBuildScriptModel UP-TO-DATE C/C++: debug|x86 :CMake Error at D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): C/C++: debug|x86 : Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) C/C++: debug|x86 :Call Stack (most recent call first): C/C++: debug|x86 : D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C/C++: debug|x86 : D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) C/C++: debug|x86 : CMakeLists.txt:151 (find_package) [CXX1405] error when building with cmake using D:\Workspace Android\snapdroid\Snapcast\src\main\cpp\snapcast\CMakeLists.txt: Build command failed. Error while executing process D:\android-sdk\cmake\3.22.1\bin\cmake.exe with arguments {-HD:\Workspace Android\snapdroid\Snapcast\src\main\cpp\snapcast -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=19 -DANDROID_PLATFORM=android-19 -DANDROID_ABI=x86 -DCMAKE_ANDROID_ARCH_ABI=x86 -DANDROID_NDK=D:\android-sdk\ndk\24.0.8215888 -DCMAKE_ANDROID_NDK=D:\android-sdk\ndk\24.0.8215888 -DCMAKE_TOOLCHAIN_FILE=D:\android-sdk\ndk\24.0.8215888\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=D:\android-sdk\cmake\3.22.1\bin\ninja.exe -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Workspace Android\snapdroid\Snapcast\build\intermediates\cxx\Debug\57n3r2m2\obj\x86 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\Workspace Android\snapdroid\Snapcast\build\intermediates\cxx\Debug\57n3r2m2\obj\x86 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_FIND_ROOT_PATH=D:\Workspace Android\snapdroid\Snapcast.cxx\Debug\57n3r2m2\prefab\x86\prefab -BD:\Workspace Android\snapdroid\Snapcast.cxx\Debug\57n3r2m2\x86 -GNinja -DANDROID_STL=c++_static -DBUILD_SERVER=OFF -DBUILD_TESTS=OFF} -- Android: Targeting API '19' with architecture 'x86', ABI 'x86', and processor 'i686' -- Android: Selected unified Clang toolchain -- The CXX compiler identification is Clang 14.0.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/android-sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The C compiler identification is Clang 14.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/android-sdk/ndk/24.0.8215888/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success -- Configuring incomplete, errors occurred! See also "D:/Workspace Android/snapdroid/Snapcast/.cxx/Debug/57n3r2m2/x86/CMakeFiles/CMakeOutput.log".

CMake Error at D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Call Stack (most recent call first): D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) D:/android-sdk/cmake/3.22.1/share/cmake-3.22/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args) CMakeLists.txt:151 (find_package)

BUILD SUCCESSFUL in 26s

Please help me resolve the error. Thank you

I also tried to compile the stuff on Windows 10, but eventually gave up and used AndroidStudio on Linux to build the libraries. You will note that snapdroid is built with Github Actions, so most likely using Linux to build the app. I suggest you do the same with a Linux VM running AndroidStudio with VirtualBox or VMWare.

badaix commented 5 months ago

I'm using Linux, please use a VM if Windows doesn't work or make it working, PRs are welcome :)