ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

Install Python module for cross-compile target?

asked 2013-11-08 04:12:32 -0500

dustingooding gravatar image

updated 2014-01-28 17:18:29 -0500

ngrennan gravatar image

I'm cross compiling ROS Comm Hydro for an i.MX53 Cortex A8 ARM board. I've configured yujin_tools (thanks Daniel) to correctly cross-compile the ROS sources and build-time dependencies and prep them for inclusion into my target's rootfs. Unfortunately, the version of Python provided with the Digi developer tools doesn't have a couple of ROS run-time dependencies, so I'm also cross-compiling Python (2.7). I've done this as well, but I'm unsure how to properly cross-compile/build extra Python modules (like PyYAML). I can build them on-target, but that's not ideal. These modules generally install via "python setup.py install", but I see no way to give a PREFIX argument, among other things.

So, what's the 'correct' way to build third party Python modules that ROS depends on (i.e., PyYAML, setuptools, rospkg, and catkin_pkg), on my host machine, in a way that they can be included in a rootfs image along with the rest of my cross-compiled artifacts?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-13 17:36:15 -0500

Daniel Stonier gravatar image

I did try and cross compile python and some modules once, a long time ago. It was a dishearteningly horrible experience to find out how badly patched together the python sources were. The build recipes were a very custom hack that didn't lend itself at all well to cross-compiling them.

I think I got something working, using alot of patches from the gentoo crossdev environment. However we didn't end up running python on the embedded board as it was too heavy. We needed every cycle for the c++ programs.

I don't know if they've updated the python sources with easier build tooling.

edit flag offensive delete link more

Comments

> I don't know if they've updated the python sources with easier build tooling. AFAIK, they haven't. Still fighting...

dustingooding gravatar imagedustingooding ( 2014-01-06 04:37:03 -0500 )edit
0

answered 2014-01-14 21:08:17 -0500

po1 gravatar image

This question is a bit old, but there are some resources online about doing that kind of things. In general, when in doubt, I would recommend looking at how debian does it.

The following page is about building a debian package for a python module that has a setup.py

http://ghantoos.org/2008/10/19/creating-a-deb-package-from-a-python-setuppy/

I don't know about packaging tools for other distributions, but as far as debian-based systems go, debuild makes producing packages of pretty much anything quite easy.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-11-08 04:12:32 -0500

Seen: 1,617 times

Last updated: Jan 14 '14