ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Buildfarm doesn't define the ROS_DISTRO environment variable

asked 2017-12-01 12:17:08 -0500

kmhallen gravatar image

updated 2022-12-29 04:01:31 -0500

peci1 gravatar image

My package uses the $ROS_DISTRO environment variable at configure time for dh_installudev and for differences between Indigo and Kinetic. The buildfarm doesn't seem to define $ROS_DISTRO.


Buildfarm errors:

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-12-01 12:56:23 -0500

tfoote gravatar image

updated 2022-12-29 10:15:28 -0500


We have formalized the solution to getting this environment variable. You should use the ros_environment package to get these sorts of variables defined and available in your workspace.

Old answer:

Yeah, we don't set that in the debian build environment. You can see it for your package here:

You could try extending the template in bloom: and if that resolves your problem it might be worth considering a pull request. Though I'd like to see if there's a cleaner way to determine the debian package name during the compile, but I can't find anything.

@nuclearsandwich @William FYI

edit flag offensive delete link more


It looks like it's not necessary to know the debian package name. The simple filename udev can be used.

kmhallen gravatar image kmhallen  ( 2017-12-02 15:25:38 -0500 )edit

answered 2017-12-01 14:39:45 -0500

William gravatar image

updated 2017-12-01 14:39:59 -0500

I believe you could try adding a direct dependency on roslib in your package. As long as roslib is installed before building your package it should be set I think because roslib's environment hook set the env variable.

I'm not sure why roscpp doesn't transitively depend on roslib but rospy does, @Dirk Thomas any idea is that's desired/correct or an oversight?

edit flag offensive delete link more



Adding a build dependency on roslib fixed everything:

kmhallen gravatar image kmhallen  ( 2017-12-02 15:23:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-12-01 12:17:08 -0500

Seen: 306 times

Last updated: Dec 29 '22