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

build of 1.14.1 fails with boost 1.86.0 #6157

Open
gdt opened this issue Oct 25, 2024 · 4 comments
Open

build of 1.14.1 fails with boost 1.86.0 #6157

gdt opened this issue Oct 25, 2024 · 4 comments
Labels

Comments

@gdt
Copy link

gdt commented Oct 25, 2024

Describe the bug

1.14.1 (the latest release,according to github) fails to build with boost 1.86.0. Because the nature of packaging systems is to carry one version of each package, it's necessary for every package to have a release that will build with the latest release of all dependencies.

pkgsrc recently got boost 1.86.0, and now the pcl build is failing:

> make
=> Bootstrap dependency digest>=20211023: found digest-20220214
===> Checking for vulnerabilities in pcl-1.14.1nb5
===> Building for pcl-1.14.1nb5
[28/290] Building CXX object visualization/CMakeFiles/pcl_visualization.dir/src/pcl_visualizer.cpp.o
FAILED: visualization/CMakeFiles/pcl_visualization.dir/src/pcl_visualizer.cpp.o 
/tmp/work/graphics/pcl/work/.cwrapper/bin/c++ -DPCLAPI_EXPORTS -DQT_CORE_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050900 -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -Dkiss_fft_scalar=double -DvtkRenderingContext2D_AUTOINIT_INCLUDE=\"/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/cmake-pkgsrc-build/CMakeFiles/vtkModuleAutoInit_e8a719bca0f84dfe780c94feaaba76ea.h\" -DvtkRenderingCore_AUTOINIT_INCLUDE=\"/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/cmake-pkgsrc-build/CMakeFiles/vtkModuleAutoInit_e8a719bca0f84dfe780c94feaaba76ea.h\" -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/cmake-pkgsrc-build/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/common/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/io/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/kdtree/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/geometry/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/search/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/octree/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/openni/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/openni2/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/ensenso/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/davidSDK/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/dssdk/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/rssdk/include -I/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/visualization/include -isystem /tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/recognition/include/pcl/recognition/3rdparty -isystem /usr/pkg/include -isystem /tmp/work/graphics/pcl/work/.buildlink/include/eigen3 -isystem /tmp/work/graphics/pcl/work/.buildlink/include/vtk-9.2 -isystem /tmp/work/graphics/pcl/work/.buildlink/include -isystem /tmp/work/graphics/pcl/work/.buildlink/include/freetype2 -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/include -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/include/QtOpenGL -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/include/QtWidgets -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/include/QtGui -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/include/QtCore -isystem /tmp/work/graphics/pcl/work/.buildlink/qt5/./mkspecs/netbsd-g++ -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/pkg/include/freetype2 -I/usr/pkg/qt5/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -DNDEBUG -std=c++14 -fPIC -fPIC -MD -MT visualization/CMakeFiles/pcl_visualization.dir/src/pcl_visualizer.cpp.o -MF visualization/CMakeFiles/pcl_visualization.dir/src/pcl_visualizer.cpp.o.d -o visualization/CMakeFiles/pcl_visualization.dir/src/pcl_visualizer.cpp.o -c /tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/visualization/src/pcl_visualizer.cpp
/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/visualization/src/pcl_visualizer.cpp: In member function 'std::string pcl::visualization::PCLVisualizer::getUniqueCameraFile(int, char**)':
/tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/visualization/src/pcl_visualizer.cpp:4595:24: error: cannot convert 'unsigned int [5]' to 'unsigned char (&)[20]'
 4595 |       sha1.get_digest (digest);
      |                        ^~~~~~
      |                        |
      |                        unsigned int [5]
In file included from /tmp/work/graphics/pcl/work/pcl-pcl-1.14.1/visualization/src/pcl_visualizer.cpp:102:
/usr/pkg/include/boost/uuid/detail/sha1.hpp:179:43: note:   initializing argument 1 of 'void boost::uuids::detail::sha1::get_digest(unsigned char (&)[20])'
  179 | inline void sha1::get_digest(digest_type& digest)
      |                              ~~~~~~~~~~~~~^~~~~~
[35/290] Building CXX object tracking/CMakeFiles/pcl_tracking.dir/src/particle_filter.cpp.o
ninja: build stopped: subcommand failed.
*** Error code 1

Context

I'm building pcl in the context of pkgsrc, in a way that worked before. I had a successful build on September 19, with boost 1.85.0. This is on NetBSD 10 amd64, but the error hints at boost having an API change.

Expected behavior

The latest release builds with the latest release of boost.

Current Behavior

See build failure bove.

To Reproduce

Obtain pkgsrc from pkgsrc.org and build pcl.

Your Environment (please complete the following information):

  • NetBSD 10, amd64
  • gcc version 10.5.0 (nb2 20230710)
  • PCL 1.14.1
@gdt gdt added kind: bug Type of issue status: triage Labels incomplete labels Oct 25, 2024
@gdt gdt changed the title [module_name] Provide a general summary of the issue build of 1.14.1 fails with boost 1.86.0 Oct 25, 2024
@gdt
Copy link
Author

gdt commented Oct 26, 2024

Likely this was a latent bug, and expressed because of newer boost. The issue is that pcl_visualizer.cpp declares

unsigned int digest[5];

and passes that to digest.sha1. However, that takes a reference to an array of 20 unsigned chars. At best this is improper type conversion. It also assumes that an int is int32_t, which while true on many CPUs is not true on e.g. alpha.

A fix almost certainly involves treating the sha1 digest as 20 bytes, and not pretending it is a smaller number of larger types.

@mvieth
Copy link
Member

mvieth commented Oct 26, 2024

Hi, PCL 1.14.1 was released in May, while Boost 1.86.0 was released in August. That is why they do not work together.
The PCL master branch however does work with Boost 1.86.0. The relevant commits are:
4d0a15b
c6bbf02

To my knowledge, some other package managers (e.g. vcpkg) apply patches to their ports in cases like this one. Perhaps that is an option in pkgsrc as well. The next PCL release is planned for December 2024 or early 2025, by the way.
I hope that helps.

@mvieth mvieth added module: cmake and removed status: triage Labels incomplete labels Oct 26, 2024
@gdt
Copy link
Author

gdt commented Oct 26, 2024

I found one of the commits but missed the other. yes, packaging systems often pull up fixes. And I realize that there is no release newer than the latest boost release. But, I think that if a project uses a dependency and that dependency is unstable, then there needs to be a prompt release when the project's latest release doesn't build with the latest release. I also realize that's work, but my feeling is that this work is part of the downside of using boost and presumably balanced by the goodness of doing so.

@gdt
Copy link
Author

gdt commented Oct 28, 2024

Apparently I'm off about NetBSD/alpha being ILP64, but the point remains that C does not require int to be 4 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants