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

[ignition] Updates on various pkgs 🤖 #14324

Merged
merged 16 commits into from
Nov 6, 2020
1 change: 1 addition & 0 deletions ports/console-bridge/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: console-bridge
Version: 1.0.1
Port-Version: 1
Homepage: https://github.com/ros/console_bridge
Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
4 changes: 4 additions & 0 deletions ports/console-bridge/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge)
endif()

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
vcpkg_fixup_pkgconfig()
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(READ ${SOURCE_PATH}/src/console.cpp _contents)
Expand Down
2 changes: 1 addition & 1 deletion ports/ignition-cmake2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ignition-cmake2
Version: 2.2.0-1
Version: 2.5.0
Homepage: https://ignitionrobotics.org/libs/cmake
Description: CMake helper functions for building robotic applications
Build-Depends: ignition-modularscripts
4 changes: 2 additions & 2 deletions ports/ignition-cmake2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

set(PACKAGE_VERSION "2.2.0")
set(PACKAGE_VERSION "2.5.0")

ignition_modular_library(NAME cmake
VERSION ${PACKAGE_VERSION}
SHA512 079b6d0cc5e2de83cf01f5731dd4e2e55e18e46c7506b6267a19a230fbbaa7b89053be4b42ca21584cf7fdd64de1d6305c7bc16fa3e0c5751b098fd0e5b98149)
SHA512 dc546e5e4deabba12faec5fb0162309dfce9b429a6bbd6637c058acdda3eb4fa1e44e9b71f55603d0cff77550117dafc3fc8475621ede65fa8aa915254beb463)

# Install custom usage
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
2 changes: 1 addition & 1 deletion ports/ignition-math6/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ignition-math6
Version: 6.4.0
Version: 6.6.0
Homepage: https://ignitionrobotics.org/libs/math
Build-Depends: eigen3, ignition-cmake2, ignition-modularscripts
Description: Math API for robotic applications
4 changes: 2 additions & 2 deletions ports/ignition-math6/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

ignition_modular_library(NAME math
VERSION "6.4.0"
SHA512 8a6e672ef6de591d25200f288deaaa16cc43e3c90804ee5ead0f06345036afbfa40acb531eb5b6a1fa80bd34c0c5964662cc0659d8bed2c811ad7c776d6f77cb)
VERSION "6.6.0"
SHA512 1b5f59b45256daa81cbfb7da4727200d0d6cb4a75fbc3b83b512c18ec6307b5bd78b8ee7a84f0f8a8c334717a1480766f62658bd213e9021c09c0ed22caa921d)
4 changes: 2 additions & 2 deletions ports/ignition-msgs5/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ignition-msgs5
Version: 5.1.0
Version: 5.3.0
Port-Version: 1
Build-Depends: ignition-modularscripts, ignition-cmake2, ignition-math6, protobuf, tinyxml2
Description: Middleware protobuf messages for robotics
Supports: !(arm|linux|uwp)
Supports: !(arm|uwp)
6 changes: 3 additions & 3 deletions ports/ignition-msgs5/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Explicitly disable cross-compilation until the upstream discussion
# https://github.com/ignitionrobotics/ign-msgs/issues/34 is solved
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "linux" "uwp")
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")

include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

Expand All @@ -11,8 +11,8 @@ vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin)
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin)

ignition_modular_library(NAME msgs
VERSION "5.1.0"
SHA512 db485f737c465b310602342a1a751c561473e330eb18d1b322b32d13de246536fe6a7efdf245faaaa9be1c9bfce662b2d39d1bb7cffc37e52690893cb47cc2ee
VERSION "5.3.0"
SHA512 55c167d00b60ae6da0144a9495e9ac8aed61fcbdc61e057e75d31261e335c573543d60e28a7dc195a7c9849c5c6eb0e088d4f4e79fd927e83470a3f1fabef60e
PATCHES
"01-protobuf.patch")

Expand Down
5 changes: 5 additions & 0 deletions ports/ignition-msgs6/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: ignition-msgs6
Version: 6.0.0
Build-Depends: ignition-modularscripts, ignition-cmake2, ignition-math6, protobuf, tinyxml2
Description: Middleware protobuf messages for robotics
Supports: !(arm|uwp)
18 changes: 18 additions & 0 deletions ports/ignition-msgs6/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Explicitly disable cross-compilation until the upstream discussion
# https://github.com/ignitionrobotics/ign-msgs/issues/34 is solved
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")

include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

# This port needs to generate protobuf messages with a custom plugin generator,
# so it needs to have in Windows the relative protobuf dll available in the PATH
set(path_backup $ENV{PATH})
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin)
vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin)

