Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ jobs:
- name: Install clang/gcc
if: runner.os == 'Linux'
env:
CLANG_VER: 12
GCC_VER: 9
CLANG_VER: 14
GCC_VER: 11
run: |
sudo apt-get install -y clang-${{ env.CLANG_VER }} gcc-${{ env.GCC_VER }} g++-${{ env.GCC_VER }}
sudo apt-get install -y clang-${{ env.CLANG_VER }} clang++-${{ env.CLANG_VER }} gcc-${{ env.GCC_VER }} g++-${{ env.GCC_VER }}
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 10
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ env.CLANG_VER }} 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 10
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 3p-package-source repo

This is where the "sources" (ie, build scripts which make packages) for the O3DE package system are located.
This is where the "sources" (i.e., build scripts which make packages) for the O3DE package system are located.

Note that the "sources" of most packages are not actually stored here, most "package sources" actually just consist of a script which fetches the source code (or prebuilt packages) from somewhere else, constructs a temporary folder image for it, and then lets the package system pack that folder up as the package.

Expand Down
24 changes: 11 additions & 13 deletions package-system/sdformat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
# Therefore it is better to not declare ARG instructions that are not used as part for the FROM instruction
# until after it
# https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
# The cpu architecture to base the docker base script from
ARG INPUT_ARCHITECTURE=amd64

# The root to base the docker script base from
ARG INPUT_IMAGE=ubuntu:20.04
ARG INPUT_IMAGE=ubuntu:22.04

FROM ${INPUT_ARCHITECTURE}/${INPUT_IMAGE}
FROM ${INPUT_IMAGE}

# NOTE: Now it is safe to declare ARG instructions that are used in the build stage
# of the image
Expand All @@ -31,13 +28,13 @@ ARG INPUT_DOCKER_BUILD_SCRIPT=docker_build_sdformat.sh
ARG INPUT_DEPENDENT_PACKAGE_FOLDERS

# Set the github tag for gz-cmake
ARG INPUT_DEP_GZ_CMAKE_GIT_TAG=gz-cmake3_3.3.0
ARG INPUT_DEP_TINYXML2_GIT_TAG=9.0.0
# Pinning to the gz-math7 release which libsdformat has a dependency on
ARG INPUT_DEP_GZ_MATH_GIT_TAG=gz-math7_7.2.0
# Pinning to the gz-utils2 to the last release in September 2022
# The libsdformat has an explicit dependency on gz-utils2
ARG INPUT_DEP_GZ_UTILS_GIT_TAG=gz-utils2_2.0.0
ARG INPUT_DEP_GZ_CMAKE_GIT_TAG=gz-cmake5_5.0.2
ARG INPUT_DEP_TINYXML2_GIT_TAG=11.0.0
# Pinning to the gz-math9 release which libsdformat has a dependency on
ARG INPUT_DEP_GZ_MATH_GIT_TAG=gz-math9_9.0.0
# Pinning to the gz-utils4 to the last release in September 2022
# The libsdformat has an explicit dependency on gz-utils4
ARG INPUT_DEP_GZ_UTILS_GIT_TAG=gz-utils4_4.0.0


# Get access to the user ID and group ID of the user running the docker
Expand Down Expand Up @@ -77,7 +74,8 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-
RUN apt-get install -y build-essential \
cmake \
git \
ruby
ruby \
python3


# Add a user called "user" that will be used inside the docker
Expand Down
32 changes: 16 additions & 16 deletions package-system/sdformat/Findsdformat.cmake.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#

set(LIB_NAME "sdformat")
set(LIB_VERSION_FULL 13.5.0)
set(LIB_VERSION_MAJOR 13)
set(LIB_VERSION_FULL 16.0.1)
set(LIB_VERSION_MAJOR 16)

