Skip to content

[pcl_cuda_common] Missing export pkgconfig file #5025

@JackBoosY

Description

@JackBoosY

Describe the bug

I'm vcpkg maintainer, recently we updated pcl to 1.12.0 in vcpkg, then some users report the install fails using vcpkg (microsoft/vcpkg#21223):

Building package pcl[core,cuda]:x64-windows-static...
-- Using cached PointCloudLibrary-pcl-f36a69a5e89953708990c4669317f989d532cf08.tar.gz.
...
-- [DEBUG] manually specified variables: BUILD_surface_on_nurbs;PCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32;PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32;PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32;PCL_SHARED_LIBS;WITH_LIBUSB;WITH_PNG;WITH_QHULL;WITH_OPENNI2;WITH_QT;WITH_PCAP;WITH_CUDA;BUILD_CUDA;BUILD_GPU;BUILD_tools;WITH_OPENGL;WITH_VTK
-- Configuring x64-windows-static
...
-- Building x64-windows-static-rel
-- Installing: F:/vcpkg/packages/pcl_x64-windows-static/share/pcl/copyright
-- [DEBUG] RELEASE Files: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_2d-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_common-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_features-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_sample_consensus-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_segmentation-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_features-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_filters-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_geometry-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_containers-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_features-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_octree-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_segmentation-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_utils-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_io-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_kdtree-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_keypoints-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_ml-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_octree-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_recognition-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_registration-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_sample_consensus-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_search-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_segmentation-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_stereo-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_surface-1.12.pc;F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_tracking-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_2d-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_common-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_features-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_sample_consensus-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_cuda_segmentation-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_features-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_filters-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_geometry-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_containers-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_features-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_octree-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_segmentation-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_gpu_utils-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_io-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_kdtree-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_keypoints-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_ml-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_octree-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_recognition-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_registration-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_sample_consensus-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_search-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_segmentation-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_stereo-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_surface-1.12.pc
-- Fixing pkgconfig file: F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig/pcl_tracking-1.12.pc
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-2-any.pkg.tar.zst.
-- Using cached msys-mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst.
-- Using msys root at F:/vcpkg/downloads/tools/msys2/aa5af7b2aa7e90e8
-- [DEBUG] Using pkg-config from: F:/vcpkg/downloads/tools/msys2/aa5af7b2aa7e90e8/mingw32/bin/pkg-config.exe
-- [DEBUG] Checking package (RELEASE): pcl_2d-1.12
-- [DEBUG] pkg-config --exists pcl_2d-1.12 output:
-- [DEBUG] Checking package (RELEASE): pcl_common-1.12
-- [DEBUG] pkg-config --exists pcl_common-1.12 output:
-- [DEBUG] Checking package (RELEASE): pcl_cuda_features-1.12
CMake Error at scripts/cmake/vcpkg_fixup_pkgconfig.cmake:78 (message):
  F:/vcpkg/downloads/tools/msys2/aa5af7b2aa7e90e8/mingw32/bin/pkg-config.exe
  --exists pcl_cuda_features-1.12 failed with error code: 1

      ENV{PKG_CONFIG_PATH}: "F:/vcpkg/packages/pcl_x64-windows-static/lib/pkgconfig;F:/vcpkg/packages/pcl_x64-windows-static/share/pkgconfig;F:/vcpkg/installed/x64-windows-static/lib/pkgconfig;F:/vcpkg/installed/x64-windows-static/share/pkgconfig"
      output: Package pcl_cuda_common-1.12 was not found in the pkg-config search path.

  Perhaps you should add the directory containing `pcl_cuda_common-1.12.pc'

  to the PKG_CONFIG_PATH environment variable

  Package 'pcl_cuda_common-1.12', required by 'pcl_cuda_features-1.12', not
  found
Call Stack (most recent call first):
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:201 (z_vcpkg_fixup_pkgconfig_check_files)
  ports/pcl/portfile.cmake:77 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:142 (include)


Error: Building package pcl:x64-windows-static failed with: BUILD_FAILED

In order to use the pkgconfig file correctly, vcpkg will check the contents of the generated .pc to ensure correctness.

Context

After checking the pkgconfig file and code, I found that some pcl_cuda components use pkgconfig.cmake.in to generate pkgconfig that depends on pcl_cuda_common, and the code that generates pkgconfig is commented out.

Expected behavior

A clear and concise description of what you expected to happen.

Current Behavior

Deleting the comment in the code below can solve this issue. I will open the PR in vcpkg and here to fix this.

To Reproduce

  1. clone vcpkg
  2. run bootstrap script
  3. .\vcpkg.exe install pcl[cuda]:x64-windows-static

Screenshots/Code snippets

In order to help explain your problem, please consider adding

  • screenshots of the GUI issues: N/A
  • code snippets:
    #set(LIB_NAME pcl_${SUBSYS_NAME})
    set(EXT_DEPS CUDA)
    #PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
    # "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "")

Your Environment (please complete the following information):

  • OS: Windows 10
  • Compiler: Visual Studio 2017
  • PCL Version 1.12.0

Possible Solution

Just need to delele the comment in the code.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions