Skip to content

Commit

Permalink
[misc] Update all c++ dependencies. (#631)
Browse files Browse the repository at this point in the history
* [gym_jiminy/envs] Use Mahony exact init by default.
* [gym_jiminy/rllib] Fix custom config handling.
* [misc] Update all c++ dependencies.
* [misc] Move Eigen to C++17.

---------

Co-authored-by: Alexis Duburcq <alexis.duburcq@wandercraft.eu>
  • Loading branch information
duburcqa and Alexis Duburcq committed Aug 14, 2023
1 parent d99144c commit 90ad70d
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 480 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

env:
TORCH_VERSION: "2.0.1+cpu"
CMAKE_CXX_FLAGS: "-DEIGEN_MAX_CPP_VER=11 -march=x86-64-v3 -mtune=generic"
CMAKE_CXX_FLAGS: "-march=x86-64-v3 -mtune=generic"

#####################################################################################

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

env:
TORCH_VERSION: "2.0.1"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY -DEIGEN_MAX_CPP_VER=11"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY"
BUILD_TYPE: "Release"
MACOSX_DEPLOYMENT_TARGET: "10.15"
OSX_ARCHITECTURES: "x86_64;arm64"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

env:
BUILD_TYPE: "Release"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY -DEIGEN_MAX_CPP_VER=11"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY"

#####################################################################################

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
TORCH_VERSION: "2.0.1+cpu"
BUILD_TYPE: "Release"
GENERATOR: "Visual Studio 17 2022"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY -DEIGEN_MAX_CPP_VER=11 /d2ReducedOptimizeHugeFunctions /fp:contract /arch:AVX2"
CMAKE_CXX_FLAGS: "-DEIGEN_MPL2_ONLY /d2ReducedOptimizeHugeFunctions /fp:contract /arch:AVX2"

strategy:
matrix:
Expand Down
6 changes: 3 additions & 3 deletions build_tools/build_install_deps_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fi
cd "$RootDir/eigenpy"
git reset --hard
git fetch --all || true
git checkout --force "v2.9.2"
git checkout --force "v3.1.1"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_unix/eigenpy.patch"
Expand Down Expand Up @@ -160,7 +160,7 @@ fi
cd "$RootDir/hpp-fcl"
git reset --hard
git fetch --all || true
git checkout --force "v2.3.0"
git checkout --force "v2.3.5"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_unix/hppfcl.patch"
Expand All @@ -175,7 +175,7 @@ fi
cd "$RootDir/pinocchio"
git reset --hard
git fetch --all || true
git checkout --force "v2.6.17"
git checkout --force "v2.6.20"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
git apply --reject --whitespace=fix "$RootDir/build_tools/patch_deps_unix/pinocchio.patch"
Expand Down
6 changes: 3 additions & 3 deletions build_tools/build_install_deps_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if (-not (Test-Path -PathType Container "$RootDir/eigenpy")) {
Set-Location -Path "$RootDir/eigenpy"
git reset --hard
git fetch --all
git checkout --force "v2.9.2"
git checkout --force "v3.1.1"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
dos2unix "$RootDir/build_tools/patch_deps_windows/eigenpy.patch"
Expand Down Expand Up @@ -144,7 +144,7 @@ if (-not (Test-Path -PathType Container "$RootDir/hpp-fcl")) {
Set-Location -Path "$RootDir/hpp-fcl"
git reset --hard
git fetch --all
git checkout --force "v2.3.0"
git checkout --force "v2.3.5"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
dos2unix "$RootDir/build_tools/patch_deps_windows/hppfcl.patch"
Expand All @@ -160,7 +160,7 @@ if (-not (Test-Path -PathType Container "$RootDir/pinocchio")) {
Set-Location -Path "$RootDir/pinocchio"
git reset --hard
git fetch --all
git checkout --force "v2.6.17"
git checkout --force "v2.6.20"
git submodule --quiet foreach --recursive git reset --quiet --hard
git submodule --quiet update --init --recursive --jobs 8
dos2unix "$RootDir/build_tools/patch_deps_windows/pinocchio.patch"
Expand Down
4 changes: 2 additions & 2 deletions build_tools/easy_install_deps_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ fi
# Note that `apt-get` is used instead of `apt` because it supports wildcard in package names
apt-mark unhold "robotpkg-py3*-eigenpy" "robotpkg-py3*-hpp-fcl" "robotpkg-py3*-pinocchio"
apt-get install -y --allow-downgrades --allow-unauthenticated \
robotpkg-urdfdom-headers=1.0.4 robotpkg-hpp-fcl=2.3.0 robotpkg-pinocchio=2.6.17 \
robotpkg-py3*-eigenpy=2.9.2 robotpkg-py3*-hpp-fcl=2.3.0 robotpkg-py3*-pinocchio=2.6.17
robotpkg-urdfdom-headers=1.0.4 robotpkg-hpp-fcl=2.3.5 robotpkg-pinocchio=2.6.20 \
robotpkg-py3*-eigenpy=3.1.1 robotpkg-py3*-hpp-fcl=2.3.5 robotpkg-py3*-pinocchio=2.6.20
apt-mark hold "robotpkg-py3*-eigenpy" "robotpkg-py3*-hpp-fcl" "robotpkg-py3*-pinocchio"

# Add openrobots libraries to python packages search path
Expand Down
8 changes: 3 additions & 5 deletions build_tools/patch_deps_unix/eigenpy.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -202,7 +202,10 @@
src/std-vector.cpp
src/version.cpp)
@@ -210,6 +210,9 @@

-add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
+add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES}
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
+if(APPLE)
+ set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
+endif(APPLE)
target_include_directories(
${PROJECT_NAME} SYSTEM
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
diff --git a/cmake/boost.cmake b/cmake/boost.cmake
--- a/cmake/boost.cmake
+++ b/cmake/boost.cmake
Expand Down
42 changes: 12 additions & 30 deletions build_tools/patch_deps_unix/hppfcl.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,40 +94,31 @@
@@ -107,48 +107,39 @@
#ENDIF(WIN32)

ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES "eigen3 >= 3.0.0")
Expand All @@ -28,6 +28,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
+ ADD_PROJECT_DEPENDENCY(Boost REQUIRED chrono serialization)
+ENDIF(WIN32)

if(Boost_VERSION_STRING VERSION_LESS 1.81)
# Default C++ version should be C++11
CHECK_MINIMAL_CXX_STANDARD(11 ENFORCE)
else()
# Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)
CHECK_MINIMAL_CXX_STANDARD(14 ENFORCE)
endif()

# Optional dependencies
-ADD_PROJECT_DEPENDENCY(octomap PKG_CONFIG_REQUIRES "octomap >= 1.6")
-if(octomap_FOUND)
Expand All @@ -51,7 +59,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
if(Qhull_FOUND)
set(HPP_FCL_USE_SYSTEM_QHULL TRUE)
else()
@@ -262,7 +253,6 @@
@@ -283,7 +274,6 @@
include/hpp/fcl/timings.h
)

Expand All @@ -62,23 +70,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -168,7 +168,6 @@
LIST(APPEND PROJECT_HEADERS_FULL_PATH ${PROJECT_BINARY_DIR}/include/hpp/fcl/deprecated.hh)
LIST(APPEND PROJECT_HEADERS_FULL_PATH ${PROJECT_BINARY_DIR}/include/hpp/fcl/warning.hh)
add_library(${LIBRARY_NAME}
- SHARED
${PROJECT_HEADERS_FULL_PATH}
${${LIBRARY_NAME}_SOURCES}
)
@@ -179,6 +178,7 @@
@@ -179,6 +179,7 @@
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
ADD_HEADER_GROUP(PROJECT_HEADERS_FULL_PATH)

+ADD_PROJECT_DEPENDENCY(assimp REQUIRED)
MODERNIZE_TARGET_LINK_LIBRARIES(${LIBRARY_NAME} SCOPE PRIVATE
TARGETS assimp::assimp
LIBRARIES ${assimp_LIBRARIES}
@@ -201,7 +201,7 @@
@@ -202,7 +202,7 @@
if(HPP_FCL_HAS_QHULL)
target_compile_definitions(${LIBRARY_NAME} PRIVATE -DHPP_FCL_HAS_QHULL)
if (HPP_FCL_USE_SYSTEM_QHULL)
Expand All @@ -101,24 +101,6 @@ diff --git a/cmake/boost.cmake b/cmake/boost.cmake
string(TOUPPER ${BOOST_PYTHON_NAME} UPPERCOMPONENT)

list(APPEND LOGGING_WATCHED_VARIABLES Boost_${UPPERCOMPONENT}_FOUND
@@ -192,7 +195,6 @@
string(REPLACE "_" "." Boost_SHORT_VERSION ${Boost_LIB_VERSION})
if("${Boost_SHORT_VERSION}" VERSION_GREATER "1.70" OR "${Boost_SHORT_VERSION}"
VERSION_EQUAL "1.70")
- set(BUILD_SHARED_LIBS ON)
set(Boost_NO_BOOST_CMAKE ON)
endif("${Boost_SHORT_VERSION}" VERSION_GREATER "1.70"
OR "${Boost_SHORT_VERSION}" VERSION_EQUAL "1.70")
@@ -289,6 +288,9 @@
${target} ${PUBLIC_KEYWORD}
Boost::python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})

+ if(APPLE)
+ target_link_options(${target} INTERFACE -undefined dynamic_lookup)
+ endif(APPLE)
else()

if(APPLE)
diff --git a/cmake/python.cmake b/cmake/python.cmake
--- a/cmake/python.cmake
+++ b/cmake/python.cmake
Expand Down
Loading

0 comments on commit 90ad70d

Please sign in to comment.