[yocto] Python module not found when using autotools

Serkan Türker serkan.tuerker at gmail.com
Thu May 30 13:25:58 PDT 2019


I understand the process of debugging build failures. I am just confused
why my approach doesn't work.
"python-soundcloud.bb" has the same format like other python module recipes
in meta-oe.
In tizonia.bb, I have added "python-soundcloud" to DEPENDS, so I assumed
bitbake would resolve the necessary path's, which are necessary for the
build.
It is also not only my fault not being able to fix this, it is also largely
related to the fact, that there is not much documentation around how to
start developing with Yocto in general.

 I am gonna continue banging my head.

Cheers.

On Thu, May 30, 2019 at 12:21 PM Alexander Kanavin <alex.kanavin at gmail.com>
wrote:

> I guess you could start by looking at configure.ac in the failing
> component's source code and specifically which m4 macro it is using to find
> the python module, then look at the definition of that macro and what it
> does. Sadly, this kind of thing - working your way through large,
> unfamiliar code base to debug a build failure - is typical when working
> with Yocto, and is pretty much a required skill.
>
> Alex
>
> On Thu, 30 May 2019 at 21:08, Serkan Türker <serkan.tuerker at gmail.com>
> wrote:
>
>> Hi Alexander,
>>
>> thank you for the quick reply. Doing the ./configure part on the host
>> machine for host (basically, compiling tizonia on Ubuntu) works fine, there
>> it can find the soundcloud module. I just don't understand where autotools
>> (during bitbake) is looking for the soundcloud module and what I have to do
>> to make it work.
>>
>> Cheers,
>> Serkan
>>
>> On Thu, May 30, 2019 at 11:46 AM Alexander Kanavin <
>> alex.kanavin at gmail.com> wrote:
>>
>>> This is really an autotools question, not a yocto question.
>>> Specifically, what happens at this point?
>>> *| checking python module: soundcloud... no*
>>>
>>> Quite likely, the autotools script runs native python and asks it to
>>> import soundcloud, which fails. You need a different approach, maybe
>>> checking for the module file in the target sysroot.
>>>
>>> Also, do not use python 2.7. All upstream support for it ends in 6
>>> months.
>>>
>>> Alex
>>>
>>> On Thu, 30 May 2019 at 04:37, Serkan Türker <serkan.tuerker at gmail.com>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am trying to write a bitbake file for a project. The project uses
>>>> autotools for configuring the project before building it.
>>>> While configuring it, it searches for several python modules, where
>>>> some of them are custom modules I wrote the bitbake recipe for.
>>>> Even though the python module builds and installs correctly to the
>>>> sysroot directory, it is not found in the configure step.
>>>>
>>>> ====================================================================
>>>> python-soundcloud_0.5.0.bb
>>>>
>>>> *-----------------------------------------------------------------------------------------------------------------------*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *LICENSE = "MIT"LIC_FILES_CHKSUM =
>>>> "file://LICENSE;md5=31fa3a9dc818e0087893d63583d2d21a"SRC_URI[md5sum] =
>>>> "40c1d32afd019ed11ec1fbee3e84e31f"SRC_URI[sha256sum] =
>>>> "aad2003592cec945f835f158f7b41ba8bf805c5738a2fcc5629668ea1df653d5"DEPENDS_${PN}
>>>> = "${PYTHON_PN}-modules"PYPI_PACKAGE = "soundcloud"*
>>>>
>>>>
>>>>
>>>> *inherit setuptools pypiRDEPENDS_${PN} = "${PYTHON_PN}-modules"*
>>>>
>>>> -----------------------------------------------------------------------------------------------------------------------
>>>>
>>>> *python-soundcloud is succesfully installed to
>>>> "BUILD/sysroots/raspberrypi3/usr/lib/python2.7/site-packages/soundcloud"*
>>>>
>>>> ====================================================================
>>>> tizonia.bb
>>>>
>>>> -----------------------------------------------------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *SUMMARY = "Tizonia Library"DESCRIPTION = "Tizonia"LICENSE =
>>>> "LGPL-3.0"LIC_FILES_CHKSUM =
>>>> "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"SRC_URI =
>>>> "git://github.com/tizonia/tizonia-openmax-il.git;protocol=https
>>>> <http://github.com/tizonia/tizonia-openmax-il.git;protocol=https>"SRCREV =
>>>> "9004bc40b89eeafb04b28fbb2b772e47dd62fdc9"S = "${WORKDIR}/git"DEPENDS =
>>>> "mediainfo log4c python-pip python-soundcloud"*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *inherit autotools ccache pkgconfig pythonnativeRDEPENDS_${PN} =
>>>> "libstdc++ mediainfo log4c python-soundcloud"EXTRA_OECONF += "-C"*
>>>>
>>>> -----------------------------------------------------------------------------------------------------------------------
>>>>
>>>> *The error message I get from bitbake:*
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *| checking for python2.7... (cached)
>>>> /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/bin/python-native/python|
>>>> checking for a version of Python >= '2.1.0'... yes| checking for a version
>>>> of Python >= '2.7'... yes| checking for the distutils Python package...
>>>> yes| checking for Python include path...
>>>> -I/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/include/python2.7|
>>>> checking for Python library path...
>>>> -L/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/lib
>>>> -lpython2.7| checking for Python site-packages path...
>>>> /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/lib/python2.7/site-packages|
>>>> checking python extra libraries... -lpthread -ldl  -lpthread -lutil -lm|
>>>> checking python extra linking flags... -Xlinker -export-dynamic| checking
>>>> consistency of all components of python development environment... yes|
>>>> checking python module: soundcloud... no| configure: error: failed to find
>>>> required module soundcloud*
>>>>
>>>> Does somebody know what I am doing wrong? I cannot figure it out, any
>>>> help is appreciated!
>>>>
>>>> Cheers,
>>>> Serkan
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto at yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190530/7f5e4ebf/attachment.html>


More information about the yocto mailing list