[lttng-dev] cross-compiling lttng-ust and python version
gerlando.falauto at keymile.com
Mon May 12 10:24:14 EDT 2014
I am trying to cross-compile lttng-ust for a powerpc platform.
I get the following error during make:
../../../tools/lttng-gen-tp -o sample_tracepoint.h sample_tracepoint.tp
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "../../../tools/lttng-gen-tp", line 19, in <module>
from __future__ import print_function
ImportError: No module named __future__
I believe the wrong python version is called ("python" instead of
"python2.7"), as the first line of tools/gen-tp reads:
Notice how I explicitly set the python version in my configure script:
ac_cv_header_linux_perf_event_h=no PYTHON=python2.7 ./configure
--target=powerpc-linux --host=powerpc-linux --build=i686-linux
MAKEFLAGS= && DESTDIR=/opt/eldk/powerpc/sysroots/powerpc-linux make all
install install-strip pkgconfigdir=/tmp pkgconfig_DATA=
Which doesn't seem to help in this case though.
Any idea how to fix this?
I temporarily tried patching
which partially solves my problem; as a matter of fact, I get this new
File "../../../tools/lttng-gen-tp", line 24, in <module>
ImportError: No module named subprocess
which is a somwhat different issue, as I'm now running python2.7 from
the sysroot of my cross-compiler environment (which doesn't apparently
$ which python2.7
Any suggestions here?
Even though it might look like the easiest solution, I'd rather not
install a native 2.7 (or higher) python version on my build machine.
More information about the lttng-dev