Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I came across the sameenter code here issue today, and after digging up a little, I was able to solve this by using the --symlink-install flag.

How to reproduce the solution:

mkdir -p test_ws/src
cd test_ws/src
ros2 pkg create --build-type ament_python foo
cd ../
colcon build

This obviously builds fine.

Now :

rm -rf build install log
mv src/foo ..
ln -s $(pwd)/../foo src/foo
colcon build

This fails.

But now

rm -rf build install log
colcon build --symlink-install

should build successfully.

I came across the sameenter code here same issue today, and after digging up a little, I was able to solve this by using the --symlink-install flag.

How to reproduce the solution:

mkdir -p test_ws/src
cd test_ws/src
ros2 pkg create --build-type ament_python foo
cd ../
colcon build

This obviously builds fine.

Now :

rm -rf build install log
mv src/foo ..
ln -s $(pwd)/../foo src/foo
colcon build

This fails.

But now

rm -rf build install log
colcon build --symlink-install

should build successfully. successfully.