catkin / catkin_tools

Command line tools for working with catkin
Apache License 2.0
163 stars 146 forks source link

Migrate to noetic #717

Closed MatthijsBurgh closed 2 years ago

MatthijsBurgh commented 2 years ago

Test against noetic-devel branch of catkin for Ubuntu 20.04 Migrate docs to noetic

MatthijsBurgh commented 2 years ago

test_install_cmake and test_install_cmake_destdir are the test that are failing.

output of test_install_cmake_destdir:

Starting >> app_pkg:make
Subprocess > app_pkg:make `cd /tmp/byblhgc_/build/app_pkg; catkin build --get-env app_pkg | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -`
/usr/bin/cmake -S/tmp/byblhgc_/src/cmake_pkgs/app_pkg -B/tmp/byblhgc_/build/app_pkg --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /tmp/byblhgc_/build/app_pkg/CMakeFiles /tmp/byblhgc_/build/app_pkg/CMakeFiles/progress.marks
/usr/bin/make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/tmp/byblhgc_/build/app_pkg'
/usr/bin/make -f CMakeFiles/vanilla_app.dir/build.make CMakeFiles/vanilla_app.dir/depend
make[2]: Entering directory '/tmp/byblhgc_/build/app_pkg'
cd /tmp/byblhgc_/build/app_pkg && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/byblhgc_/src/cmake_pkgs/app_pkg /tmp/byblhgc_/src/cmake_pkgs/app_pkg /tmp/byblhgc_/build/app_pkg /tmp/byblhgc_/build/app_pkg /tmp/byblhgc_/build/app_pkg/CMakeFiles/vanilla_app.dir/DependInfo.cmake --color=
Dependee "/tmp/byblhgc_/build/app_pkg/CMakeFiles/vanilla_app.dir/DependInfo.cmake" is newer than depender "/tmp/byblhgc_/build/app_pkg/CMakeFiles/vanilla_app.dir/depend.internal".
Dependee "/tmp/byblhgc_/build/app_pkg/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/tmp/byblhgc_/build/app_pkg/CMakeFiles/vanilla_app.dir/depend.internal".
Scanning dependencies of target vanilla_app
make[2]: Leaving directory '/tmp/byblhgc_/build/app_pkg'
/usr/bin/make -f CMakeFiles/vanilla_app.dir/build.make CMakeFiles/vanilla_app.dir/build
make[2]: Entering directory '/tmp/byblhgc_/build/app_pkg'
[ 50%] Building CXX object CMakeFiles/vanilla_app.dir/vanilla.cpp.o
/usr/lib/ccache/c++     -o CMakeFiles/vanilla_app.dir/vanilla.cpp.o -c /tmp/byblhgc_/src/cmake_pkgs/app_pkg/vanilla.cpp
/tmp/byblhgc_/src/cmake_pkgs/app_pkg/vanilla.cpp:3:10: fatal error: vanilla.h: No such file or directory
    3 | #include <vanilla.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/vanilla_app.dir/build.make:63: CMakeFiles/vanilla_app.dir/vanilla.cpp.o] Error 1
make[2]: Leaving directory '/tmp/byblhgc_/build/app_pkg'
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/vanilla_app.dir/all] Error 2
make[1]: Leaving directory '/tmp/byblhgc_/build/app_pkg'
make: *** [Makefile:130: all] Error 2

It seems to be something with the include directories. Still figuring things out.

timonegk commented 2 years ago

Bisecting catkin marks this commit as guilty: https://github.com/ros/catkin/commit/39a666c3fb1aeba7cf197192b9e86c020078916f Discussion for the change is here: https://github.com/ros/catkin/pull/758 So we probably should adapt the test to correctly include vanilla.h, possibly also changing lib_pkg/CMakeLists.txt.

MatthijsBurgh commented 2 years ago

@timonegk I am not really satisfied with the solution. But I think this is the only solution without exporting lib_pkg

timonegk commented 2 years ago

Hm, this is not really nice, especially since this way of including the directory is not how you would do it in "real life". How would the solution with exporting lib_pkg look / why would that be bad?

MatthijsBurgh commented 2 years ago

It is not bad. It would just require a little bit more work. I will give it a try sometime this week.

MatthijsBurgh commented 2 years ago

@timonegk I have updated the PR to export lib_pkg. I followed the CMake tutorial. I am not sure I should be using vanillaTargets aka the library name or lib_pkgTargets aka the project name. The tutorial isn't clear as it using the same name for the library and the project.

timonegk commented 2 years ago

Thanks for the effort! It works locally with catkin_tools and catkin_make and the CI is happy, so I think this can be merged.