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

[vcpkg] install using_parser_urdf target #1309

Closed
wants to merge 1 commit into from

Conversation

talregev
Copy link

@talregev talregev commented Aug 20, 2023

install using_parser_urdf target

It fix for linux and mac. need to fix for windows as well.

@github-actions github-actions bot added the 🌱 garden Ignition Garden label Aug 20, 2023
@talregev talregev changed the title [vcpkg] install using_parser_urdf target [help needed][vcpkg] install using_parser_urdf target Aug 20, 2023
@traversaro
Copy link
Contributor

@talregev it is helpful for mantainers if you provide a link of the previous discussions on this. In a nutshell, when sdformat is compiled as a static library (BUILD_SHARED_LIBS=OFF) the privatly linked target using_parser_urdf needs to be exported, otherwise there is an installation error.

@talregev can you provide the erro you get on Windows with this PR? Otherwise it is difficult for other people to provide help if they do not even know the error you are having.

@talregev
Copy link
Author

@traversaro @azeey
Link to the discussion:
microsoft/vcpkg#31280 (comment)

@talregev
Copy link
Author

logs of vcpkg with the error
sdformat13.zip

urdfdom already install from vcpkg.

C:\src\vcpkg>type C:\src\vcpkg\buildtrees\sdformat13\config-x64-windows-out.log
[1/2] "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" -E chdir ".." "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" "C:/src/vcpkg/buildtrees/sdformat13/src/t13_13.5.0-6e97358adf.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/src/vcpkg/packages/sdformat13_x64-windows" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DRUBY=C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe" "-DBUILD_TESTING=OFF" "-DSKIP_PYBIND11=ON" "-DUSE_INTERNAL_URDF=OFF" "-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON" "-DCMAKE_REQUIRE_FIND_PACKAGE_GzURDFDOM=ON" "-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/src/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/src/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
FAILED: ../CMakeCache.txt
"C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" -E chdir ".." "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" "C:/src/vcpkg/buildtrees/sdformat13/src/t13_13.5.0-6e97358adf.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=C:/src/vcpkg/packages/sdformat13_x64-windows" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DRUBY=C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe" "-DBUILD_TESTING=OFF" "-DSKIP_PYBIND11=ON" "-DUSE_INTERNAL_URDF=OFF" "-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON" "-DCMAKE_REQUIRE_FIND_PACKAGE_GzURDFDOM=ON" "-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/src/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/src/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.35.32216.1
-- The CXX compiler identification is MSVC 19.35.32216.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/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/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- sdformat13 version 13.5.0
-- Operating system is Windows
-- Attempting manual search for tinyxml2
-- Found TINYXML2: TRUE
-- Looking for TINYXML2 - found

-- Looking for urdfdom - not found

-- Looking for urdfdom - not found

-- Could NOT find PY_psutil (missing: PY_PSUTIL)
-- Found ruby executable: C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe
-- Looking for gz-math7 -- found version 7.0.2
-- Searching for dependencies of gz-math7
-- Looking for gz-utils2 -- found version 2.0.0
-- Searching for dependencies of gz-utils2
-- Looking for gz-math7 - found

-- Looking for gz-utils2 -- found version 2.0.0
-- Searching for dependencies of gz-utils2
-- Searching for <gz-utils2> component [cli]
-- Looking for gz-utils2-cli -- found version 2.0.0
-- Searching for dependencies of gz-utils2-cli
-- Looking for gz-utils2 - found

-- Searching for Python - not found.
CMake Warning at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:69 (message):
   CONFIGURATION WARNINGS:
   -- Python psutil package not found. Memory leak tests will be skipped
   -- Python is missing: Python interfaces are disabled.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:73 (message):
  -- BUILD ERRORS: These must be resolved before compiling.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:75 (message):
  --    Couldn't find the urdfdom >= 1.0 system installation
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:77 (message):
  -- END BUILD ERRORS

Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:82 (message):
  Errors encountered in build.  Please see BUILD ERRORS above.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


