Building Filament for Android on Windows
Describe the bug ninja install fail -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found
To Reproduce Steps to reproduce the behavior:
-
From Filament's root directory, create a desktop build directory and run CMake.
-
Build the required desktop host tools.
ninja install
Build
-
Create the build directories.
-
Run CMake for each architecture.
ninja install then fail
Expected behavior build pass
Screenshots If applicable, add screenshots to help explain your problem.
Logs D:\codebase\github\filament\out\cmake-android-release-aarch64>cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=..\android-release\filament -DCMAKE_TOOLCHAIN_FILE=....\build\toolchain-aarch64-linux-android.cmake .... -- The C compiler identification is Clang 11.0.5 -- The CXX compiler identification is Clang 11.0.5 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Users/xxx/AppData/Local/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang.cmd - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Users/xxx/AppData/Local/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang++.cmd - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is Clang -- Found assembler: C:/Users/xxx/AppData/Local/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android21-clang.cmd -- DFG LUT size set to 64x64 -- Found Python3: C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0/python3.9.exe (found version "3.9.7") found components: Interpreter -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Configuring done -- Generating done -- Build files have been written to: D:/codebase/github/filament/out/cmake-android-release-aarch64
D:\codebase\github\filament\out\cmake-android-release-aarch64>ninja install [111/813] Update build-version.inc in the SPIRV-Tools build directory (if necessary). FAILED: third_party/spirv-tools/build-version.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\update_build_version.py D:/codebase/github/filament/third_party/spirv-tools D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/build-version.inc" [112/813] Generate enum-string mapping for SPIR-V vunified1. FAILED: third_party/spirv-tools/extension_enum.inc third_party/spirv-tools/enum_string_mapping.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --spirv-core-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json --extinst-debuginfo-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json --extinst-cldebuginfo100-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --extension-enum-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/extension_enum.inc --enum-string-mapping-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/enum_string_mapping.inc" [113/813] Generate extended instruction tables for spv-amd-shader-ballot. FAILED: third_party/spirv-tools/spv-amd-shader-ballot.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/spv-amd-shader-ballot.insts.inc --vendor-operand-kind-prefix=" [116/813] Generate extended instruction tables for debuginfo. FAILED: third_party/spirv-tools/debuginfo.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/debuginfo.insts.inc --vendor-operand-kind-prefix=" [117/813] Generate extended instruction tables for spv-amd-gcn-shader. FAILED: third_party/spirv-tools/spv-amd-gcn-shader.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/spv-amd-gcn-shader.insts.inc --vendor-operand-kind-prefix=" [118/813] Generate extended instruction tables for spv-amd-shader-explicit-vertex-parameter. FAILED: third_party/spirv-tools/spv-amd-shader-explicit-vertex-parameter.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/spv-amd-shader-explicit-vertex-parameter.insts.inc --vendor-operand-kind-prefix=" [119/813] Generate extended instruction tables for nonsemantic.clspvreflection. FAILED: third_party/spirv-tools/nonsemantic.clspvreflection.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/nonsemantic.clspvreflection.insts.inc --vendor-operand-kind-prefix=" [120/813] Generate extended instruction tables for opencl.debuginfo.100. FAILED: third_party/spirv-tools/opencl.debuginfo.100.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/opencl.debuginfo.100.insts.inc --vendor-operand-kind-prefix=CLDEBUG100_" [121/813] Generate language specific header for DebugInfo. FAILED: third_party/spirv-tools/DebugInfo.h cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_language_headers.py --extinst-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json --extinst-output-path=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/DebugInfo.h" [122/813] Generate language specific header for OpenCLDebugInfo100. FAILED: third_party/spirv-tools/OpenCLDebugInfo100.h cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_language_headers.py --extinst-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --extinst-output-path=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/OpenCLDebugInfo100.h" [123/813] Generate extended instruction tables for spv-amd-shader-trinary-minmax. FAILED: third_party/spirv-tools/spv-amd-shader-trinary-minmax.insts.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --extinst-vendor-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json --vendor-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/spv-amd-shader-trinary-minmax.insts.inc --vendor-operand-kind-prefix=" [124/813] Generate info tables for SPIR-V vunified1 core instructions and operands. FAILED: third_party/spirv-tools/core.insts-unified1.inc third_party/spirv-tools/operand.kinds-unified1.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_grammar_tables.py --spirv-core-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json --extinst-debuginfo-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json --extinst-cldebuginfo100-grammar=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json --core-insts-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/core.insts-unified1.inc --operand-kinds-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/operand.kinds-unified1.inc" [125/813] Generate tables based on the SPIR-V XML registry. FAILED: third_party/spirv-tools/generators.inc cmd.exe /C "cd /D D:\codebase\github\filament\out\cmake-android-release-aarch64\third_party\spirv-tools\source && D:\codebase\github\filament\third_party\spirv-tools\utils\generate_registry_tables.py --xml=D:/codebase/github/filament/third_party/spirv-tools/external/SPIRV-Headers/include/spirv/spir-v.xml --generator-output=D:/codebase/github/filament/out/cmake-android-release-aarch64/third_party/spirv-tools/generators.inc" [128/813] Building CXX object third_party/libgtest/tnt/CMakeFiles/gtest.dir/__/googletest/src/gtest-all.cc.o ninja: build stopped: subcommand failed.
Desktop (please complete the following information):
- OS: [win10]
- GPU: [e.g. NVIDIA GTX 1650]
- Backend: [OpenGL/Vulkan]
- filament:1.13.0
Smartphone (please complete the following information):
- Device: [e.g. Pixel 2]
- OS: [e.g. Android Pie 9.0]
Additional context Add any other context about the problem here.
The failure happens in a third party library and the logs don't provide any details.
@bejado any idea?
I recently updated spirv-tools, I wonder if that broke something. I'll look into it this week.
I'm unable to reproduce on either the tip of main or v1.13.0. @toby018 which branch are you attempting to build?