You are not logged in.
I'm attempting to build Open3D from the git clone provided in AUR. There were two problems I had (so far, it's still compiling):
1. Line 44 of PKGBUILD should be 'mkdir -p build' not just 'mkdir build'. First build attempt, it doesn't matter, but on later attempts, the lack of -p is build killer. Note: I am thinking ahead only one move, superficial for-now fixing only. Maybe there's some reason to omit -p not obvious to me.
2. So why did I have to build a second time? The first time failed due to lack of the package libc++, the C++ standard library that goes with LLVM. Shouldn't that figure into the build dependencies? A simple manual 'pacman -S libc++' fixed this.
Both problems were easy to diagnose and fix for an experienced Linuxologist, but might be trouble for someone newer to Linux and Arch.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
This belongs on the respective package's comment section, in which this has already been reported.
(Also, why does `mkdir build` fail on subsequent build attempts? What's the error? "It doesn't work" is not an error message.)
Last edited by Ammako (2021-08-08 03:11:56)
Offline
A third issue, with the fmt i/o library, due to code in FilamentScene.cpp and FilamentResourceManager.cpp
This error appears a few times:
error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization
I've used fmt a lot back when I was using C++, but that was a year and a half ago. I know I've seen this error before, and might remember the solution, after enough coffee and/or beer.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
See CMake_package_guidelines#Specifying_directories which removes the need for mkdir build.
As a workaround to the fmt issue -DUSE_SYSTEM_FMT=OFF so the bundled fmt is used instead.
Offline
Thanks, loqs, that solves the fmt problem. The build went way past that part.
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
Next (I hope final) build problem: an attempt is made to install a file in /usr/share, not within the package's tree. That would require building as sudo, which I prefer not to do. Build as regular user, install with package manager as root. What I'm expecting is for a .pkg.tar.xz or .tar.gz to be made, to be installed with "sudo pacman -U "
-- Installing: /usr/local/src/open3d/pkg/open3d/usr/bin/Open3D/Open3D
-- Installing: /usr/local/src/open3d/pkg/open3d/usr/bin/Open3D/Open3D.desktop
-- Installing: /usr/share/applications/Open3D.desktop
CMake Error at cpp/apps/cmake_install.cmake:66 (file):
file INSTALL cannot copy file
"/usr/local/src/open3d/src/open3d/build/bin/Open3D/Open3D.desktop" to
"/usr/share/applications/Open3D.desktop": Permission denied.
Call Stack (most recent call first):
cpp/cmake_install.cmake:57 (include)
cmake_install.cmake:59 (include)Last edited by darenw (2021-08-08 19:20:10)
Artist/Physicist, Herder of Pixels, Photons and Electrons
Offline
I did not encounter that issue. I think the difference is as I was building in a clean chroot so the executables were not installed:
-- Installing: /build/open3d/pkg/open3d/usr/bin/Open3D/Open3D.desktop
-- Installing: /build/open3d/pkg/open3d/usr/bin/Open3D/Open3D
-- Installing: /build/.local/share/applications/Open3D.desktop
-- Installing: /build/.local/share/icons/hicolor/scalable/apps/Open3D.svg
-- Installing: /build/.local/share/mime/packages/Open3D.xml
/build/open3d/src/open3d/cpp/apps/Open3DViewer/postinstall-linux.sh: line 4: update-mime-database: command not found
/build/open3d/src/open3d/cpp/apps/Open3DViewer/postinstall-linux.sh: line 5: update-desktop-database: command not found
/build/open3d/src/open3d/cpp/apps/Open3DViewer/postinstall-linux.sh: line 6: gtk-update-icon-cache: command not found
-- Installing: /build/open3d/pkg/open3d/usr/lib/cmake/Open3D/Open3DTargets.cmake
-- Installing: /build/open3d/pkg/open3d/usr/lib/cmake/Open3D/Open3DTargets-release.cmakeThose commands are called from https://github.com/isl-org/Open3D/blob/ … l-linux.sh Nothing in that script should be executed during install() so delete the files contents in prepare()
function prepare() {
cd "${srcdir}/${pkgbase}"
git submodule update --init --recursive
sed -i d cpp/apps/Open3DViewer/postinstall-linux.sh
mkdir build
}Please use code tags for commands and their outputs.
Edit:
gtk-update-icon-cache, desktop-file-utils and shared-mime-info all provide a pacman hook that will update the relevant cache on package installation / update so if those packages are installed the caches will be updated.
No PKGBUILD should ever install to the hosts filesystem. I can not think of a situation where a PKGBUILD should ever use sudo.
Edit2:
Needs another sed change to stop putting files in $HOME https://github.com/isl-org/Open3D/blob/ … ts.txt#L89
# Maintainer: JunYoung Gwak <aur@jgwak.com>
# Contributor: Dylon Edwards <deltaecho at archlinux dot us>
pkgbase=open3d
pkgname=( {,python-}open3d )
pkgver=0.13.0
pkgrel=1
epoch=4
pkgdesc="A Modern Library for 3D Data Processing"
arch=('x86_64')
url="http://www.open3d.org"
license=('MIT')
depends=(
eigen
flann
fmt
glew
glfw-x11
gtest
jsoncpp
libjpeg-turbo
liblzf
libpng
libc++
mesa
python
pybind11
xorg-server-devel
)
makedepends=(
cmake
git
python-setuptools
)
source=("${pkgbase}::git+https://github.com/isl-org/Open3D.git#tag=v${pkgver}")
sha256sums=('SKIP')
function prepare() {
cd "${srcdir}/${pkgbase}"
git submodule update --init --recursive
sed -i d cpp/apps/Open3DViewer/postinstall-linux.sh
sed -i 's@/usr/local|/opt@/usr|/usr/local|/opt@' cpp/apps/CMakeLists.txt
find -name "CMakeLists.txt" -exec sed -i 's/-Werror//g' {} \;
}
function build() {
cmake -B build -S ${pkgbase} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_SYSTEM_FLANN=ON \
-DUSE_SYSTEM_FMT=OFF \
-DUSE_SYSTEM_GLEW=ON \
-DUSE_SYSTEM_GLFW=ON \
-DUSE_SYSTEM_GOOGLETEST=ON \
-DUSE_SYSTEM_JPEG=ON \
-DUSE_SYSTEM_LIBLZF=ON \
-DUSE_SYSTEM_PNG=ON \
-DUSE_SYSTEM_PYBIND11=ON
make -C build
}
function package_open3d() {
optdepends=(
'openmp: Multiprocess support'
)
conflicts=(
open3d-git
)
make -C build DESTDIR="$pkgdir" install
}
function package_python-open3d() {
depends+=(
open3d
)
optdepends=(
'jupyter-notebook: Jupyter notebook support'
'openmp: Multiprocess support'
)
provides=(
python-py3d
)
conflicts=(
python-open3d-git
python-py3d{,-git}
)
make -C build python-package
cd build/lib/python_package
python setup.py install --root="$pkgdir/" --skip-build --optimize=1
}Last edited by loqs (2021-08-09 05:25:28)
Offline