set(SDFORMAT_O3DE_NAMESPACE "3rdParty::$${LIB_NAME}")
if (TARGET $${SDFORMAT_O3DE_NAMESPACE})
Expand All @@ -27,7 +27,7 @@ set($${LIB_NAME}_INCLUDE_DIR_ROOT $${CMAKE_CURRENT_LIST_DIR}/$${LIB_NAME}/includ
set($${LIB_NAME}_INCLUDE_DIRECTORIES $${$${LIB_NAME}_INCLUDE_DIR_ROOT}
$${$${LIB_NAME}_INCLUDE_DIR_ROOT}/gz/$${LIB_NAME}$${LIB_VERSION_MAJOR})
set($${LIB_NAME}_LIBS_DIR $${CMAKE_CURRENT_LIST_DIR}/$${LIB_NAME}/lib)
set($${LIB_NAME}_LIBRARY_RELEASE $${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${LIB_VERSION_MAJOR}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${LIB_VERSION_FULL})
set($${LIB_NAME}_LIBRARY_RELEASE $${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${LIB_VERSION_FULL})
# The path to the dbg symbol file
set($${LIB_NAME}_LIBRARY_RELEASE_DBG "$${$${LIB_NAME}_LIBRARY_RELEASE}.dbg")

Expand All @@ -51,8 +51,8 @@ set_target_properties($${SDFORMAT_O3DE_NAMESPACE} PROPERTIES
if (COMMAND ly_add_target_files)
ly_add_target_files(TARGETS $${SDFORMAT_O3DE_NAMESPACE}
FILES
"$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${LIB_VERSION_MAJOR}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${LIB_VERSION_MAJOR}"
"$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${LIB_VERSION_MAJOR}$${CMAKE_SHARED_LIBRARY_SUFFIX}"
"$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${LIB_VERSION_MAJOR}"
"$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${LIB_NAME}$${CMAKE_SHARED_LIBRARY_SUFFIX}"
# Copy the debug symbol .dbg into the binary directory as well
"$${$${LIB_NAME}_LIBRARY_RELEASE_DBG}"
)
Expand Down Expand Up @@ -82,10 +82,10 @@ set_target_properties($${tinyxml2_target_namespace} PROPERTIES
IMPORTED_LOCATION $${tinyxml2_lib_release})

# Add the gz-utils dependency
set(gz_utils_raw_name "utils2")
set(gz_utils_version_full "2.0.0")
set(gz_utils_version_major "2")
set(gz_utils_libname "gz-$${gz_utils_raw_name}")
set(gz_utils_raw_name "utils4")
set(gz_utils_version_full "4.0.0")
set(gz_utils_version_major "4")
set(gz_utils_libname "gz-utils")
set(gz_utils_include_directories "$${$${LIB_NAME}_INCLUDE_DIR_ROOT}/gz/$${gz_utils_raw_name}")
# gz-utils is built as a SHARED library
set(gz_utils_lib_release "$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${gz_utils_libname}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${gz_utils_version_full}")
Expand All @@ -104,7 +104,7 @@ else()
INTERFACE $${gz_utils_include_directories})
endif()

# Associate the libgz-utils2.so file with the library location
# Associate the libgz-utils4.so file with the library location
set_target_properties($${gz_utils_target_namespace} PROPERTIES
IMPORTED_LOCATION $${gz_utils_lib_release})

Expand All @@ -118,10 +118,10 @@ if (COMMAND ly_add_target_files)
endif()

# Add the gz-math dependency
set(gz_math_raw_name "math7")
set(gz_math_version_full "7.2.0")
set(gz_math_version_major "7")
set(gz_math_libname "gz-$${gz_math_raw_name}")
set(gz_math_raw_name "math9")
set(gz_math_version_full "9.0.0")
set(gz_math_version_major "9")
set(gz_math_libname "gz-math")
set(gz_math_include_directories "$${$${LIB_NAME}_INCLUDE_DIR_ROOT}/gz/$${gz_math_raw_name}")
# gz-math is built as a SHARED library
set(gz_math_lib_release "$${$${LIB_NAME}_LIBS_DIR}/$${CMAKE_SHARED_LIBRARY_PREFIX}$${gz_math_libname}$${CMAKE_SHARED_LIBRARY_SUFFIX}.$${gz_math_version_full}")
Expand All @@ -140,7 +140,7 @@ else()
INTERFACE $${gz_math_include_directories})
endif()

# Associate the libgz-math2.so file with the library location
# Associate the libgz-math9.so file with the library location
set_target_properties($${gz_math_target_namespace} PROPERTIES
IMPORTED_LOCATION $${gz_math_lib_release})

Expand All @@ -156,7 +156,7 @@ endif()
# Add the dependent libraries as target_link_libraries
target_link_libraries($${SDFORMAT_O3DE_NAMESPACE}
INTERFACE
$${tinyxml_target_namespace}
$${tinyxml2_target_namespace}
$${gz_utils_target_namespace}
$${gz_math_target_namespace})

Expand Down
15 changes: 7 additions & 8 deletions package-system/sdformat/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ CURRENT_HOST_ARCH=$(uname -m)
TARGET_ARCH=${1:-$(uname -m)}

# Get the base docker image name
DOCKER_IMAGE_NAME_BASE=${2:-sdformat13}
DOCKER_IMAGE_NAME_BASE=${2:-sdformat16}

# Get the ubuntu base version (20.04|22.04)
# Default to Ubuntu 20.04
UBUNTU_BASE=${3:-20.04}
# Get the ubuntu base version (22.04 or 24.04)
# Default to Ubuntu 22.04
UBUNTU_BASE=${3:-22.04}

echo "Executing docker-based build from the following arguments"
echo " DOCKER_IMAGE_NAME_BASE=${DOCKER_IMAGE_NAME_BASE}"
Expand Down Expand Up @@ -91,8 +91,8 @@ elif [ "${TARGET_ARCH}" = "aarch64" ]
then
echo "Processing Docker for aarch64"

DOCKER_INPUT_ARCHITECTURE=arm64v8
TARGET_DOCKER_PLATFORM_ARG=linux/arm64/v8
DOCKER_INPUT_ARCHITECTURE=arm64
TARGET_DOCKER_PLATFORM_ARG=linux/arm64

else
echo "Unsupported architecture ${TARGET_ARCH}"
Expand All @@ -113,8 +113,7 @@ echo DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME}

echo -e "Building the docker build script for ${DOCKER_IMAGE_NAME_BASE} on ${DOCKER_INPUT_ARCHITECTURE} for Ubuntu $1\n"
CMD_DOCKER_BUILD="\
docker build --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT}\
--build-arg INPUT_ARCHITECTURE=${DOCKER_INPUT_ARCHITECTURE}\
docker build --platform ${TARGET_DOCKER_PLATFORM_ARG} --build-arg INPUT_DOCKER_BUILD_SCRIPT=${DOCKER_BUILD_SCRIPT}\
--build-arg INPUT_IMAGE=ubuntu:${UBUNTU_BASE}\
--build-arg INPUT_DEPENDENT_PACKAGE_FOLDERS=${DOWNLOADED_PACKAGE_FOLDERS}\
--build-arg USER_ID=$(id -u)\
Expand Down
Empty file modified package-system/sdformat/build-ubuntu.sh
100644 → 100755
Empty file.
40 changes: 20 additions & 20 deletions package-system/sdformat/build_config.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"git_url":"https://github.com/gazebosim/sdformat.git",
"git_tag":"sdformat13_13.5.0",
"package_name":"sdformat",
"package_version":"13.5.0-rev2",
"package_url":"https://github.com/gazebosim/sdformat.git",
"package_license":"Apache-2.0",
"package_license_file":"LICENSE",
"git_url": "https://github.com/gazebosim/sdformat.git",
"git_tag": "sdformat16_16.0.1",
"package_name": "sdformat",
"package_version": "16.0.1-rev1",
"package_url": "https://github.com/gazebosim/sdformat.git",
"package_license": "Apache-2.0",
"package_license_file": "LICENSE",
"patch_file": "fortify.patch",
"cmake_find_target":"Findsdformat.cmake",
"Platforms":{
"Linux":{
"Linux":{
"cmake_find_template":"Findsdformat.cmake.template",
"cmake_find_target": "Findsdformat.cmake",
"Platforms": {
"Linux": {
"Linux": {
"cmake_find_template": "Findsdformat.cmake.template",
"custom_build_cmd": [
"./build-host-os.sh",
"x86_64",
"sdformat13",
"20.04"
"sdformat16",
"22.04"
],
"custom_install_cmd": [
"./install-linux.sh",
"install"
],
"custom_test_cmd" : [
"custom_test_cmd": [
"./test-linux.sh",
"x86_64"
]
},
"Linux-aarch64":{
"cmake_find_template":"Findsdformat.cmake.template",
"Linux-aarch64": {
"cmake_find_template": "Findsdformat.cmake.template",
"custom_build_cmd": [
"./build-host-os.sh",
"aarch64",
"sdformat13",
"20.04"
"sdformat16",
"22.04"
],
"custom_install_cmd": [
"./install-linux.sh",
"install"
],
"custom_test_cmd" : [
"custom_test_cmd": [
"./test-linux.sh",
"aarch64"
]
Expand Down
18 changes: 9 additions & 9 deletions package-system/sdformat/docker_build_sdformat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ DEP_INSTALL_PATHS+=( $GZ_UTILS_INSTALL_FOLDER )
pushd $GZ_UTILS_SRC_FOLDER

echo "Configuring $DEP_NAME"
CMD=(cmake -B ${GZ_UTILS_BUILD_FOLDER} -S. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${GZ_UTILS_INSTALL_FOLDER} -DBUILD_TESTING=OFF)
CMD=(cmake -B ${GZ_UTILS_BUILD_FOLDER} -S. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${GZ_UTILS_INSTALL_FOLDER} -DBUILD_TESTING=OFF -DGZ_UTILS_VENDOR_CLI11=ON -DSKIP_log=ON)
CMD+=(-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE -DCMAKE_INSTALL_RPATH=\$ORIGIN)
echo "${CMD[@]}"
"${CMD[@]}"
Expand Down Expand Up @@ -149,7 +149,7 @@ DEP_INSTALL_PATHS+=( $GZ_MATH_INSTALL_FOLDER )
pushd $GZ_MATH_SRC_FOLDER

echo "Configuring $DEP_NAME"
CMD=(cmake -B ${GZ_MATH_BUILD_FOLDER} -S. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${GZ_MATH_INSTALL_FOLDER} -DSKIP_SWIG=ON -DSKIP_PYBIND11=ON -DBUILD_TESTING=OFF)
CMD=(cmake -B ${GZ_MATH_BUILD_FOLDER} -S. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${GZ_MATH_INSTALL_FOLDER} -DSKIP_SWIG=ON -DSKIP_PYBIND11=ON -DBUILD_TESTING=OFF -DSKIP_eigen3=ON)
CMD+=(-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE -DCMAKE_INSTALL_RPATH=\$ORIGIN)
echo "${CMD[@]}"
"${CMD[@]}"
Expand Down Expand Up @@ -190,7 +190,7 @@ fi
# instead of relying on an externally-installed package.
# This keeps the dependencies self-contained.
echo "Configuring ${LIB_NAME}"
CMD=(cmake -B ${BUILD_FOLDER} -S. -DUSE_INTERNAL_URDF=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_FOLDER} -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH}\")
CMD=(cmake -B ${BUILD_FOLDER} -S. -DUSE_INTERNAL_URDF=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_FOLDER} -DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH}\" -DSKIP_PYBIND11=ON)
# Update the RPATH to $ORIGIN to allow sdformat library to find the dependent libgz-utils/gz-math.so files on Linux
CMD+=(-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE -DCMAKE_INSTALL_RPATH=\$ORIGIN)
echo "${CMD[@]}"
Expand Down Expand Up @@ -219,8 +219,8 @@ popd

# Finally detach the debug symbols to a separate dbg file for sdformat
echo "Detaching debug symbols for ${LIB_NAME}"
SDFORMAT_VERSION=13.5.0
LIB_FILENAME="lib${LIB_NAME}13.so.${SDFORMAT_VERSION}"
SDFORMAT_VERSION=16.0.1
LIB_FILENAME="lib${LIB_NAME}.so.${SDFORMAT_VERSION}"
LIB_DIRECTORY="${INSTALL_FOLDER}/lib"
LIB_PATH="${LIB_DIRECTORY}/${LIB_FILENAME}"
CMD="objcopy --only-keep-debug ${LIB_PATH} ${LIB_PATH}.dbg"
Expand Down Expand Up @@ -255,9 +255,9 @@ fi
popd

# Detach the debug symbols to a separate dbg file for gz-math
DEP_NAME=gz-math7
DEP_NAME=gz-math
echo "Detaching debug symbols for ${DEP_NAME}"
GZ_MATH_VERSION=7.2.0
GZ_MATH_VERSION=9.0.0
LIB_FILENAME="lib${DEP_NAME}.so.${GZ_MATH_VERSION}"
LIB_DIRECTORY="${GZ_MATH_INSTALL_FOLDER}/lib"
LIB_PATH="${LIB_DIRECTORY}/${LIB_FILENAME}"
Expand Down Expand Up @@ -293,9 +293,9 @@ fi
popd

# Detach the debug symbols to a separate dbg file for gz-utils
DEP_NAME=gz-utils2
DEP_NAME=gz-utils
echo "Detaching debug symbols for ${DEP_NAME}"
GZ_UTILS_VERSION=2.0.0
GZ_UTILS_VERSION=4.0.0
LIB_FILENAME="lib${DEP_NAME}.so.${GZ_UTILS_VERSION}"
LIB_DIRECTORY="${GZ_UTILS_INSTALL_FOLDER}/lib"
LIB_PATH="${LIB_DIRECTORY}/${LIB_FILENAME}"
Expand Down
25 changes: 14 additions & 11 deletions package-system/sdformat/fortify.patch
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
diff --git a/src/Camera.cc b/src/Camera.cc
index c41850a0..4f9a199b 100644
index 3d7cd39c..8d33e1d6 100644
--- a/src/Camera.cc
+++ b/src/Camera.cc
@@ -1144,7 +1144,7 @@ void Camera::SetLensIntrinsicsSkew(double _s)
@@ -1123,9 +1123,9 @@ void Camera::SetLensIntrinsicsSkew(double _s)
/////////////////////////////////////////////////
std::string Camera::ConvertPixelFormat(PixelFormatType _type)
{
- unsigned int index = static_cast<int>(_type);
+ unsigned int index = static_cast<unsigned int>(_type);
if (index < kPixelFormatNames.size())
return kPixelFormatNames[static_cast<int>(_type)];
- return std::string(kPixelFormatNames[static_cast<int>(_type)]);
+ return std::string(kPixelFormatNames[index]);

return std::string(kPixelFormatNames[0]);
}
diff --git a/src/ParticleEmitter.cc b/src/ParticleEmitter.cc
index 347df7f4..e10624c7 100644
index b0d07a20..dbb21788 100644
--- a/src/ParticleEmitter.cc
+++ b/src/ParticleEmitter.cc
@@ -265,7 +265,7 @@ bool ParticleEmitter::SetType(const std::string &_typeStr)
@@ -267,7 +267,7 @@ bool ParticleEmitter::SetType(const std::string &_typeStr)
/////////////////////////////////////////////////
std::string ParticleEmitter::TypeStr() const
{
- size_t index = static_cast<int>(this->dataPtr->type);
+ size_t index = static_cast<size_t>(this->dataPtr->type);
if (index < emitterTypeStrs.size())
return emitterTypeStrs[index];
if (index < kEmitterTypeStrs.size())
return std::string(kEmitterTypeStrs[index]);
return "point";
diff --git a/src/Sensor.cc b/src/Sensor.cc
index 6c6dde9d..324a3422 100644
index 8f3b1205..86d708e4 100644
--- a/src/Sensor.cc
+++ b/src/Sensor.cc
@@ -644,7 +644,7 @@ void Sensor::SetUpdateRate(double _hz)
@@ -663,7 +663,7 @@ void Sensor::SetUpdateRate(double _hz)
/////////////////////////////////////////////////
std::string Sensor::TypeStr() const
{
- size_t index = static_cast<int>(this->dataPtr->type);
+ size_t index = static_cast<size_t>(this->dataPtr->type);
if (index > 0 && index < sensorTypeStrs.size())
return sensorTypeStrs[index];
if (index > 0 && index < kSensorTypeStrs.size())
return std::string(kSensorTypeStrs[index]);
return "none";
2 changes: 1 addition & 1 deletion package-system/sdformat/test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


# The expected SDF Version
EXPECTED_SDF_VERSION="13.5.0"
EXPECTED_SDF_VERSION="16.0.1"

# Reset any existing test folder
rm -rf temp/build_test
Expand Down
Loading
Loading