public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pcl] rawhide: Fix build failure with VTK 9.5: add libX11-devel, use MathJax for docs
@ 2026-06-24 12:47 Sayan Paul
  0 siblings, 0 replies; only message in thread
From: Sayan Paul @ 2026-06-24 12:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/pcl
            Branch : rawhide
            Commit : 0210f91ba479fa6911f0980b6e7d2a0c8df4b896
            Author : Sayan Paul <paul.sayan@gmail.com>
            Date   : 2026-06-24T17:04:33+05:30
            Stats  : +91/-6 in 7 file(s)
            URL    : https://src.fedoraproject.org/rpms/pcl/c/0210f91ba479fa6911f0980b6e7d2a0c8df4b896?branch=rawhide

            Log:
            Fix build failure with VTK 9.5: add libX11-devel, use MathJax for docs

VTK 9.5 no longer pulls in libX11 transitively, causing undefined
references to X* symbols in libpcl_visualization. Add libX11-devel
to BuildRequires and patch visualization/CMakeLists.txt to explicitly
link X11::X11.

Patch doxyfile.in to use MathJax instead of LaTeX for doxygen formula
rendering, avoiding the need for texlive in the buildroot. Remove the
non-functional -DDOXYGEN_USE_MATHJAX cmake flag (PCL uses its own
doxyfile.in, not CMake's FindDoxygen).

Added minimal tests that does not require display or GPU.

Signed-off-by: Sayan Paul <paul.sayan@gmail.com>

---
diff --git a/.gitignore b/.gitignore
index a95d66a..6a79a21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@
 /pcl-1.11.1-fedora.tar.xz
 /pcl-1.12.0-fedora.tar.xz
 /pcl-1.15.0.tar.gz
+/pcl-1.15.1.tar.gz

diff --git a/pcl-1.15.1-eigen5.patch b/pcl-1.15.1-eigen5.patch
new file mode 100644
index 0000000..81a2ad2
--- /dev/null
+++ b/pcl-1.15.1-eigen5.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5e2e90d..f000000 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -346,7 +346,12 @@ find_package(Threads REQUIRED)
+ 
+ # Eigen3 (required)
+-find_package(Eigen3 3.3 REQUIRED NO_MODULE)
++find_package(Eigen3 REQUIRED NO_MODULE)
++if(EIGEN3_VERSION_STRING AND EIGEN3_VERSION_STRING VERSION_LESS 3.3)
++  message(FATAL_ERROR "Eigen3 >= 3.3 is required, found ${EIGEN3_VERSION_STRING}")
++endif()
++# Fedora's Eigen 5 package advertises version 5.x even though it stays API-compatible.
++# Ensure the legacy variable mirrors the newer one for downstream logic.
+ if(NOT EIGEN3_FOUND AND Eigen3_FOUND)
+     set(EIGEN3_FOUND ${Eigen3_FOUND})
+ endif()

diff --git a/pcl-1.15.1-mathjax.patch b/pcl-1.15.1-mathjax.patch
new file mode 100644
index 0000000..79466ec
--- /dev/null
+++ b/pcl-1.15.1-mathjax.patch
@@ -0,0 +1,12 @@
+diff -up a/doc/doxygen/doxyfile.in b/doc/doxygen/doxyfile.in
+--- a/doc/doxygen/doxyfile.in	2025-08-26 21:44:08.000000000 +0530
++++ b/doc/doxygen/doxyfile.in	2026-05-29 08:17:16.369661103 +0530
+@@ -220,7 +220,7 @@
+ FORMULA_FONTSIZE       = 10
+ FORMULA_TRANSPARENT    = YES
+ FORMULA_MACROFILE      =
+-USE_MATHJAX            = NO
++USE_MATHJAX            = YES
+ MATHJAX_FORMAT         = HTML-CSS
+ MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+ MATHJAX_EXTENSIONS     =

diff --git a/pcl-1.15.1-system-gtest.patch b/pcl-1.15.1-system-gtest.patch
new file mode 100644
index 0000000..464ef48
--- /dev/null
+++ b/pcl-1.15.1-system-gtest.patch
@@ -0,0 +1,20 @@
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index c47ba3b..82ab08d 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -8,11 +8,10 @@ if(NOT build)
+   return()
+ endif()
+ 
+-find_package(GTestSource REQUIRED)
+-include_directories(SYSTEM ${GTEST_INCLUDE_DIRS} ${GTEST_SRC_DIR})
+-
+-add_library(pcl_gtest STATIC ${GTEST_SRC_DIR}/src/gtest-all.cc)
+-target_include_directories(pcl_gtest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
++find_package(GTest REQUIRED)
++add_library(pcl_gtest INTERFACE)
++target_link_libraries(pcl_gtest INTERFACE GTest::gtest)
++target_include_directories(pcl_gtest INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
+ 
+ enable_testing()
+ 

diff --git a/pcl-1.15.1-x11-link.patch b/pcl-1.15.1-x11-link.patch
new file mode 100644
index 0000000..943a930
--- /dev/null
+++ b/pcl-1.15.1-x11-link.patch
@@ -0,0 +1,21 @@
+--- a/visualization/CMakeLists.txt
++++ b/visualization/CMakeLists.txt
+@@ -36,6 +36,7 @@ endif()
+
+ if(${VTK_VERSION} VERSION_GREATER_EQUAL 9.0 AND UNIX AND NOT ANDROID AND NOT APPLE AND NOT APPLE_IOS)
+   list(APPEND srcs "src/vtk/vtkFixedXRenderWindowInteractor.cxx")
++  find_package(X11 REQUIRED)
+ endif()
+
+ if(NOT (${VTK_VERSION} VERSION_LESS 9.0))
+@@ -137,6 +138,10 @@ if(${VTK_VERSION} VERSION_GREATER_EQUAL 9.0)
+   if("RenderingContextOpenGL2" IN_LIST VTK_AVAILABLE_COMPONENTS)
+     target_link_libraries("${LIB_NAME}" VTK::RenderingContextOpenGL2)
+   endif()
++
++  if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT APPLE_IOS)
++    target_link_libraries("${LIB_NAME}" X11::X11)
++  endif()
+ else()
+   target_include_directories("${LIB_NAME}" SYSTEM PUBLIC ${VTK_INCLUDE_DIRS})
+   target_link_libraries("${LIB_NAME}"

diff --git a/pcl.spec b/pcl.spec
index 9aa14af..a21d948 100644
--- a/pcl.spec
+++ b/pcl.spec
@@ -2,7 +2,7 @@
 %global soversion 1.15
 
 Name:           pcl
-Version:        1.15.0
+Version:        1.15.1
 Release:        %autorelease
 Summary:        Library for point cloud processing
 # PCL is BSD-3-Clause
@@ -26,20 +26,27 @@ Patch2:         %{name}-1.12.0-fedora.patch
 Patch3:         %{name}-1.11.0-doxyfix.patch
 # Use a built-in sphinx documentation theme and disable doxylink plugin
 Patch5:         %{name}-1.15.0-sphinx.patch
+Patch6:         %{name}-1.15.1-eigen5.patch
+# Link X11 explicitly for VTK 9.5+ (no longer transitive)
+Patch7:         %{name}-1.15.1-x11-link.patch
+# Use MathJax instead of LaTeX for doxygen formula rendering
+Patch8:         %{name}-1.15.1-mathjax.patch
+# Use system GTest library instead of building from source
+Patch9:         %{name}-1.15.1-system-gtest.patch
 # For plain building
 BuildRequires:  cmake, gcc-c++, boost-devel
 # Documentation
 BuildRequires:  doxygen, graphviz, /usr/bin/sphinx-build
 
 # mandatory
-BuildRequires:  eigen3-static, flann-devel, vtk-devel, gl2ps-devel, hdf5-devel, libxml2-devel, netcdf-cxx-devel, jsoncpp-devel, libXext-devel, libatomic
+BuildRequires:  eigen3-static, flann-devel, vtk-devel, gl2ps-devel, hdf5-devel, libxml2-devel, netcdf-cxx-devel, jsoncpp-devel, libXext-devel, libX11-devel, libatomic
 # To fix Imported target "VTK::Java" includes non-existent path "/usr/lib/jvm/java/include" in its INTERFACE_INCLUDE_DIRECTORIES
 %ifarch %{java_arches}
 BuildRequires:  java-devel
 %endif
 
 # optional
-BuildRequires:  cjson-devel, libpcap-devel, qhull-devel, libusbx-devel, gtest-devel
+BuildRequires:  cjson-devel, libpcap-devel, qhull-devel, libusbx-devel
 %ifarch x86_64
 BuildRequires:  openni-devel
 %endif
@@ -93,6 +100,10 @@ Library.
 %patch -P2 -p0 -b .fedora
 %patch -P3 -p0 -b .doxyfix
 %patch -P5 -p1 -b .sphinx
+%patch -P6 -p1 -b .eigen5
+%patch -P7 -p1 -b .x11link
+%patch -P8 -p1 -b .mathjax
+%patch -P9 -p1 -b .sysgtest
 
 # Just to make it obvious we're not using any of these
 rm -fr surface/src/3rdparty/opennurbs
@@ -112,7 +123,9 @@ sed -i 's|@PCL_SOURCE_DIR@/build|@PCL_SOURCE_DIR@/%{_vpath_builddir}|' doc/doxyg
   -DWITH_CUDA=OFF \
   -DWITH_TUTORIALS=ON \
   -DBUILD_apps=ON \
-  -DBUILD_global_tests=OFF \
+  -DBUILD_global_tests=ON \
+  -DPCL_DISABLE_VISUALIZATION_TESTS=ON \
+  -DPCL_DISABLE_GPU_TESTS=ON \
   -DOPENNI_INCLUDE_DIR:PATH=/usr/include/ni \
   -DLIB_INSTALL_DIR=%{_lib} \
   -DPCL_WARNINGS_ARE_ERRORS=OFF \
@@ -163,7 +176,8 @@ mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/*.cmake $RPM_BUILD_ROOT%{_libdir}/cmake/
 mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/Modules $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/
 
 %check
-%ctest || true
+# Run only headless computational tests (no display or GPU required)
+%ctest --tests-regex "common_|geometry_|a_octree"
 
 
 %files

diff --git a/sources b/sources
index f0062b4..4ba70a9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pcl-1.15.0.tar.gz) = a1ab4858b8e5bde5b21bb3e04dcdcd9ca69204aa37a90dee336d4da452cb4be0a5b6a2b2b477668d4e82891955398825e97009fb5805df931af3c7d253e9100e
+SHA512 (pcl-1.15.1.tar.gz) = ca9e742bc24b38f31c42c9ea08e19054e18d045f487269b64a7b831dada89936445d90a5b46870d8c24c2d25b33a59df2d904fe7e51bc0b231317cdb319951e9

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-24 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 12:47 [rpms/pcl] rawhide: Fix build failure with VTK 9.5: add libX11-devel, use MathJax for docs Sayan Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox