Closed dyumanaditya closed 3 years ago
UPDATE: I read here the abb_libegm_samples
were made some time ago when abb_libegm
was a catkin package.
I have updated my CMakeList.txt accordingly (I think, please correct me if I've done something wrong), here it is:
The new error I get when running catkin_make_isolated
is the following:
I read here the
abb_libegm_samples
were made some time ago whenabb_libegm
was a catkin package.
that's indeed the cause of the problem you encountered.
I have updated my CMakeList.txt accordingly (I think, please correct me if I've done something wrong), here it is:
almost correct. The change to add a separate find_package(abb_libegm ..)
is good, but:
The new error I get when running
catkin_make_isolated
is the following:
your new error is caused by the fact you're missing: target_link_libraries(... abb_libegm::abb_libegm ...)
for all targets built.
This will update the include paths to also include the location of the header files of abb_libegm
, which is the cause of the error you show.
It will also cause abb_libegm
to be linked to the targets, which would've probably been the next problem.
Note: this is actually a duplicate of the issue you already found.
The solution is mentioned in https://github.com/ros-industrial/abb_libegm/issues/18#issuecomment-740013963, which I believe you'd already also found.
As such, I'm going to close this issue.
Feel free to keep commenting on it.
Thanks for your response, #18 (comment) didn't seem to be an explicit solution (to me at least): what do I need to add in place of the "..." in target_link_libraries(... abb_libegm::abb_libegm ...)
?
Adding this:
target_link_libraries(${PROJECT_NAME} PRIVATE
abb_libegm::abb_libegm
${catkin_LIBRARIES}
)
gives me the following error:
I'm hoping to correct the errors and re-upload the abb_libegm_samples
package so that others can build it successfully too.
As I wrote in https://github.com/ros-industrial/abb_libegm/issues/121#issuecomment-799491701:
your new error is caused by the fact you're missing:
target_link_libraries(... abb_libegm::abb_libegm ...)
for all targets built.
All targets built by the CMakeLists.txt
need to have that line added.
You could also add abb_libegm::abb_libegm
to the target_link_libraries(..)
lines already present for each binary target.
Thank you for your help @gavanderhoorn! I got the package to build correctly. I'm uploading the updated abb_libegm_samples
that will now build successfully on Windows (probably linux too)
abb_libegm_samples.zip
Hi, I found these abb_libegm samples from issue #18 and want to experiment with them to see if they can help me out. I have a
catkin_ws
with onlyabb_libegm
andabb_libegm_samples
. When I runcatkin_make_isolated
abb_libegm
builds successfully butabb_libegm_samples
gives me this error:Click to expand
``` ==> Processing catkin package: 'abb_libegm_samples' ==> Creating build directory: 'build_isolated\abb_libegm_samples' ==> Building with env: 'C:\Users\Dyuman\catkin_ws1\devel_isolated\abb_libegm\env.bat' ==> cmake C:\Users\Dyuman\catkin_ws1\src\abb_libegm_samples -DCATKIN_DEVEL_PREFIX=C:\Users\Dyuman\catkin_ws1\devel_isolated\abb_libegm_samples -DCMAKE_INSTALL_PREFIX=C:\Users\Dyuman\catkin_ws1\install_isolated -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja in 'C:\Users\Dyuman\catkin_ws1\build_isolated\abb_libegm_samples' -- The C compiler identification is MSVC 19.28.29337.0 -- The CXX compiler identification is MSVC 19.28.29337.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: C:/Users/Dyuman/catkin_ws1/devel_isolated/abb_libegm_samples -- Using CMAKE_PREFIX_PATH: C:/Users/Dyuman/catkin_ws1/devel_isolated/abb_libegm;C:\opt\ros\noetic\x64\tools\vcpkg\installed\x64-windows;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rws_state_publisher;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rws_service_provider;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_state_controller;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_hardware_interface;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_cpp_utilities;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_bringup_examples;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rapid_sm_addin_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rapid_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_msgs;c:\opt\ros\noetic\x64;C:/Users/Dyuman/catkin_ws1/devel_isolated/abb_libegm;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_rws_managers;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_librws;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_libegm -- This workspace overlays: C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rws_state_publisher;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rws_service_provider;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_state_controller;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_hardware_interface;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_cpp_utilities;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_robot_bringup_examples;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rapid_sm_addin_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_rapid_msgs;C:/Users/Dyuman/catkin_ws/devel_isolated/abb_egm_msgs;c:/opt/ros/noetic/x64 -- Found PythonInterp: C:/opt/ros/noetic/x64/python.exe (found suitable version "3.8.3", minimum required is "3") -- Using PYTHON_EXECUTABLE: C:/opt/ros/noetic/x64/python.exe -- Using default Python package layout -- Found PY_em: C:\opt\ros\noetic\x64\lib\site-packages\em.py -- Using empy: C:/opt/ros/noetic/x64/lib/site-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: C:/Users/Dyuman/catkin_ws1/build_isolated/abb_libegm_samples/test_results -- Found gtest: gtests will be built -- Using Python nosetests: C:/opt/ros/noetic/x64/Scripts/nosetests.exe -- catkin 0.8.9 -- BUILD_SHARED_LIBS is on -- Could NOT find abb_libegm (missing: abb_libegm_DIR) -- Could not find the required component 'abb_libegm'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at C:/opt/ros/noetic/x64/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "abb_libegm" with any of the following names: abb_libegmConfig.cmake abb_libegm-config.cmake Add the installation prefix of "abb_libegm" to CMAKE_PREFIX_PATH or set "abb_libegm_DIR" to a directory containing one of the above files. If "abb_libegm" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! See also "C:/Users/Dyuman/catkin_ws1/build_isolated/abb_libegm_samples/CMakeFiles/CMakeOutput.log". See also "C:/Users/Dyuman/catkin_ws1/build_isolated/abb_libegm_samples/CMakeFiles/CMakeError.log". <== Failed to process package 'abb_libegm_samples': Command '['C:\\Users\\Dyuman\\catkin_ws1\\devel_isolated\\abb_libegm\\env.bat', 'cmake', 'C:\\Users\\Dyuman\\catkin_ws1\\src\\abb_libegm_samples', '-DCATKIN_DEVEL_PREFIX=C:\\Users\\Dyuman\\catkin_ws1\\devel_isolated\\abb_libegm_samples', '-DCMAKE_INSTALL_PREFIX=C:\\Users\\Dyuman\\catkin_ws1\\install_isolated', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-G', 'Ninja']' returned non-zero exit status 1. Reproduce this error by running: ==> cd 'C:\Users\Dyuman\catkin_ws1\build_isolated\abb_libegm_samples' && 'C:\Users\Dyuman\catkin_ws1\devel_isolated\abb_libegm\env.bat' cmake 'C:\Users\Dyuman\catkin_ws1\src\abb_libegm_samples' '-DCATKIN_DEVEL_PREFIX=C:\Users\Dyuman\catkin_ws1\devel_isolated\abb_libegm_samples' '-DCMAKE_INSTALL_PREFIX=C:\Users\Dyuman\catkin_ws1\install_isolated' -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja Command failed, exiting. ```What could be going wrong?
EDIT: The updated
abb_libegm_samples
can be found here.