# Behaviortree\_ros2 package will not compile

**URL:** <https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681>\
**Category:** Behavior Trees for ROS2\
**Created:** [August 8, 2024, 8:17am UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681 "2024-08-08T08:17:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LenaPanda](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/l/6a8cbe/32.png) [@LenaPanda](https://get-help.theconstruct.ai/u/LenaPanda)\
**Post date:** [August 8, 2024, 8:17am UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/1 "2024-08-08T08:17:28Z")

</div>

I cannot get the package to compile. It always stops somewhere between 65 and 95 % of compiling, even after 20 minutes. I already made a new account to start all over. When it still did not work I also deleted install, log and build folders and tried again but I am always stuck.

![image](https://get-help.theconstruct.ai/uploads/default/original/2X/2/2cad1a10391e2fde712ed12576f5aa0966b3245b.png)

I don’t know how to copy the lines from the terminal but there is no error message, just ongoing compiling with the percentage not rising. Is there something wrong with my folder structure?

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [August 8, 2024, 9:54am UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/2 "2024-08-08T09:54:42Z")

</div>

@LenaPanda  
It would be helpful if you could tell us what unit and section (exercise or example) of the course you are currently working on, so someone can do a quick check.

---

<div class="post-metadata">

**Author:** ![LenaPanda](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/l/6a8cbe/32.png) [@LenaPanda](https://get-help.theconstruct.ai/u/LenaPanda)\
**Post date:** [August 8, 2024, 10:06am UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/3 "2024-08-08T10:06:43Z")

</div>

Sorry, it is right in the beginning. Section 1.2, the first compiling of the behavior tree after cloning it from git.

---

<div class="post-metadata">

**Author:** ![sroyer](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/sroyer/32/8798_2.png) [@sroyer](https://get-help.theconstruct.ai/u/sroyer)\
**Post date:** [August 8, 2024, 12:40pm UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/4 "2024-08-08T12:40:52Z")

</div>

> [@LenaPanda](#):
>
> Section 1.2,

Same for me right now (Stucked at 67% of behaviortree\_ros2 compile, still waiting for complete after 45 minutes)

---

<div class="post-metadata">

**Author:** ![sroyer](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/sroyer/32/8798_2.png) [@sroyer](https://get-help.theconstruct.ai/u/sroyer)\
**Post date:** [August 8, 2024, 12:50pm UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/5 "2024-08-08T12:50:40Z")

</div>

Now having the error message:

```auto
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [CMakeFiles/test_unit3.dir/build.make:63: CMakeFiles/test_unit3.dir/test/test_unit3.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:355: CMakeFiles/test_unit3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [CMakeFiles/solution_test_project.dir/build.make:63: CMakeFiles/solution_test_project.dir/test/solution_test_project.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:187: CMakeFiles/solution_test_project.dir/all] Error 2
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [CMakeFiles/test_unit2.dir/build.make:63: CMakeFiles/test_unit2.dir/test/test_unit2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:160: CMakeFiles/test_unit2.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed <<< behaviortree_ros2 [37min 20s, exited with code 2]

```

---

<div class="post-metadata">

**Author:** ![jpvaldivia7](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/jpvaldivia7/32/8925_2.png) [@jpvaldivia7](https://get-help.theconstruct.ai/u/jpvaldivia7)\
**Post date:** [August 8, 2024, 1:01pm UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/6 "2024-08-08T13:01:07Z")

</div>

Hi LenaPanda and stroyer,  
Thanks for the error message. This error means that there is insufficient RAM memory in the virtual machine. Sometimes you can solve this by compiling package by package with this command:

```auto
colcon build --packages-select <package_name>

```

In this case you can compile “behaviortree\_cpp\_v3”:

```auto
colcon build --packages-select behaviortree_cpp_v3

```

and then “behaviortree\_ros2”:

```auto
colcon build --packages-select behaviortree_ros2

```

However, you are not supposed to use this in the course and it shouldn’t take this large amount of time (I tried and it was the same for me), so we will look inside the course’s files and try to optimize them for a faster compilation.

---

<div class="post-metadata">

**Author:** ![system](https://get-help.theconstruct.ai/uploads/default/original/2X/9/9d3ce8305cc0d0d9b6e07d15767a6f245c526f1b.jpeg) [@system](https://get-help.theconstruct.ai/u/system)\
**Post date:** [August 13, 2024, 1:01pm UTC](https://get-help.theconstruct.ai/t/behaviortree-ros2-package-will-not-compile/31681/7 "2024-08-13T13:01:17Z")

</div>

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