How to change the make target path?

asked 2020-05-23 20:10:56 -0500

shmpwk gravatar image

updated 2020-05-24 04:29:24 -0500

gvdhoorn gravatar image

Hi, I'm wondering how to change the make target path. My environment is Ubuntu 18.04, melodic.

When I tried to build a package, error occurred like below. It says

make[2]: *** No rule to make target '/usr/lib/libOpenNI2.so', needed by '/home/shumpeiwakabayashi/coral_ws/devel/.private/image_view2/lib/image_view2/points_rectangle_extractor'.  Stop.

Actually, I found target like

$ apt-file search libOpenNI2.so
libopenni2-0: /usr/lib/libOpenNI2.so.0
libopenni2-dev: /usr/lib/libOpenNI2.so

But I couldn't find/home/shumpeiwakabayashi/coral_ws/devel/.private/image_view2/lib/image_view2/points_rectangle_extractor

So I made points_rectangle_extractor.cpp file, which was copied from here. Also, I made image_view2 file. But it wasn't solved.

Maybe is it related to CMAKE_TARGET_LINKED_INFO_FILES path? , because it is set in CMakeFiles/image_view2.dir/all.

How can I fix this problem? Thank you!

$ catkin build image_view2 
----------------------------------------------------------------------------
Profile:                     default
Extending:          [cached] /opt/ros/melodic
Workspace:                   /home/shumpeiwakabayashi/coral_ws
----------------------------------------------------------------------------
Build Space:        [exists] /home/shumpeiwakabayashi/coral_ws/build
Devel Space:        [exists] /home/shumpeiwakabayashi/coral_ws/devel
Install Space:      [unused] /home/shumpeiwakabayashi/coral_ws/install
Log Space:          [exists] /home/shumpeiwakabayashi/coral_ws/logs
Source Space:       [exists] /home/shumpeiwakabayashi/coral_ws/src
DESTDIR:            [unused] None
----------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
----------------------------------------------------------------------------
Additional CMake Args:       -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
----------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
----------------------------------------------------------------------------
Workspace configuration appears valid.
----------------------------------------------------------------------------
[build] Found '15' packages in 0.0 seconds.                                 
[build] Package table is up to date.                                        
Starting  >>> cv_bridge                                                     
Starting  >>> image_geometry                                                
Finished  <<< image_geometry                [ 0.4 seconds ]                 
Finished  <<< cv_bridge                     [ 0.4 seconds ]                 
Starting  >>> image_view2                                                   
____________________________________________________________________________
Errors     << image_view2:make /home/shumpeiwakabayashi/coral_ws/logs/image_view2/build.make.002.log                         
make[2]: *** No rule to make target '/usr/lib/libOpenNI2.so', needed by '/home/shumpeiwakabayashi/coral_ws/devel/.private/image_view2/lib/image_view2/points_rectangle_extractor'.  Stop.
make[1]: *** [CMakeFiles/points_rectangle_extractor.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target '/usr/lib/libOpenNI2.so', needed by '/home/shumpeiwakabayashi/coral_ws/devel/.private/image_view2/lib/image_view2/image_view2'.  Stop.
make[1]: *** [CMakeFiles/image_view2.dir/all] Error 2
make: *** [all] Error 2
cd /home/shumpeiwakabayashi/coral_ws/build/image_view2; catkin build --get-env image_view2 | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
............................................................................
Failed     << image_view2:make              [ Exited with code 2 ]          
Failed    <<< image_view2                   [ 0.5 seconds ]                 
[build] Summary: 2 of 3 packages succeeded.                                 
[build]   Ignored:   12 packages were skipped or are blacklisted.           
[build]   Warnings:  None.                                                  
[build]   Abandoned: None.                                                  
[build]   Failed:    1 packages failed.                                     
[build] Runtime: 1.1 seconds total.
edit retag flag offensive close merge delete