[yocto] Build error: "u-boot-imx_2017.03.bb:do_compile" failed ( freescale I.MX 6 on Ubuntu 16.04) ?

Martin Jansa martin.jansa at gmail.com
Wed Dec 6 23:36:52 PST 2017


I don't know what version of Yocto you're using, but if it's older than 2.3
(which does filter what binaries are seen from the host system with
HOSTTOOLS), then your build is probably autodetecting swig from host and
you can easily disable that with:

do_compile_prepend () {
    sed 's@\(^always += $(if $(shell which swig 2>
/dev/null),_libfdt.so)$\)@# do not autodetect swig, there is no swig-native
dependency \1 at g' -i ${S}/tools/Makefile
}

Then it won't try to rebuild libfdt python library and it won't fail.

On Thu, Dec 7, 2017 at 8:21 AM, Eric Schwarz <eas at sw-optimization.com>
wrote:

> Hello Jerry,
>
> U-Boot depends on Python but the dependency is not included in the U-Boot
> recipe AFAIK.
> I have already sent a patchset which was not complete at that time to the
> yocto mailinglist. Ross meant one needs to inherit from Python U-Boot class
> in the recipe not just include a dependency o/w it will not be in path.
> The error only comes up because you do not have Python installed on your
> system I think.
>
> Cheers
> Eric
>
> Am 06.12.2017 18:13, schrieb Jerry Lian:
>
> I got an error when trying to build for freescale I.MX6 on Ubuntu
>> 16.04.(see below)
>> (I just follow the guide from http://freescale.github.io)
>>
>> Anybody got hints?
>>
>> Thanks!
>>
>> Jerry
>>
>> =======================================================================
>> ................
>> | tools/libfdt_wrap.c:147:21: fatal error: Python.h: No such file or
>> directory
>> | compilation terminated.
>> | error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
>> | /home/jerry/fsl-release-bsp/build-x11/tmp/work/imx6qsabresd-
>> poky-linux-gnueabi/u-boot-imx/2017.03-r0/git/tools/Makefile:123: recipe
>> for target 'tools/_libfdt.so' failed
>> | make[2]: *** [tools/_libfdt.so] Error 1
>> | /home/jerry/fsl-release-bsp/build-x11/tmp/work/imx6qsabresd-
>> poky-linux-gnueabi/u-boot-imx/2017.03-r0/git/Makefile:1229: recipe for
>> target 'tools' failed
>> | make[1]: *** [tools] Error 2
>> | make[1]: Leaving directory '/home/jerry/fsl-release-bsp/b
>> uild-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-
>> imx/2017.03-r0/build/mx6qsabresd_config'
>> | Makefile:150: recipe for target 'sub-make' failed
>> | make: *** [sub-make] Error 2
>> | make: Leaving directory '/home/jerry/fsl-release-bsp/b
>> uild-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/u-boot-
>> imx/2017.03-r0/git'
>> | WARNING: exit code 1 from a shell command.
>> | ERROR: Function failed: do_compile (log file is located at
>> /home/jerry/fsl-release-bsp/build-x11/tmp/work/imx6qsabresd-
>> poky-linux-gnueabi/u-boot-imx/2017.03-r0/temp/log.do_compile.9339)
>> ERROR: Task (/home/jerry/fsl-release-bsp/sources/meta-fsl-bsp-release/im
>> x/meta-bsp/recipes-bsp/u-boot/u-boot-imx_2017.03.bb:do_compile) failed
>> with exit code '1'
>> NOTE: Tasks Summary: Attempted 4851 tasks of which 3009 didn't need to be
>> rerun and 1 failed.
>>
>> Summary: 1 task failed:
>> /home/jerry/fsl-release-bsp/sources/meta-fsl-bsp-release/imx
>> /meta-bsp/recipes-bsp/u-boot/u-boot-imx_2017.03.bb:do_compile
>> ..........................
>> ========================================================================
>>
> --
> _______________________________________________
> 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/20171207/c01dc094/attachment.html>


More information about the yocto mailing list