0
$\begingroup$

Rosanswers logo

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?


Originally posted by dustingooding on ROS Answers with karma: 139 on 2013-11-08

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Daniel Stonier with karma: 3170 on 2013-11-13

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by dustingooding on 2014-01-06:\

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

AFAIK, they haven't. Still fighting...

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by po1 with karma: 411 on 2014-01-14

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.