-- Configuring incomplete, errors occurred!
[2/2] "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" -E chdir "../../x64-windows-dbg" "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" "C:/src/vcpkg/buildtrees/sdformat13/src/t13_13.5.0-6e97358adf.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/src/vcpkg/packages/sdformat13_x64-windows/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DRUBY=C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe" "-DBUILD_TESTING=OFF" "-DSKIP_PYBIND11=ON" "-DUSE_INTERNAL_URDF=OFF" "-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON" "-DCMAKE_REQUIRE_FIND_PACKAGE_GzURDFDOM=ON" "-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/src/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/src/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
FAILED: ../../x64-windows-dbg/CMakeCache.txt
"C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" -E chdir "../../x64-windows-dbg" "C:/src/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe" "C:/src/vcpkg/buildtrees/sdformat13/src/t13_13.5.0-6e97358adf.clean" "-G" "Ninja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=C:/src/vcpkg/packages/sdformat13_x64-windows/debug" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" "-DRUBY=C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe" "-DBUILD_TESTING=OFF" "-DSKIP_PYBIND11=ON" "-DUSE_INTERNAL_URDF=OFF" "-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON" "-DCMAKE_REQUIRE_FIND_PACKAGE_GzURDFDOM=ON" "-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON" "-DCMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" "-DBUILD_SHARED_LIBS=ON" "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/toolchains/windows.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" "-DVCPKG_SET_CHARSET_FLAG=ON" "-DVCPKG_PLATFORM_TOOLSET=v143" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" "-DVCPKG_CXX_FLAGS=" "-DVCPKG_CXX_FLAGS_RELEASE=" "-DVCPKG_CXX_FLAGS_DEBUG=" "-DVCPKG_C_FLAGS=" "-DVCPKG_C_FLAGS_RELEASE=" "-DVCPKG_C_FLAGS_DEBUG=" "-DVCPKG_CRT_LINKAGE=dynamic" "-DVCPKG_LINKER_FLAGS=" "-DVCPKG_LINKER_FLAGS_RELEASE=" "-DVCPKG_LINKER_FLAGS_DEBUG=" "-DVCPKG_TARGET_ARCHITECTURE=x64" "-DCMAKE_INSTALL_LIBDIR:STRING=lib" "-DCMAKE_INSTALL_BINDIR:STRING=bin" "-D_VCPKG_ROOT_DIR=C:/src/vcpkg" "-D_VCPKG_INSTALLED_DIR=C:/src/vcpkg/installed" "-DVCPKG_MANIFEST_INSTALL=OFF"
-- The C compiler identification is MSVC 19.35.32216.1
-- The CXX compiler identification is MSVC 19.35.32216.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/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/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- sdformat13 version 13.5.0
-- Operating system is Windows
-- Attempting manual search for tinyxml2
-- Found TINYXML2: TRUE
-- Looking for TINYXML2 - found

-- Looking for urdfdom - not found

-- Looking for urdfdom - not found

-- Could NOT find PY_psutil (missing: PY_PSUTIL)
-- Found ruby executable: C:/src/vcpkg/downloads/tools/ruby/rubyinstaller-2.7.4-1-x86/bin/ruby.exe
-- Looking for gz-math7 -- found version 7.0.2
-- Searching for dependencies of gz-math7
-- Looking for gz-utils2 -- found version 2.0.0
-- Searching for dependencies of gz-utils2
-- Looking for gz-math7 - found

-- Looking for gz-utils2 -- found version 2.0.0
-- Searching for dependencies of gz-utils2
-- Searching for <gz-utils2> component [cli]
-- Looking for gz-utils2-cli -- found version 2.0.0
-- Searching for dependencies of gz-utils2-cli
-- Looking for gz-utils2 - found

-- Searching for Python - not found.
CMake Warning at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:69 (message):
   CONFIGURATION WARNINGS:
   -- Python psutil package not found. Memory leak tests will be skipped
   -- Python is missing: Python interfaces are disabled.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:73 (message):
  -- BUILD ERRORS: These must be resolved before compiling.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:75 (message):
  --    Couldn't find the urdfdom >= 1.0 system installation
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:77 (message):
  -- END BUILD ERRORS

Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


CMake Error at C:/src/vcpkg/installed/x64-windows/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:82 (message):
  Errors encountered in build.  Please see BUILD ERRORS above.
Call Stack (most recent call first):
  CMakeLists.txt:157 (gz_configure_build)


-- Configuring incomplete, errors occurred!
ninja: build stopped: subcommand failed.

@traversaro
Copy link
Contributor

Given the error:

  --    Couldn't find the urdfdom >= 1.0 system installation

what is failing is the call gz_find_package(GzURDFDOM VERSION 1.0 QUIET) in

