[yocto] Building one package needs header from another

Paul D. DeRocco pderocco at ix.netcom.com
Tue Aug 20 16:06:54 PDT 2013


> From: Burton, Ross [mailto:ross.burton at intel.com] 
> 
> If you've built pygtk then the target sysroot should have the headers
> in, and for me it does:
> 
> ross at melchett /data/poky-master/tmp/sysroots/genericx86
> $ find . -name pygtk.h
> ./usr/include/pygtk-2.0/pygtk/pygtk.h
> 
> This is probably a problem with python-matplotlib, can you share the
> configure and build logs?  It's probably looking in the wrong place.

Yes, the include files are there. I'm only beginning to grasp a little
about how builds work, and that sysroots/overo is the context in which the
Gumstix cross tools run. But the appropriate directory,
/home/pauld/yocto/build/tmp/sysroots/overo/usr/include/pygtk-2.0, is not
on the compiler command line, and that causes the error.

I've been trying to figure out how the setup.py/setup.cfg (and distutils)
stuff works. The setup.cfg file lists only one possible option for adding
directories, which is basedirlist, but setting that to foo adds
foo/include to the include directories and foo/lib to the library
directories, so that's not appropriate. I tried just setting include_dirs
to the proper directory in the [directories] section, but it had no
effect.

The configure log shows nothing, but the compile log (which shows the
compile error at the end), shows this DEBUG note right at the beginning:

/home/pauld/yocto/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/python
-matplotlib-1.1.0-r3/temp/run.do_compile.14201: line 82:
/home/pauld/yocto/build/tmp/sysroots/i686-linux/usr/bin/python: No such
file or directory
basedirlist is: ['/home/pauld/yocto/build/tmp/sysroots/overo/usr/lib']

The message refers to this script in run.do_compile (slightly
reformatted):

do_compile() {
  BUILD_SYS=i686-linux HOST_SYS=arm-poky-linux-gnueabi \
  /home/pauld/yocto/build/tmp/sysroots/i686-linux/usr/bin/python \
      setup.py build || true
  distutils_do_compile
}

This would suggest that setup.py isn't even being run. Yet when I
accidentally put a syntax error into setup.cfg, it barfed. Is setup.cfg
read before setup.py is run, by something else?

So there are two questions: why is there no python in that directory?
(There is a python-native subdirectory containing python.) And once that's
dealt with, how does one add a specific include subdirectory to the
command line via setup.cfg?

Or maybe those aren't the questions. I understand about 0.1% of what's
going on here.

I'm also curious if distutils is something that is used throughout the
bitbake process, or is it something specific to building Python-related
stuff? Can the setup.py/setup.cfg mechanism be used in any recipes?

-- 

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at ix.netcom.com 




More information about the yocto mailing list