Comment on lines +10 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, these are why the ignition things are almost always failing in our CI builds: if the llvm port is installed, then there's a clang.exe here, and cmake thinks you're targeting clang even though that clang.exe is not entirely functional :(

No change requested directly but something you might want to be thinking about. We are investigating fixing the llvm port to not put clang.exe here (although protobuf should not be putting any exes here either)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @BillyONeal, sorry for that, I was not aware of the problem at all, sorry for causing troubles. As the dll need to be found in the path only at the build phase, probably the simplest fix is to put the modification of the path after the configure and before the build, i.e. in

. This could activated with a dedicated option to the ignition_modular_library, or if we don't think there could be downside, we can just do that for all ignition ports, to follow KISS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, note that the workaround of adding those directories to the path is not necessary because protobuf installs some .exe in the ${CURRENT_INSTALLED_DIR}/bin or ${CURRENT_INSTALLED_DIR}/debug/bin . The problem is that ignition-msgs is creating its own protobuf-based code generator using the protoc library provided by protobuf, that is called ign_msgs_gen. As the build executes ign_msgs_gen to generate the code that is necessary to compile as part of the build, if the port is compiled with a shared library triplet such as x64-windows, it needs to be able to find the necessary protobuf.dll and protoc.dll libraries. A more general fix would be to copy the dependent .dll for executables in the build directory as we do for the executables in the build directory as we do for the one in the install directory, or at least just copy the necessary .dll manually in this case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more general fix would be to copy the dependent .dll for executables in the build directory as we do for the executables in the build directory as we do for the one in the install directory

Actually, I checked in https://github.com/microsoft/vcpkg/blob/master/scripts/buildsystems/vcpkg.cmake and it seems that it should be already the case, so perhaps it could be sufficient to try to drop those modification of the PATH.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @BillyONeal, sorry for that, I was not aware of the problem at all, sorry for causing troubles.

Oh, nothing to be sorry about! I just wanted to let you know since you seem to be a contributor who cares about these ports!

ignition_modular_library(NAME msgs
VERSION "6.0.0"
SHA512 d1d6f6602ae33ec95b36c5df7815b06970f349492ef0309d8aacbaf2dca0c3e7314bbd64890a2554485fbd52f148a90b7bf54dceb0b3a1dd40eeb1f5bdb9613c)

# Restore old path
set(ENV{PATH} "${path_backup}")
6 changes: 3 additions & 3 deletions ports/ignition-transport8/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

ignition_modular_library(NAME transport
VERSION "8.0.0"
SHA512 ab1bae994a8676864ceb78b87f2258b8ed22036aed87e815fc22f830edd8b087d1ef0406dc0d053ea823d95b5fb765c4867d27ce5653f1d685001aab0cf0ec03
# This can be removed when the pc file of libuuid on Windows is fixed
VERSION "8.1.0"
SHA512 eb64f18721190fcb79a5b45746fd44fa24274c6fe6c5021dd9306c15a327873377d07d4aa770633982038b84da650d3d0c8a56169222c0c88fa1318314fc4529
# This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 )
DISABLE_PKGCONFIG_INSTALL)
4 changes: 4 additions & 0 deletions ports/ignition-transport9/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: ignition-transport9
Version: 9.0.0
Build-Depends: cppzmq, ignition-cmake2, ignition-msgs6, libuuid (!windows&!uwp), protobuf, sqlite3, zeromq
Description: Transport middleware for robotics
7 changes: 7 additions & 0 deletions ports/ignition-transport9/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)

ignition_modular_library(NAME transport
VERSION "9.0.0"
SHA512 c3edb7a8a063b4aa5826838ae08c8ec2b3d14563492022df632a719409c95272f4f6a43d91f0c317e44b85921b5aedc1685670b81a7baa949f01af3b3534d76e
# This can be removed when the pc file of sqlite3 is available ( https://github.com/microsoft/vcpkg/issues/14327 )
DISABLE_PKGCONFIG_INSTALL)
6 changes: 6 additions & 0 deletions ports/sdformat10/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Source: sdformat10
Version: 10.0.0
Homepage: http://sdformat.org/
Build-Depends: ignition-math6, urdfdom, tinyxml2
Description: Simulation Description Format (SDF) parser and description files.
Supports: !(uwp)
41 changes: 41 additions & 0 deletions ports/sdformat10/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
vcpkg_fail_port_install(ON_TARGET "uwp")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO osrf/sdformat
REF sdformat10_10.0.0
SHA512 1caf98427d25e7c17bfacaab20382c573fac0c965b40ad0c5e0efd32ddfdaa20250d8c79ecf574989ba10b1feb884a9df3927b18ec2cd88f7c66b4d8194bc731
HEAD_REF sdf10
)

# Ruby is required by the sdformat build process
vcpkg_find_acquire_program(RUBY)
get_filename_component(RUBY_PATH ${RUBY} DIRECTORY)
set(_path $ENV{PATH})
vcpkg_add_to_path(${RUBY_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
-DUSE_EXTERNAL_URDF=ON
-DUSE_EXTERNAL_TINYXML=ON
)

vcpkg_install_cmake()

# Restore original path
set(ENV{PATH} ${_path})

# Fix cmake targets and pkg-config file location
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat10")
vcpkg_fixup_pkgconfig()

# Remove debug files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/debug/share)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
1 change: 1 addition & 0 deletions ports/urdfdom-headers/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: urdfdom-headers
Version: 1.0.5
Port-Version: 1
Homepage: https://github.com/ros/urdfdom_headers
Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF.
11 changes: 10 additions & 1 deletion ports/urdfdom-headers/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers)
endif()

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
vcpkg_fixup_pkgconfig()
endif()

# The config files for this project use underscore
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers)
endif()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/)
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
endif()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
2 changes: 1 addition & 1 deletion ports/urdfdom/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: urdfdom
Version: 1.0.4
Port-Version: 2
Port-Version: 3
Homepage: https://github.com/ros/urdfdom
Description: Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file.
Build-Depends: console-bridge, tinyxml, urdfdom-headers
5 changes: 5 additions & 0 deletions ports/urdfdom/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom)
endif()

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
vcpkg_fixup_pkgconfig()
endif()


file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)

Expand Down