gz_find_package(GzURDFDOM VERSION 1.0 QUIET)
, nothing directly related to the sdformat13::using_parser_urdf target. Perhaps a possible debug step is to remove the QUIET from gz_find_package(GzURDFDOM VERSION 1.0) to get a more informative error message?

@talregev
Copy link
Author

talregev commented Aug 23, 2023

I will remove the quiet and put the logs again here.

@talregev
Copy link
Author

talregev commented Aug 23, 2023

I will remove the quiet and put the logs again here.

I run it without the quite. the same output. Putting here the logs:

sdformat13.zip

@talregev
Copy link
Author

talregev commented Aug 23, 2023

@traversaro @azeey
I found workaround.
If i change it to gz_find_package(GzURDFDOM) without version, it compile. Is it acceptable solution?

@talregev talregev changed the title [help needed][vcpkg] install using_parser_urdf target [vcpkg] install using_parser_urdf target Aug 25, 2023
@talregev
Copy link
Author

@traversaro @azeey I found workaround. If i change it to gz_find_package(GzURDFDOM) without version, it compile. Is it acceptable solution?

This is a gentle remind about my comment.
I already see in the vcpkg PR that this modification (remove the version of urdfdom) is help and compile in all os (windows, linux osx).
I guess this is come that vcpkg didn't install correctly the urdfdom (it also have a problem to install it static only in windows).
Are you willing to help to fix that urdfdom in vcpkg? Is my workaround is acceptable solution?
I will happy to hear your comments and thoughts.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #1309 (e351a10) into sdf13 (f425694) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head e351a10 differs from pull request most recent head b460cde. Consider uploading reports for the commit b460cde to get more accurate results

@@            Coverage Diff             @@
##            sdf13    #1309      +/-   ##
==========================================
+ Coverage   87.58%   87.60%   +0.01%     
==========================================
  Files         128      128              
  Lines       17090    16823     -267     
==========================================
- Hits        14968    14737     -231     
+ Misses       2122     2086      -36     

see 6 files with indirect coverage changes

@azeey
Copy link
Collaborator

azeey commented Sep 14, 2023

I'm not too familiar with vcpkg, but if we want static builds, shouldn't using_parser_urdf be built as a static library as well? It's not clear to me why it needs to be installed.

@talregev
Copy link
Author

I'm not too familiar with vcpkg, but if we want static builds, shouldn't using_parser_urdf be built as a static library as well? It's not clear to me why it needs to be installed.

@traversaro Can you explain the problem?

Signed-off-by: Tal Regev <tal.regev@gmail.com>
@talregev
Copy link
Author

@azeey @scpeters
This PR is ready for review. this changes is working on linux, mac and windows.
Can you review it?

@talregev
Copy link
Author

I'm not too familiar with vcpkg, but if we want static builds, shouldn't using_parser_urdf be built as a static library as well? It's not clear to me why it needs to be installed.

@azeey You can read @traversaro comment here:
microsoft/vcpkg#31280 (comment)

@traversaro
Copy link
Contributor

I'm not too familiar with vcpkg, but if we want static builds, shouldn't using_parser_urdf be built as a static library as well? It's not clear to me why it needs to be installed.

@traversaro Can you explain the problem?

So, the problem is that if you have two libraries in CMake, i.e. :

  • libA : a library of type INTERFACE
  • libB: a library of type SHARED or STATIC, depending on BUILD_SHARED_LIBS

and you have in the code:

target_link_libraries(libB PRIVATE libA)

if libB is SHARED, there is no need to install libA, while if libB is static, you need to install also libA.

@talregev
Copy link
Author

I'm not too familiar with vcpkg, but if we want static builds, shouldn't using_parser_urdf be built as a static library as well? It's not clear to me why it needs to be installed.

@traversaro Can you explain the problem?

So, the problem is that if you have two libraries in CMake, i.e. :

  • libA : a library of type INTERFACE
  • libB: a library of type SHARED or STATIC, depending on BUILD_SHARED_LIBS

and you have in the code:

target_link_libraries(libB PRIVATE libA)

if libB is SHARED, there is no need to install libA, while if libB is static, you need to install also libA.

Thank you for explain that in detail!

@azeey
Copy link
Collaborator

azeey commented Nov 9, 2023

#1343 fixes static builds and passes CI, so I'll close this in favor of that.

@azeey azeey closed this Nov 9, 2023
@talregev talregev deleted the TalR/cmake_config branch November 9, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants