Static Build of a ROS application [closed]

asked 2019-02-11 05:17:51 -0500

updated 2019-02-17 23:38:29 -0500

Hey all ,

I am currently working on a embedded board (very limited support ) to be used in the Automotive industry as a sensor/actuator interface device (with CAN and High Speed Eth interfaces ).

Currently I am trying to build a Talker , Subscriber to be put on the target device .

I dont want to go through catkin to take care of my ROS dependencies . I know that catkin will link all the .so files by adding the locations in the env variables

Is there any way to build a simple ROS application using static build so that i can simply copy the standalone executable and verify its working on my target system

PS:- I have tried building the C++ application using regular CMake with --static argument , but doesnt seem to help much .

Kindly point out to me if its really worth spending time building a static build just for POC(Proof Of Concept ) If someone out there has attempted to do something like this , please share your insights .

EDIT #1 (2/18/2019)

Important Links i came accross https://ro-che.info/articles/2016-09-...

http://statifier.sourceforge.net/

Statifier is one tool that might be useful .

Use this command line to compile your code directly with g++:

g++ yourtest.cpp -o yourtest -I/opt/ros/indigo/include -L/opt/ros/indigo/lib \ -Wl,-rpath,/opt/ros/indigo/lib -lroscpp -lrosconsole -lrostime \ -lroscpp_serialization -lboost_system -lboost_thread -pthread -lactionlib

I have there should be ways within g++ to build statically.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2019-02-13 01:39:47.194887

Comments

Please see #q314797 for a very recent discussion of the same topic.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-11 05:32:03 -0500 )edit

Alright , thanks .

I guess its a very narrow and pointless path to take . "Trying to build apps statically "

chrissunny94 gravatar imagechrissunny94 ( 2019-02-13 01:24:47 -0500 )edit

No, it's a legitimate thing to ask, but it's just something that takes a little more work with ROS 1 (not sure about ROS 2).

gvdhoorn gravatar imagegvdhoorn ( 2019-02-13 01:39:41 -0500 )edit

@gvdhoorn , has statifier been of any help to you ?

chrissunny94 gravatar imagechrissunny94 ( 2019-02-17 23:35:29 -0500 )edit

I've not used that tool, so I cannot comment.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-18 01:24:01 -0500 )edit