pcl icon indicating copy to clipboard operation
pcl copied to clipboard

[custom] Unable to build from source on Windows10

Open jsemeda opened this issue 1 month ago • 11 comments

I downloaded the source code and used cmake to build it as described in the build section, on windows 10 and visual studio, but the generated project is empty, image attached.

Image

jsemeda avatar Nov 14 '25 18:11 jsemeda

How did you install all dependencies and how did you run cmake?

larshg avatar Nov 15 '25 07:11 larshg

The dependencies are already built on my drive, some are compiled from source and some came from vcpkg. I run cmake-gui for windows as shown in the installation section.

jsemeda avatar Nov 15 '25 20:11 jsemeda

And you have added vcpkg as a toolchain input? Try show the log from the cmake generation.

larshg avatar Nov 17 '25 08:11 larshg

Yes vcpkg and pkgconfig are both present. Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045. Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE ClangFormat_VERSION) (Required is at least version "14") Found CUDA Toolkit v13.0.88 CMAKE_CUDA_ARCHITECTURES: 75;80;86;87;88;89;90;100;110;103;120;121 Found OpenMP, spec date 200203 Checking for module 'flann>=1.9.1' Package 'flann' not found FLANN found (include: D:/Libraries/flann-1.9.1/src/cpp/flann, lib: D:/Libraries/flann-1.9.1/build/lib/Release/flann_cpp_s.lib) nanoflann was not found, so some PCL classes will not be available. Checking for module 'libusb-1.0' Package 'libusb-1.0' not found Could NOT find libusb (missing: libusb_LIBRARIES libusb_INCLUDE_DIR) Could NOT find libusb (missing: LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS) Could NOT find Qhull (missing: QHULL_LIBRARY QHULL_INCLUDE_DIR) VTK version: 9.5.20250905 VTK rendering backend: OpenGL2 VTK Qt support: NOTFOUND VTK libs: VTK::DICOM;VTK::zlib;VTK::WrappingTools;VTK::ViewsContext2D;VTK::loguru;VTK::TestingRendering;VTK::TestingCore;VTK::vtksys;VTK::ViewsInfovis;VTK::CommonColor;VTK::ViewsCore;VTK::RenderingLabel;VTK::octree;VTK::RenderingLOD;VTK::RenderingLICOpenGL2;VTK::glad;VTK::RenderingImage;VTK::RenderingGridAxes;VTK::RenderingContextOpenGL2;VTK::RenderingCellGrid;VTK::fmt;VTK::nlohmannjson;VTK::RenderingVolumeOpenGL2;VTK::IOVeraOut;VTK::hdf5;VTK::IOTecplotTable;VTK::utf8;VTK::IOSegY;VTK::IOParallelXML;VTK::IOParallel;VTK::jsoncpp;VTK::IOPLY;VTK::IOOggTheora;VTK::theora;VTK::ogg;VTK::IONetCDF;VTK::netcdf;VTK::IOMotionFX;VTK::pegtl;VTK::IOMINC;VTK::IOLSDyna;VTK::IOLANLX3D;VTK::IOImport;VTK::IOIOSS;VTK::ioss;VTK::cgns;VTK::exodusII;VTK::IOHDF;VTK::IOFLUENTCFF;VTK::IOVideo;VTK::IOMovie;VTK::IOFDS;VTK::IOInfovis;VTK::libxml2;VTK::IOExportPDF;VTK::libharu;VTK::png;VTK::IOExportGL2PS;VTK::RenderingGL2PSOpenGL2;VTK::gl2ps;VTK::IOExodus;VTK::IOEngys;VTK::IOEnSight;VTK::IOERF;VTK::IOCityGML;VTK::pugixml;VTK::IOChemistry;VTK::IOCesium3DTiles;VTK::libproj;VTK::IOCONVERGECFD;VTK::IOHDFTools;VTK::IOCGNSReader;VTK::IOAvmesh;VTK::IOAsynchronous;VTK::IOExport;VTK::RenderingVtkJS;VTK::IOGeometry;VTK::RenderingSceneGraph;VTK::IOAMR;VTK::InteractionImage;VTK::InfovisLayout;VTK::ImagingStencil;VTK::ImagingStatistics;VTK::ImagingMorphological;VTK::ImagingMath;VTK::ImagingFourier;VTK::IOSQL;VTK::sqlite;VTK::InteractionWidgets;VTK::RenderingVolume;VTK::RenderingAnnotation;VTK::InteractionStyle;VTK::ImagingHybrid;VTK::ImagingColor;VTK::GeovisCore;VTK::FiltersTopology;VTK::FiltersTensor;VTK::FiltersSelection;VTK::FiltersSMP;VTK::FiltersProgrammable;VTK::FiltersPoints;VTK::FiltersParallelImaging;VTK::FiltersTemporal;VTK::FiltersImaging;VTK::ImagingGeneral;VTK::FiltersGeometryPreview;VTK::FiltersGeneric;VTK::FiltersFlowPaths;VTK::eigen;VTK::FiltersAMR;VTK::FiltersParallel;VTK::FiltersTexture;VTK::FiltersModeling;VTK::DomainsChemistryOpenGL2;VTK::RenderingOpenGL2;VTK::RenderingHyperTreeGrid;VTK::RenderingUI;VTK::FiltersHybrid;VTK::DomainsChemistry;VTK::ChartsCore;VTK::InfovisCore;VTK::FiltersExtraction;VTK::ParallelDIY;VTK::diy2;VTK::IOXML;VTK::IOXMLParser;VTK::expat;VTK::ParallelCore;VTK::IOLegacy;VTK::IOCellGrid;VTK::FiltersCellGrid;VTK::token;VTK::IOCore;VTK::lz4;VTK::lzma;VTK::fast_float;VTK::FiltersStatistics;VTK::FiltersHyperTree;VTK::ImagingSources;VTK::IOImage;VTK::jpeg;VTK::metaio;VTK::tiff;VTK::DICOMParser;VTK::RenderingContext2D;VTK::RenderingFreeType;VTK::freetype;VTK::kwiml;VTK::RenderingCore;VTK::FiltersSources;VTK::ImagingCore;VTK::FiltersGeneral;VTK::FiltersVerdict;VTK::verdict;VTK::FiltersGeometry;VTK::CommonComputationalGeometry;VTK::FiltersCore;VTK::FiltersReduction;VTK::CommonExecutionModel;VTK::CommonDataModel;VTK::CommonSystem;VTK::CommonMisc;VTK::exprtk;VTK::CommonTransforms;VTK::CommonMath;VTK::kissfft;VTK::CommonCore;VTK::scn Qt version: 5.15.18 CMake Deprecation Warning at cmake/pcl_find_qt.cmake:61 (cmake_policy): The OLD behavior for policy CMP0100 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack (most recent call first): CMakeLists.txt:432 (include)

