Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on Ubuntu 22.04 ARM64 - error with filament source build #6972

Open
3 tasks done
david-jennings opened this issue Sep 18, 2024 · 0 comments
Open
3 tasks done

Comments

@david-jennings
Copy link

Checklist

Steps to reproduce the issue

I first cloned Open3D by:

git clone https://github.com/isl-org/Open3D.git
cd Open3D

Then, I build Open3D (on Ubuntu 22.04 ARM64) with:

mkdir build
cd build
cmake -DGLIBCXX_USE_CXX11_ABI=ON -DBUILD_FILAMENT_FROM_SOURCE=ON -DUSE_SYSTEM_FMT=ON ..
make -j$(nproc)

Error message

/opt/open3d/build/filament/src/ext_filament/libs/image/src/ImageSampler.cpp:41:17: error: expected unqualified-id
constexpr float M_PIf = float(filament::math::F_PI);
                ^
/usr/include/math.h:1168:17: note: expanded from macro 'M_PIf'
# define M_PIf          3.14159265358979323846f /* pi */
                        ^
1 error generated.

Open3D, Python and System information

- Operating system: Ubuntu 22.04
- Python version: Python 3.8
- Open3D version: 0.18.0
- System architecture: x86 / arm64 / apple-silicon / jetson / rpi
- Is this a remote workstation?: yes
- How did you install Open3D?: build from source
- Compiler version (if built from source): clang 14

Additional information

The problem is that Filament source clashes with a macro introduced in glibc 2.35, which is first used in Ubuntu 22.04. See filament issue 5720.

The error was fixed in Filament release 1.25.2 but Open3d currently bundles release 1.15.1.

Issue 6637 raises this issue along with several others. The solution there is to take the code change from Filament and apply it as a patch. Better would be for the change to applied directly to the Open3d copy of Filament.

There is also a pull request to upgrade to the latest Filament (version 1.54.4) but that seems to be languishing.

Simpler options to allow Open3d to build out of the box would appear to be:

  • update Filament to 1.25.2, rather than all the way to 1.54.4
  • apply the code changes in Filament pull request 5774 (half a dozen lines in one file) to the isl-org fork of filament.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant