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

Updated the build script for DDS #1666

Merged
merged 13 commits into from
Sep 13, 2024
4 changes: 2 additions & 2 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
outputs: type=docker,dest=/tmp/test-image.tar

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-image
path: /tmp/test-image.tar
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
uses: docker/setup-qemu-action@v1

- name: Download artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: test-image
path: /tmp
Expand Down
85 changes: 69 additions & 16 deletions docker/build-ubi/04.install-fastdds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,103 @@

dnf config-manager --set-enabled powertools

yum -y install tinyxml2-devel boost-devel
yum -y install tinyxml2-devel boost-devel yaml-cpp yaml-cpp-devel
yum -y --nogpgcheck install https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/x86_64/os/Packages/a/asio-devel-1.28.1-2.fc39.x86_64.rpm


# Fast-DDS
mkdir /opt/Fast-DDS
cd /opt/Fast-DDS


#
# foonathan_memory_vendor
#
cd /opt/Fast-DDS
git clone https://github.com/eProsima/foonathan_memory_vendor.git
mkdir foonathan_memory_vendor/build
cd foonathan_memory_vendor
git checkout v1.3.1
git checkout master
mkdir build
cd build

cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON
cmake --build . --target install


#
# CDR
# Fast-CDR
#
cd /opt/Fast-DDS
git clone https://github.com/eProsima/Fast-CDR.git
mkdir Fast-CDR/build
cd Fast-CDR
git checkout v2.1.3
git checkout master
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
cmake ..
cmake --build . --target install


#
# RTPS
# Fast-DDS
#
cd /opt/Fast-DDS
git clone https://github.com/eProsima/Fast-DDS.git
cd Fast-DDS
git checkout v2.13.3
git checkout master
mkdir build
cd build

## Prevent glibc bug: https://stackoverflow.com/questions/30680550/c-gettid-was-not-declared-in-this-scope
file_bug="/opt/Fast-DDS/Fast-DDS/src/cpp/utils/threading/threading_pthread.ipp"
nl=$(grep -n "namespace eprosima" $file_bug | awk -F':' '{print $1 ; exit 0}')
sed -i "${nl}i #include <unistd.h>\n#include <sys/syscall.h>\n#define gettid() syscall(SYS_gettid)\n" $file_bug
# Seems to be fixed already manually by eProsima
# file_bug="/opt/Fast-DDS/Fast-DDS/src/cpp/utils/threading/threading_pthread.ipp"
# nl=$(grep -n "namespace eprosima" $file_bug | awk -F':' '{print $1 ; exit 0}')
# sed -i "${nl}i #include <unistd.h>\n#include <sys/syscall.h>\n#define gettid() syscall(SYS_gettid)\n" $file_bug

cmake ..
cmake --build . --target install


#
# DDS Dev Utils (2 packages in one)
#
cd /opt/Fast-DDS
git clone https://github.com/eProsima/dev-utils.git
cd dev-utils
git checkout main

mkdir -p build/cmake_utils
cd build/cmake_utils
cmake ../../cmake_utils
cmake --build . --target install

cd -
mkdir -p build/cpp_utils
cd build/cpp_utils
cmake ../../cpp_utils
cmake --build . --target install


#
# DDS Pipe (3 packages in one)
#
cd /opt/Fast-DDS
git clone https://github.com/eProsima/DDS-Pipe.git
cd DDS-Pipe
git checkout main


cd ddspipe_core
mkdir build
cd build
cmake ..
cmake --build . --target install

cd ../../ddspipe_participants
mkdir build
cd build
cmake ..
cmake --build . --target install

cd ../../ddspipe_yaml
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ -DBUILD_SHARED_LIBS=ON
cmake ..
cmake --build . --target install
Loading