Skip to content

Linux BUILD_FILAMENT_FROM_SOURCE lists archives under lib instead of lib/x86_64 #7555

Description

@mstoelzle

Checklist

  • Clean upstream checkout at the exact reported revision.
  • Built pip-package directly without prebuilding ext_filament.
  • Preserved the original Ninja error and compared only the archive-directory correction.

Environment

Ubuntu 26.04.1 LTS, x86_64
Linux 7.0.0-31-generic
Python 3.12.13
CMake 4.2.3; Ninja 1.13.2
GCC 15.2.0; Clang 21.1.8
Open3D 1a9eb990f9a20936c30c428568c602bdef760744
Filament v1.54.0, tag commit c1a3450d9c0a64c329a17bff4f3a7f68a2474214
Clean checkout status before configure: empty

Exact reproduction

cmake -S . -B build-byproducts -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DBUILD_GUI=ON -DBUILD_FILAMENT_FROM_SOURCE=ON \
  -DBUILD_CUDA_MODULE=OFF -DBUILD_WEBRTC=OFF \
  -DPython3_EXECUTABLE=/path/to/python

set -o pipefail
cmake --build build-byproducts --target pip-package --parallel 24 --verbose 2>&1 \
  | tee build-original.log
status=${PIPESTATUS[0]}
printf '\nExit status: %s\n' "$status" | tee -a build-original.log
exit "$status"

I did not prebuild ext_filament. The generated graph fails immediately and deterministically:

Change Dir: '/tmp/open3d-audit-7555-build'
Run Build Command(s): /usr/bin/ninja -v pip-package
ninja: error: 'filament-binaries/lib/x86_64/libfilameshio.a', needed by 'lib/Release/libOpen3D.so.0.19.0', missing and no known rule to make it

Exit status: 1

Same-build graph evidence

At this revision, 3rdparty/filament/filament_build.cmake leaves Linux lib_dir as lib, so the Ninja custom command declares these byproducts:

filament-binaries/lib/libfilameshio.a
filament-binaries/lib/libfilament.a
...
filament-binaries/lib/libvkshaders.a

The imported Filament targets in 3rdparty/find_dependencies.cmake, and Filament's actual install layout, instead use:

filament-binaries/lib/x86_64/libfilameshio.a
filament-binaries/lib/x86_64/libfilament.a
...
filament-binaries/lib/x86_64/libvkshaders.a

Ninja therefore has no rule for the imported archive path even though the external project is the intended producer.

Isolated archive-directory correction

The control changed only Linux archive-directory selection:

elseif(UNIX)
    if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$")
        set(lib_dir lib/aarch64)
    else()
        set(lib_dir lib/x86_64)
    endif()
endif()

After regeneration, both the ext_filament phony edge and external-project build edge declare all 15 archives under filament-binaries/lib/x86_64/. The archives were then present in that directory, including:

b8b23a5152e0ae2c70feeacdfdbcc35795fdca608090647e25db46708f7640d6  lib/x86_64/libfilameshio.a
938d9cfbd4ad8ef5cab54a5485adb01e00141ab777a63c23eeb1f3801b65466e  lib/x86_64/libfilament.a
8900084f7901f938be163b48d1dbb44507d1e2fd4f88eeb57ba5ef981e378cdf  lib/x86_64/libvkshaders.a

The direct pip-package build then completed with exit status 0. Produced wheel:

0f02385e6f0bcc90f2ae54bfd02cc9b942a9c9ffa35918f254494b59383a9167  open3d_cpu-0.19.0+1a9eb99-cp312-cp312-manylinux_2_43_x86_64.whl

Separately recorded host prerequisites

These were required only after the graph defect was corrected and are not part of the candidate fix:

  • Filament v1.54.0 with Clang 21 needs <cstddef> in libs/utils/include/utils/memalign.h plus compatibility warning flags.
  • This Ubuntu/GCC 15 host needs a temporary -include cstdint workaround for unrelated Assimp/tinyusdz missing includes.
  • WITH_STUBGEN=OFF was used because pybind11_stubgen is not installed.

The original missing-rule failure occurs before any of those compilation prerequisites matter.

Result

Confirmed on Linux x86_64. The declared-byproduct directory is lib/, while both Open3D imports and Filament installation use lib/x86_64/. Selecting the architecture-specific directory for the external project's BUILD_BYPRODUCTS fixes the Ninja graph and the full target succeeds. This report does not claim an untested architecture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions