Package Details: librealsense 2.55.1-2

Git Clone URL: https://aur.archlinux.org/librealsense.git (read-only, click to copy)
Package Base: librealsense
Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 & L500 series and the SR300).
Upstream URL: https://github.com/IntelRealSense/librealsense
Keywords: intel realsense
Licenses: Apache
Submitter: yang
Maintainer: buresu
Last Packager: buresu
Votes: 10
Popularity: 0.21
First Submitted: 2016-02-29 07:35 (UTC)
Last Updated: 2025-04-28 14:30 (UTC)

Latest Comments

1 2 3 Next › Last »

aminiallight commented on 2025-05-16 23:17 (UTC)

I'm getting the same issue as PreciousPika: src/core/frame-interface.h references std::uint8_t but the header that type resides with (cstdint) has not been included.

I experimented with changing pkgver to the latest beta release (2.56.3) and, after fixing the sha256sum, that version built successfully so I don't think there's any need to take this upstream.

Adding #include <cstdint> to five different header files fixes the build for the current version. Best thing would probably just be to add a patch file that does exactly that until the next version is out of beta. Here's the patch file I used:

diff -ruN a/common/opengl3.h b/common/opengl3.h
--- a/common/opengl3.h
+++ b/common/opengl3.h
@@ -10,6 +10,7 @@
 #include <unordered_map>
 #include <vector>
 #include <memory>
+#include <cstdint>

 void _check_gl_error(const char *file, int line);
 void clear_gl_errors();
diff -ruN a/src/core/debug.h b/src/core/debug.h
--- a/src/core/debug.h
+++ b/src/core/debug.h
@@ -4,6 +4,7 @@

 #include "extension.h"
 #include <vector>
