From 9fe5e733ad48b665fef84e2fdcb56bf7bb89810f Mon Sep 17 00:00:00 2001 From: Bernd Gassmann Date: Wed, 16 Jun 2021 17:08:55 +0200 Subject: [PATCH] RSS build uses the libproj version from CARLA and now favours actually the boost variant from CARLA over the system installed one --- LibCarla/cmake/client/CMakeLists.txt | 2 -- PythonAPI/carla/setup.py | 11 ++++++----- Util/BuildTools/Ad-rss.sh | 13 ++++--------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/LibCarla/cmake/client/CMakeLists.txt b/LibCarla/cmake/client/CMakeLists.txt index 25f502735..d1570e3a7 100644 --- a/LibCarla/cmake/client/CMakeLists.txt +++ b/LibCarla/cmake/client/CMakeLists.txt @@ -21,8 +21,6 @@ if (BUILD_RSS_VARIANT) install(FILES ${spdlog_file} DESTINATION lib) list(APPEND ADRSS_LIBS ${spdlog_file}) - install(FILES ${ADRSS_INSTALL_DIR}/PROJ4/lib/libproj.a DESTINATION lib) - foreach(ad_lib ad_physics ad_rss ad_map_access ad_map_opendrive_reader ad_rss_map_integration) set(${ad_lib}_file ${ADRSS_INSTALL_DIR}/${ad_lib}/lib/lib${ad_lib}.a) install(FILES ${${ad_lib}_file} DESTINATION lib) diff --git a/PythonAPI/carla/setup.py b/PythonAPI/carla/setup.py index b132d9dd0..5967d244f 100755 --- a/PythonAPI/carla/setup.py +++ b/PythonAPI/carla/setup.py @@ -52,9 +52,7 @@ def get_libcarla_extensions(): os.path.join(pwd, 'dependencies/lib/libDetour.a'), os.path.join(pwd, 'dependencies/lib/libDetourCrowd.a'), os.path.join(pwd, 'dependencies/lib/libosm2odr.a'), - os.path.join(pwd, 'dependencies/lib/libxerces-c.a'), - os.path.join(pwd, 'dependencies/lib/libproj.a'), - os.path.join(pwd, 'dependencies/lib/libsqlite3.a')] + os.path.join(pwd, 'dependencies/lib/libxerces-c.a')] extra_link_args += ['-lz'] extra_compile_args = [ '-isystem', 'dependencies/include/system', '-fPIC', '-std=c++14', @@ -79,11 +77,14 @@ def get_libcarla_extensions(): extra_link_args += [os.path.join(pwd, 'dependencies/lib/libad_map_opendrive_reader.a')] extra_link_args += [os.path.join(pwd, 'dependencies/lib/libboost_program_options.a')] extra_link_args += [os.path.join(pwd, 'dependencies/lib/libspdlog.a')] - extra_link_args += [os.path.join(pwd, 'dependencies/lib/libproj.a')] extra_link_args += ['-lrt'] extra_link_args += ['-ltbb'] - extra_link_args += [os.path.join(pwd, 'dependencies/lib', pylib)] + # libproj, libsqlite and python libs are also required for rss_variant, therefore + # place them after the rss_variant linked libraries + extra_link_args += [os.path.join(pwd, 'dependencies/lib/libproj.a'), + os.path.join(pwd, 'dependencies/lib/libsqlite3.a'), + os.path.join(pwd, 'dependencies/lib', pylib)] if 'TRAVIS' in os.environ and os.environ['TRAVIS'] == 'true': print('Travis CI build detected: disabling PNG support.') diff --git a/Util/BuildTools/Ad-rss.sh b/Util/BuildTools/Ad-rss.sh index 243b46b9f..5e344861a 100755 --- a/Util/BuildTools/Ad-rss.sh +++ b/Util/BuildTools/Ad-rss.sh @@ -42,7 +42,6 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then pushd "${ADRSS_SRC_DIR}" >/dev/null git clone --depth=1 -b v1.7.0 https://github.com/gabime/spdlog.git - git clone --depth=1 -b 4.9.3 https://github.com/OSGeo/PROJ.git git clone --depth=1 -b v2.3.0 https://github.com/carla-simulator/map.git git clone --depth=1 -b v${ADRSS_VERSION} https://github.com/intel/ad-rss-lib.git popd @@ -50,9 +49,6 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then cat >"${ADRSS_COLCON_WORKSPACE}/colcon.meta" </dev/null if [ "${CMAKE_PREFIX_PATH}" == "" ]; then - export CMAKE_PREFIX_PATH=${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install + CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install;${CARLA_BUILD_FOLDER}/proj-install" else - export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install + CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.72.0-c8-install;${CARLA_BUILD_FOLDER}/proj-install" fi # get the python version of the binding to be built @@ -108,7 +103,7 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do echo "PYTHON_BINDING_VERSIONS=${PYTHON_BINDING_VERSIONS}" # enforce sequential executor to reduce the required memory for compilation - colcon build --executor sequential --packages-up-to ad_rss_map_integration --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE="${CARLA_BUILD_FOLDER}/LibStdCppToolChain.cmake" -DPYTHON_BINDING_VERSIONS="${PYTHON_BINDING_VERSIONS}" --build-base ${ADRSS_BUILD_DIR} --install-base ${ADRSS_INSTALL_DIR} + colcon build --executor sequential --packages-up-to ad_rss_map_integration --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE="${CARLA_BUILD_FOLDER}/LibStdCppToolChain.cmake" -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" -DPYTHON_BINDING_VERSIONS="${PYTHON_BINDING_VERSIONS}" --build-base ${ADRSS_BUILD_DIR} --install-base ${ADRSS_INSTALL_DIR} COLCON_RESULT=$? if (( COLCON_RESULT )); then