ros / resource_retriever

Package used to retrieve resources of different kinds, e.g. http://, file://, the ROS specific package://, etc.
8 stars 42 forks source link

Error while building for Windows - curl configuration not found #75

Closed pijaro closed 4 months ago

pijaro commented 2 years ago

Bug report

Required Info:

Steps to reproduce issue

Follow ROS2 Windows build instructions.

Expected behavior

Build succeeded

Actual behavior

Error while building resource_retriever

Additional information

Starting >>> resource_retriever
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30037.0
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ament_cmake_ros: 0.10.0 (C:/dev/ros2_rolling/install/share/ament_cmake_ros/cmake)
-- Found Python3: C:/Python38/python.exe (found version "3.8.3") found components: Interpreter
-- Found ament_index_cpp: 1.4.0 (C:/dev/ros2_rolling/install/share/ament_index_cpp/cmake)
-- Found libcurl_vendor: 3.1.0 (C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake)
-- Setting curl_DIR to: 'C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake/../../../opt/libcurl_vendor/CMake'
CMake Error at C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake/libcurl_vendor-extras.cmake:16 (find_package):
  Could not find a package configuration file provided by "curl" with any of
  the following names:

    curlConfig.cmake
    curl-config.cmake

  Add the installation prefix of "curl" to CMAKE_PREFIX_PATH or set
  "curl_DIR" to a directory containing one of the above files.  If "curl"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake/libcurl_vendorConfig.cmake:41 (include)
  CMakeLists.txt:16 (find_package)

-- Configuring incomplete, errors occurred!
See also "C:/dev/ros2_rolling/build/resource_retriever/CMakeFiles/CMakeOutput.log".
--- stderr: resource_retriever
CMake Error at C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake/libcurl_vendor-extras.cmake:16 (find_package):
  Could not find a package configuration file provided by "curl" with any of

    curlConfig.cmake
    curl-config.cmake

  Add the installation prefix of "curl" to CMAKE_PREFIX_PATH or set
  "curl_DIR" to a directory containing one of the above files.  If "curl"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  C:/dev/ros2_rolling/install/share/libcurl_vendor/cmake/libcurl_vendorConfig.cmake:41 (include)
  CMakeLists.txt:16 (find_package)

---
Failed   <<< resource_retriever [6.25s, exited with code 1]
RParkerE commented 4 months ago

Even on the latest for ROS2 Iron, fix #76 did not solve this for me.

libcurl_vendor log

Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

-- Up-to-date: C:/iron/install/opt/libcurl_vendor
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/bin
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/bin/curl-config
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/bin/curl.exe
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/bin/libcurl.dll
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/curl.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/curlver.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/easy.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/mprintf.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/multi.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/options.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/stdcheaders.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/system.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/typecheck-gcc.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/include/curl/urlapi.h
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake/CURL
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake/CURL/CURLConfig.cmake
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake/CURL/CURLConfigVersion.cmake
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake/CURL/CURLTargets-release.cmake
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/cmake/CURL/CURLTargets.cmake
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/libcurl_imp.lib
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/pkgconfig
-- Up-to-date: C:/iron/install/opt/libcurl_vendor/lib/pkgconfig/libcurl.pc
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/libcurl_vendor_library_path.bat
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/libcurl_vendor_library_path.dsv
-- Up-to-date: C:/iron/install/share/ament_index/resource_index/package_run_dependencies/libcurl_vendor
-- Up-to-date: C:/iron/install/share/ament_index/resource_index/parent_prefix_path/libcurl_vendor
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/ament_prefix_path.bat
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/ament_prefix_path.dsv
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/path.bat
-- Up-to-date: C:/iron/install/share/libcurl_vendor/environment/path.dsv
-- Up-to-date: C:/iron/install/share/libcurl_vendor/local_setup.bat
-- Up-to-date: C:/iron/install/share/libcurl_vendor/local_setup.dsv
-- Installing: C:/iron/install/share/libcurl_vendor/package.dsv
-- Up-to-date: C:/iron/install/share/ament_index/resource_index/packages/libcurl_vendor
-- Up-to-date: C:/iron/install/share/libcurl_vendor/cmake/libcurl_vendor-extras.cmake
-- Up-to-date: C:/iron/install/share/libcurl_vendor/cmake/libcurl_vendorConfig.cmake
-- Up-to-date: C:/iron/install/share/libcurl_vendor/cmake/libcurl_vendorConfig-version.cmake
-- Up-to-date: C:/iron/install/share/libcurl_vendor/package.xml

resource_retriever log output

-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- Found ament_cmake_ros: 0.11.2 (C:/iron/install/share/ament_cmake_ros/cmake)
-- Found ament_index_cpp: 1.5.2 (C:/iron/install/share/ament_index_cpp/cmake)
-- Found libcurl_vendor: 3.2.2 (C:/iron/install/share/libcurl_vendor/cmake)
-- Setting curl_DIR to: 'C:/iron/install/share/libcurl_vendor/cmake/../../../opt/libcurl_vendor/CMake'
CMake Error at C:/iron/install/share/libcurl_vendor/cmake/libcurl_vendor-extras.cmake:16 (find_package):
  Could not find a package configuration file provided by "curl" with any of
  the following names:

    curlConfig.cmake
    curl-config.cmake

  Add the installation prefix of "curl" to CMAKE_PREFIX_PATH or set
  "curl_DIR" to a directory containing one of the above files.  If "curl"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  C:/iron/install/share/libcurl_vendor/cmake/libcurl_vendorConfig.cmake:41 (include)
  CMakeLists.txt:16 (find_package)

-- Configuring incomplete, errors occurred!
clalancette commented 4 months ago

I can't reproduce this on my Windows installation; this all builds fine. That is also the case on our nightly builds: https://ci.ros2.org/view/nightly/job/nightly_win_rel/3032/ .

There must be some kind of difference in your setup. One thing that can happen here is that cmake can end up "caching" some stuff in the registry, which can confuse things later on.

Can you run reg query HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages and paste the output here?

RParkerE commented 4 months ago

Yes, the output of reg query HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages for my system is:

HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\cpptoml
HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\orocos_kdl
HKEY_CURRENT_USER\SOFTWARE\Kitware\CMake\Packages\Pangolin
clalancette commented 4 months ago

This should be fixed by #96

RParkerE commented 4 months ago

Yes, this fixed the issue for me. Thank you!