+#include <cstdint>

 namespace librealsense
 {
diff -ruN a/src/core/frame-additional-data.h b/src/core/frame-additional-data.h
--- a/src/core/frame-additional-data.h
+++ b/src/core/frame-additional-data.h
@@ -8,7 +8,7 @@
 #include <memory>
 #include <array>
 #include <cstring>  // memcpy
-
+#include <cstdint>

 namespace librealsense {

diff -ruN a/src/core/frame-interface.h b/src/core/frame-interface.h
--- a/src/core/frame-interface.h
+++ b/src/core/frame-interface.h
@@ -5,6 +5,7 @@
 #include <librealsense2/h/rs_frame.h>
 #include <memory>
 #include <iosfwd>
+#include <cstdint>


 namespace librealsense {
diff -ruN a/src/core/stream-profile-interface.h b/src/core/stream-profile-interface.h
--- a/src/core/stream-profile-interface.h
+++ b/src/core/stream-profile-interface.h
@@ -10,7 +10,7 @@
 #include <memory>
 #include <vector>
 #include <ostream>
-
+#include <cstdint>

 namespace librealsense {

PreciousPika commented on 2025-05-10 03:04 (UTC) (edited on 2025-05-10 03:23 (UTC) by PreciousPika)

I'm having issues trying to install a package with this package as a dependency."librealsense" consistently fails to build, citing that CMake removed older version compatibility. It does give an option to append to override this check, but starting the install from yay does not allow you to override the compatibility check as far as I can tell. I'm not extremely experienced with Linux, but am very grateful for any advice or suggestions anyone has. Here's the exact error: In file included from /home/pika/.cache/yay/librealsense/src/librealsense-2.55.1/src/core/frame-holder.h:5, from /home/pika/.cache/yay/librealsense/src/librealsense-2.55.1/src/core/matcher-factory.cpp:5: /home/pika/.cache/yay/librealsense/src/librealsense-2.55.1/src/core/frame-interface.h:27:19: error: ‘uint8_t’ does not name a type 27 | virtual const uint8_t * get_frame_data() const = 0; | ^~~ /home/pika/.cache/yay/librealsense/src/librealsense-2.55.1/src/core/frame-interface.h:6:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’ 5 | #include <librealsense2/h/rs_frame.h> +++ |+#include <cstdint> 6 | #include <memory> make[2]: *** [CMakeFiles/realsense2.dir/build.make:79: CMakeFiles/realsense2.dir/src/core/matcher-factory.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:1023: CMakeFiles/realsense2.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... -> error making: librealsense-exit status 4 ==> Making package: monado 25.0.0-1 (Fri 09 May 2025 10:07:16 PM CDT) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Missing dependencies: -> librealsense ==> ERROR: Could not resolve all dependencies. -> error making: monado-exit status 8 -> Failed to install the following packages. Manual intervention is required: librealsense - exit status 4

uchenic commented on 2025-05-08 13:31 (UTC) (edited on 2025-05-08 13:31 (UTC) by uchenic)

# Maintainer: pingplug < aur at pingplug dot me >
# Contributr: Patrick José Pereira < positivcheg94 at gmail dot com >

_RS4XX_VER=5.16.0.1
_SR300_VER=3.26.1.0
_L51X_VER=1.5.8.1
_L53X_VER=3.5.5.1

pkgname=librealsense
pkgver=2.55.1
pkgrel=2
pkgdesc="Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 & L500 series and the SR300)."
arch=('x86_64')
url="https://github.com/IntelRealSense/librealsense"
license=('Apache')
makedepends=('cmake')
depends=('glfw' 'glu' 'gtk3' 'libusb')
source=("https://github.com/IntelRealSense/librealsense/archive/refs/tags/v${pkgver}.tar.gz"
    "https://librealsense.intel.com/Releases/RS4xx/FW/D4XX_FW_Image-${_RS4XX_VER}.bin"
    "https://librealsense.intel.com/Releases/SR300/FW/SR3XX_FW_Image-${_SR300_VER}.bin"
    "https://librealsense.intel.com/Releases/L5xx/FW/L51X_FW_Image-${_L51X_VER}.bin"
    "https://librealsense.intel.com/Releases/L5xx/FW/L53X_FW_Image-${_L53X_VER}.bin"
    "realsense-viewer.desktop")
sha256sums=('54546d834ff5d8b35d9955319ad2e428f6d9ae4c61b932d1bd716ed81ad135f7'
            'a481376ac2d072de1d057fe73d74fcc00ab5da17aa63fa92c18bb8f65adf909c'
            'c4ac2144df13c3a64fca9d16c175595c903e6e45f02f0f238630a223b07c14d1'
            '87a9a91b613d9d807b2bfc424abe9cac63cad75dfc04718592c44777cb0b4452'
            'b837b2cff2b270b89eed3c0b212ab4108389a20b6e07c19dd5957918ff9ce7e0'
            '59281f91e7d471a7dde1cf7207eddd8624e05218cc4301ee52e4c453a0c8ab21')

prepare(){
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's|, GROUP:="plugdev"||g' "config/99-realsense-libusb.rules"
  sed -i 's|, GROUP="plugdev"||g' "config/99-realsense-libusb.rules"
  pushd src
  for f in $(grep -lRE '(uint8_t|uint64_t|uint32_t)'); do
    sed -i 's|^#include|#include <cstdint>\n#include|' "$f";
    sed -i 's|uint8_t|std::uint8_t|g' "$f";
    sed -i 's|uint64_t|std::uint64_t|g' "$f";
    sed -i 's|uint32_t|std::uint32_t|g' "$f";

  done
  popd
  pushd common
  for f in $(grep -lRE '(uint8_t|uint64_t|uint32_t)'); do
    sed -i 's|^#include|#include <cstdint>\n#include|' "$f";
    sed -i 's|uint8_t|std::uint8_t|g' "$f";
    sed -i 's|uint64_t|std::uint64_t|g' "$f";
    sed -i 's|uint32_t|std::uint32_t|g' "$f";

  done
  popd
  mkdir -p build/common/fw/
  cp "../D4XX_FW_Image-${_RS4XX_VER}.bin" build/common/fw/
  cp "../SR3XX_FW_Image-${_SR300_VER}.bin" build/common/fw/
  cp "../L51X_FW_Image-${_L51X_VER}.bin" build/common/fw/
  cp "../L53X_FW_Image-${_L53X_VER}.bin" build/common/fw/
}

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  mkdir -p build && cd build
  CFLAGS="${CFLAGS} -Wformat -pthread" \
  CXXFLAGS="${CXXFLAGS} -Wformat -pthread" \
  unset HOME

  cmake .. \
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_SBINDIR=bin \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=on \
    -DBUILD_WITH_STATIC_CRT=off \
    -DBUILD_WITH_OPENMP=on \
    -DBUILD_EXAMPLES=true \
    -DCHECK_FOR_UPDATES=off
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}/build"
  DESTDIR="${pkgdir}" make install
  # why install config file to ${HOME} ?
  install -dm755 "${pkgdir}/usr/share"
  mv "${pkgdir}/Documents/librealsense2" "${pkgdir}/usr/share"
  rmdir "${pkgdir}/Documents"
  cd "${srcdir}"
  install -Dm644 realsense-viewer.desktop "${pkgdir}/usr/share/applications/realsense-viewer.desktop"
  cd "${srcdir}/${pkgname}-${pkgver}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 config/99-realsense-libusb.rules "${pkgdir}/etc/udev/rules.d/99-realsense-libusb.rules"
  install -Dm644 common/res/icon_512.png "${pkgdir}/usr/share/pixmaps/realsense-viewer.png"
}

ma work if you have compilation errors

lucasl0st commented on 2025-04-04 13:11 (UTC)

Getting following error currently trying to compile with cmake 4.0:

==> Starting build()...
CMake Error at CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

Adding -DCMAKE_POLICY_VERSION_MINIMUM=3.5 does work

aminiallight commented on 2025-01-01 23:29 (UTC)

I'm unsure if this qualifies as a build issue but I thought I should report it anyway. At the very least maybe others who experience the same thing will find this comment helpful. If you attempt to build this package with your C/C++ compiler set to Clang and without extra/openmp installed the build will fail with the following error message, even though extra/openmp is not a formal dependency:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindOpenMP.cmake:616 (find_package_handle_standard_args)
  CMake/unix_config.cmake:38 (find_package)
  CMakeLists.txt:42 (os_set_flags)

Additionally extra/openmp must remain installed in order for the library to be used. This occurs because, unlike GCC, the base Clang package does not include the associated OpenMP implementation. Properly fixing this within the Arch dependency system would require adding a new "Provides: openmp" value to both extra/openmp and core/gcc which this package could then depend upon.

Perdu commented on 2024-12-14 19:31 (UTC)

I had the same problem as acmiyaguchi when building monado. Their solution worked. Can this be patched?

dbermond commented on 2024-10-07 18:39 (UTC)

@buresu the 'git' package is missing from makedepends. Package does not build without it:

CMake Error at /usr/share/cmake/Modules/ExternalProject/shared_internal_commands.cmake:951 (message):
  error: could not find git for clone of nlohmann_json

sambilbow commented on 2023-06-17 09:21 (UTC)

FYI 2.53.1 is the last version that supports the following cameras: R300, T265, T261, L515.

petronny commented on 2023-06-11 04:08 (UTC) (edited on 2023-06-11 04:08 (UTC) by petronny)

Hi, git is still needed to clone libcurl:

-- Building libcurl enabled
CMake Error at /usr/share/cmake/Modules/ExternalProject.cmake:2806 (message):
  error: could not find git for clone of libcurl
Call Stack (most recent call first):
  /usr/share/cmake/Modules/ExternalProject.cmake:4208 (_ep_add_download_command)
  CMake/external_libcurl.cmake:17 (ExternalProject_Add)
  CMake/global_config.cmake:89 (include)
  CMakeLists.txt:52 (global_set_flags)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().

petronny commented on 2023-04-26 06:03 (UTC)

Also, please remove the leading v in pkgver. And glu should be added as a dependency.