Could NOT find Pcap (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS) CMake Warning at D:/vcpkg/scripts/buildsystems/vcpkg.cmake:908 (_find_package): By not providing "FindcJSON.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "cJSON", but CMake did not find one.

Could not find a package configuration file provided by "cJSON" with any of the following names:

cJSONConfig.cmake
cjson-config.cmake

Add the installation prefix of "cJSON" to CMAKE_PREFIX_PATH or set "cJSON_DIR" to a directory containing one of the above files. If "cJSON" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:463 (find_package)

CMake Warning at CMakeLists.txt:467 (message): It is recommended to install an up-to-date version of cJSON on your system. CMake did not find one, and will instead use a cJSON version bundled with the PCL source code. However, that is an older version which may pose a risk and may be removed in a future PCL release.

DOXYGEN_FOUND HTML_HELP_COMPILER Found CPack generators: NSIS PCL build with following flags: /DWIN32 /D_WINDOWS /GR /EHsc /fp:precise /arch:AVX2 /wd4800 /wd4521 /wd4251 /wd4275 /wd4305 /wd4355 /w34265 /bigobj -openmp The following subsystems will be built: cuda_common The following subsystems will not be built: common: Requires external library boost. kdtree: Requires common. octree: Requires common. search: Requires octree. sample_consensus: Requires search. filters: Requires octree. 2d: Requires filters. geometry: Requires common. io: Requires external library boost. features: Requires 2d. ml: Requires common. segmentation: Requires ml. visualization: Requires octree. surface: Requires octree. registration: Requires filters. keypoints: Requires filters. tracking: Requires octree. recognition: Requires ml. stereo: Requires io. apps: Requires 2d. benchmarks: Disabled by default. cuda_io: Requires external library openni. cuda_features: Requires common. cuda_segmentation: Requires common. cuda_sample_consensus: Requires common. cuda_apps: Requires geometry. outofcore: Boost filesystem is not available. examples: Disabled: outofcore missing. gpu_utils: Requires common. gpu_containers: Requires gpu_utils. gpu_octree: Requires gpu_utils. gpu_features: Requires geometry. gpu_kinfu: Kinfu uses textures which was removed in CUDA 12 gpu_kinfu_large_scale: Kinfu_large_scale uses textures which was removed in CUDA 12 gpu_people: Requires visualization. gpu_segmentation: Requires gpu_octree. gpu_surface: Disabled by default. gpu_tracking: Disabled by default. people: Requires octree. simulation: Disabled by default. global_tests: Disabled by default. tools: Requires io. Configuring done (26.7s) Generating done (27.5s)

jsemeda avatar Nov 17 '25 20:11 jsemeda

Seemlingly it has found boost - is that installed with vcpkg? which version? if you do a clean cache and reconfigure, does it then find it?

larshg avatar Nov 17 '25 21:11 larshg

I have boost on vcpkg and built from source, but I am not providing any boost information to cmake. I looked at my Path and it is not on it. I changed the flann folder to vcpkg so it can find it. I added BOOST_ROOT and BOOST_INCLUDE_DIR to the env vars but it is still unable to find it. I see that is causing problems since it is refusing to build several packages, just not sure how to make it find boost

jsemeda avatar Nov 18 '25 02:11 jsemeda

Yeah, boost is required. Can you post all lines about boost. I remember I experienced something similiar, but right now I can't remember the solution 😕

larshg avatar Nov 18 '25 07:11 larshg

Have you built boost as static or dynamic?

larshg avatar Nov 18 '25 07:11 larshg

I almost always use static libraries, so it is static built. I am looking at the findboost.cmake file to see how it is finding boost, I might have to make some changes in the file to force it to see it.

jsemeda avatar Nov 18 '25 17:11 jsemeda

Ahh, yes. I did build it as relwithdebug (dynamic/dll though) and I think that file name wasn't recognized, so that could be it.

larshg avatar Nov 18 '25 18:11 larshg

Maybe see https://github.com/PointCloudLibrary/pcl/blob/master/.dev/docker/windows/Dockerfile#L52 and compare with the boost vcpkg-packages you have installed. Especially boost-cmake is important.

mvieth avatar Nov 18 '25 19:11 mvieth