[cmake] QHULL/FLANN dll missing when linking single module
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cmake, cpp
- Lĩnh vực
- build-system
Hướng nghiên cứu
The dependency edge is built in PCLConfig.cmake.in inside find_external_library(), which only attaches an external library when the legacy ${LIB}_LIBRARIES variable is set. Compare that with cmake/Modules/FindQhull.cmake and cmake/Modules/FindFLANN.cmake, which create QHULL::QHULL and FLANN::FLANN targets without setting those variables. Done when $<TARGET_RUNTIME_DLLS:app> for an app linking pcl_surface includes qhull_r.dll and flann_cpp.dll. Verifying that needs a shared Windows build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Linking pcl_surface instead of the legacy ${PCL_LIBRARIES} does not declare PCL's external
dependencies, so $<TARGET_RUNTIME_DLLS> omits qhull_r.dll (imported by pcl_surface.dll) and
flann_cpp.dll (imported by pcl_kdtree.dll). A deployed application then exits with
0xC0000135 (STATUS_DLL_NOT_FOUND).
Expected behavior
$<TARGET_RUNTIME_DLLS:app> contains qhull_r.dll and flann_cpp.dll when app links
pcl_surface.
Current Behavior
PCLConfig.cmake.in (master) attaches an external dependency to a component only through the
legacy variable:
# find_external_library(), L343-347
if(${LIB}_LIBRARIES)
list(APPEND PCL_${COMPONENT}_LINK_LIBRARIES "${${LIB}_LIBRARIES}")
...
endif()
cmake/Modules/FindQhull.cmake (L45–81) and FindFLANN.cmake (L45–91) create
QHULL::QHULL / FLANN::FLANN and return() without setting QHULL_LIBRARIES /
FLANN_LIBRARIES. The fallback at L766–771 only feeds ${PCL_LIBRARIES}.
Measured with PCL 1.14.1 shared, WITH_QHULL=ON, FLANN on:
pcl_surface INTERFACE_LINK_LIBRARIES = [OpenMP::OpenMP_CXX;pcl_common;pcl_search;pcl_kdtree;pcl_octree]
$<TARGET_RUNTIME_DLLS:app> = 10 DLLs, no qhull_r.dll, no flann_cpp.dll
app.exe = exit -1073741515 (0xC0000135)
The same file already does this for Eigen3 (L128–131) and OpenMP (L316–319), so this looks like
an omission.
To Reproduce
cmake_minimum_required(VERSION 3.21)
project(pcl_external_deps_repro LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
find_package(PCL REQUIRED COMPONENTS surface)
add_executable(app main.cpp)
target_link_libraries(app PRIVATE pcl_surface)
file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/dlls_$<CONFIG>.txt"
CONTENT "$<JOIN:$<TARGET_RUNTIME_DLLS:app>,|>")
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/surface/mls.h>
int main()
{
pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointXYZ> mls;
pcl::PointCloud<pcl::PointXYZ> cloud;
cloud.push_back(pcl::PointXYZ(0.0f, 0.0f, 0.0f));
cloud.push_back(pcl::PointXYZ(1.0f, 0.0f, 0.0f));
cloud.push_back(pcl::PointXYZ(0.0f, 1.0f, 0.0f));
pcl::PointCloud<pcl::PointXYZ> output;
mls.setInputCloud(cloud.makeShared());
mls.process(output);
return 0;
}
Build Release, copy app.exe and only the DLLs listed in dlls_Release.txt into an empty
folder, run app.exe → exit -1073741515 (0xC0000135). Adding qhull_r.dll alone still
fails; adding qhull_r.dll and flann_cpp.dll makes it run.
Environment
Windows 10 x64, MSVC 19.44, CMake 3.21+, PCL 1.14.1 (shared, WITH_QHULL=ON, FLANN on),
Qhull 8.x with modern QhullConfig.cmake. Code checked on master.
Possible Solution
Append one branch to the block at L340–347:
if(${LIB}_LIBRARIES)
list(APPEND PCL_${COMPONENT}_LINK_LIBRARIES "${${LIB}_LIBRARIES}")
set(PCL_${COMPONENT}_LINK_LIBRARIES ${PCL_${COMPONENT}_LINK_LIBRARIES} PARENT_SCOPE)
set(PCL_${LIB}_LIBRARIES ${${LIB}_LIBRARIES} PARENT_SCOPE) # Later appended to PCL_LIBRARIES
elseif(TARGET ${LIB}::${LIB})
list(APPEND PCL_${COMPONENT}_LINK_LIBRARIES ${LIB}::${LIB})
set(PCL_${COMPONENT}_LINK_LIBRARIES ${PCL_${COMPONENT}_LINK_LIBRARIES} PARENT_SCOPE)
set(PCL_${LIB}_LIBRARIES ${LIB}::${LIB} PARENT_SCOPE)
endif()
QHULL::QHULL and FLANN::FLANN match ${LIB}::${LIB}; VTK / Boost / Eigen3 / OpenMP keep
taking the first branch. With this patch the interface becomes
[QHULL::QHULL;OpenMP::OpenMP_CXX;FLANN::FLANN;pcl_common;...], the closure grows 10 → 12 DLLs,
and app.exe runs.
Additional context
#6345 / #6410 were about wrong DLL paths; here the paths are correct and the dependency edge
is missing. Related: #5108, #2581.
- Ngôn ngữ chính
- C++
- Star
- 11.2k
- Fork
- 4.7k
- Merge trung bình
- 6 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PointCloudLibrary/pcl
-
kind: bug status: triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
PointCloudLibrary/pcl#6536 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
PointCloudLibrary/pcl#6509 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
kind: bug status: triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PointCloudLibrary/pcl#6537 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
kind: bug status: triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PointCloudLibrary/pcl#6395 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[sample_consensus] Migrated the SSE and AVX implementations of countWithinDistance to RISC-V RVV 1.0Đang mởkind: request status: triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
PointCloudLibrary/pcl#6385 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của PointCloudLibrary/pcl
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
nextcloud/passman-android#214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature wsl2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
microsoft/WSL#42306 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
2026.11.0 fails to install on Intel macOS: requirements.txt pins cryptography==50.0.2 for Darwin x86_64Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
esphome/esphome#22892 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
sec_touch: a corrupted panel ACK ends a GET as malformed while its data frame is still comingĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
distante/esphome-components#50 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày