filament
filament copied to clipboard
build android demo fail (libgeometry.a) on windows 10 platform
Describe the bug when build android demo on windows 10 platform, ther is a error when build libs/geometry/libgeometry.a
To Reproduce Steps to reproduce the behavior:
- install prerequisites on my window10 PC
- build according to https://github.com/google/filament/blob/main/BUILDING.md#windows
- build according to https://github.com/google/filament/blob/main/android/Windows.md#build
- when executing
cd out\cmake-android-release-arm7 cmake ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_INSTALL_PREFIX=..\android-release\filament ^ -DCMAKE_TOOLCHAIN_FILE=..\..\build\toolchain-arm7-linux-android.cmake ^ ..\..
, all is ok - when executing
ninja install
there is a compile error: FAILED: libs/geometry/libgeometry.a cmd.exe /C "cd . && "D:\Program Files\CMake\bin\cmake.exe" -E rm -f libs\geometry\libgeometry.a && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ar.exe qc libs\geometry\libgeometry.a libs/geometry/CMakeFiles/geometry.dir/src/MikktspaceImpl.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/SurfaceOrientation.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/TangentSpaceMesh.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/Transcoder.cpp.o && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ranlib.exe libs\geometry\libgeometry.a && cmd.exe /C "cd /D G:\00workbench\filament\out\cmake-android-release-arm7\libs\geometry && G:\00workbench\filament\build\linux\combine-static-libs.sh C:/Users/11110125/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry_combined.a G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry.a""
Expected behavior
Screenshots If applicable, add screenshots to help explain your problem.
Logs FAILED: libs/geometry/libgeometry.a cmd.exe /C "cd . && "D:\Program Files\CMake\bin\cmake.exe" -E rm -f libs\geometry\libgeometry.a && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ar.exe qc libs\geometry\libgeometry.a libs/geometry/CMakeFiles/geometry.dir/src/MikktspaceImpl.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/SurfaceOrientation.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/TangentSpaceMesh.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/Transcoder.cpp.o && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ranlib.exe libs\geometry\libgeometry.a && cmd.exe /C "cd /D G:\00workbench\filament\out\cmake-android-release-arm7\libs\geometry && G:\00workbench\filament\build\linux\combine-static-libs.sh C:/Users/11110125/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry_combined.a G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry.a""
Desktop (please complete the following information):
- OS: [e.g. iOS]
- GPU: [e.g. NVIDIA GTX 1080]
- Backend: [OpenGL/Vulkan]
Additional context Add any other context about the problem here.
i have try this on main, tag/v1.38.0 branches. the result is same
on branch tags/v1.37.0 tags/v1.36.0 the result is same.
Do you have the full logs? The actual error is missing.
@romainguy re-run & output is here.
G:\00workbench\filament\out\cmake-android-release-arm7>ninja install [0/1] Re-running CMake...-- DFG LUT size set to 64x64 CMake Deprecation Warning at third_party/meshoptimizer/tnt/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.
Update the VERSION argument
CMake Deprecation Warning at third_party/spirv-tools/CMakeLists.txt:15 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.
Update the VERSION argument
-- Configuring done (3.4s) -- Generating done (0.5s) -- Build files have been written to: G:/00workbench/filament/out/cmake-android-release-arm7
[38/689] Linking CXX static library libs\geometry\libgeometry.a FAILED: libs/geometry/libgeometry.a cmd.exe /C "cd . && "D:\Program Files\CMake\bin\cmake.exe" -E rm -f libs\geometry\libgeometry.a && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ar.exe qc libs\geometry\libgeometry.a libs/geometry/CMakeFiles/geometry.dir/src/MikktspaceImpl.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/SurfaceOrientation.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/TangentSpaceMesh.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/Transcoder.cpp.o && C:\Users\11110125\AppData\Local\Android\Sdk\ndk\25.2.9519653\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-ranlib.exe libs\geometry\libgeometry.a && cmd.exe /C "cd /D G:\00workbench\filament\out\cmake-android-release-arm7\libs\geometry && G:\00workbench\filament\build\linux\combine-static-libs.sh C:/Users/11110125/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry_combined.a G:/00workbench/filament/out/cmake-android-release-arm7/libs/geometry/libgeometry.a"" [45/689] Building CXX object filament/backend/CMakeFiles/backend.dir/src/opengl/OpenGLDriver.cpp.o ninja: build stopped: subcommand failed.
G:\00workbench\filament\out\cmake-android-release-arm7>
my DEV env: G:\00workbench\filament\out\cmake-android-release-arm7>ninja --version 1.11.1
G:\00workbench\filament\out\cmake-android-release-arm7>python --version Python 3.7.0
G:\00workbench\filament\out\cmake-android-release-arm7>cmake --version cmake version 3.27.0-rc2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
@pixelflinger @joetoth @ansman @romainguy
in WINDOWs there is a bash script in build.ninja at ${FILAMENT_SOURCE_DIR}\out\cmake-android-release-aarch64.
after i remove the sh script and add parameter "-q“ to llvm-ar.exe, like:
POST_BUILD = cmd.exe /C "cd /D G:\00workbench\filament\out\cmake-android-release-aarch64\libs\geometry && C:/Users/11110125/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe -q G:/00workbench/filament/out/cmake-android-release-aarch64/libs/geometry/libgeometry_combined.a G:/00workbench/filament/out/cmake-android-release-aarch64/libs/geometry/libgeometry.a"
niija install success.
but when i compile android sample in AS, there is another error: ld: error: G:/00workbench/filament/out/android-release/filament/lib/arm64-v8a/libgeometry.a: archive member 'libgeometry.a' is neither ET_REL nor LLVM bitcode
other abi has same compile error
snippt in build.ninja
build libs/geometry/libgeometry.a: CXX_STATIC_LIBRARY_LINKER__geometry_Release libs/geometry/CMakeFiles/geometry.dir/src/MikktspaceImpl.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/SurfaceOrientation.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/TangentSpaceMesh.cpp.o libs/geometry/CMakeFiles/geometry.dir/src/Transcoder.cpp.o || libs/math/libmath.a libs/utils/libutils.a third_party/meshoptimizer/tnt/libmeshoptimizer.a third_party/mikktspace/libmikktspace.a
LANGUAGE_COMPILE_FLAGS = -fPIE -mcpu=cortex-a57 -std=c++17 -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations -fPIC -Werror=unguarded-availability -fcolor-diagnostics -fvisibility=hidden -O3 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-unwind-tables -fno-asynchronous-unwind-tables
OBJECT_DIR = libs\geometry\CMakeFiles\geometry.dir
POST_BUILD = cmd.exe /C "cd /D G:\00workbench\filament\out\cmake-android-release-aarch64\libs\geometry && **G:\00workbench\filament\build\linux\combine-static-libs.sh** C:/Users/11110125/AppData/Local/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/windows-x86_64/bin/llvm-ar.exe G:/00workbench/filament/out/cmake-android-release-aarch64/libs/geometry/libgeometry_combined.a G:/00workbench/filament/out/cmake-android-release-aarch64/libs/geometry/libgeometry.a"
PRE_LINK = cd .
TARGET_COMPILE_PDB = libs\geometry\CMakeFiles\geometry.dir\geometry.pdb
TARGET_FILE = libs\geometry\libgeometry.a
TARGET_PDB = libs\geometry\libgeometry.pdb
@bejado @z3moon could one of you just try to repro this on a windows machine?
@bejado @z3moon could one of you just try to repro this on a windows machine?
I can try this week
@bejado @z3moon could one of you just try to repro this on a windows machine?
I got the same error