# Error While building DDS Agent

**URL:** <https://discuss.px4.io/t/error-while-building-dds-agent/47446>\
**Category:** ROS 1 / ROS 2\
**Created:** [September 17, 2025, 2:10pm UTC](https://discuss.px4.io/t/error-while-building-dds-agent/47446 "2025-09-17T14:10:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhowmiktanumaya](https://discuss.px4.io/user_avatar/discuss.px4.io/bhowmiktanumaya/32/19169_2.png) [@bhowmiktanumaya](https://discuss.px4.io/u/bhowmiktanumaya)\
**Post date:** [September 17, 2025, 2:10pm UTC](https://discuss.px4.io/t/error-while-building-dds-agent/47446/1 "2025-09-17T14:10:58Z")

</div>

I am following the [PX4 ROS2 User Guide](https://docs.px4.io/main/en/ros2/user_guide#setup-the-agent) and running `make` on `git clone -b v2.4.2 https://github.com/eProsima/Micro-XRCE-DDS-Agent.git`

I am encountering a Git reference problem

```auto
[41%] Performing test step for 'fastcdr'
[44%] Completed 'fastcdr'
[50%] Built target fastcdr
[52%] Performing download step (git clone) for 'fastdds'
Cloning into 'fastdds'...
fatal: invalid reference: 2.12.x
CMake Error at /home/../Micro-XRCE-DDS-Agent/build/fastdds/tmp/fastdds-gitclone.cmake:40 (message):
  Failed to checkout tag: '2.12.x'

make[2]: [CMakeFiles/fastdds.dir/build.make:101: fastdds/src/fastdds-stamp/fastdds-download] Error 1
make[1]: [CMakeFiles/Makefile2:141: CMakeFiles/fastdds.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

```

Looks like the build system is trying to checkout a Git branch/tag `2.12.x` that doesn’t exist in the FastDDS repository?

Anyone else encounter any errors when building the agent?

---

<div class="post-metadata">

**Author:** ![bhowmiktanumaya](https://discuss.px4.io/user_avatar/discuss.px4.io/bhowmiktanumaya/32/19169_2.png) [@bhowmiktanumaya](https://discuss.px4.io/u/bhowmiktanumaya)\
**Post date:** [September 21, 2025, 8:54pm UTC](https://discuss.px4.io/t/error-while-building-dds-agent/47446/2 "2025-09-21T20:54:06Z")

</div>

Idk if this is a good solution but this works

> [@About Micro-XRCE-DDS-Agent version](https://discuss.px4.io/t/about-micro-xrce-dds-agent-version/47344/5):
>
> Me too. You may try the following commands. cd Micro-XRCE-DDS-Agent/build sed -i 's/checkout 2\.12\.x --/checkout v2.12.1 --/' ./fastdds/tmp/fastdds-gitclone.cmake

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [September 28, 2025, 8:54pm UTC](https://discuss.px4.io/t/error-while-building-dds-agent/47446/3 "2025-09-28T20:54:53Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
