[yocto] usage of mingw as external toolchain

Francisco Torres francisco.torres at ttcontrol.com
Thu Feb 19 03:17:05 PST 2015


Hello,

I need to use mingw32 as external toolchain with yocto.

I have successfully built a helloworld recipe (as explained in http://www.yoctoproject.org/docs/1.0/poky-ref-manual/poky-ref-manual.html#usingpoky-extend-addpkg, 3.1.1. Single .c File Package (Hello World!)) and it is successfully generating a .exe that I can run on Windows.

The problem is that when I try to compile an autotooled package (as explained in same page in 3.1.2. Autotooled Package), there is a compilation problem.
Please I need help to solve this problem.

I am adding in conf/local.conf

EXTERNAL_TOOLCHAIN = "/path/to/your/mingw32-install"


The log is:

WARNING: Could not copy license file COPYING: [Errno 2] No such file or directory: '/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/hella1/2.2-r0/hella1-2.2/COPYING'
ERROR: Function failed: do_configure (log file is located at /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/eglibc/2.18-r0/temp/log.do_configure.18393)
ERROR: Logfile of failure stored in: /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/eglibc/2.18-r0/temp/log.do_configure.18393
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'x86_64-w64-mingw32', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| aclocal.m4:5: error: Exactly version 2.68 of Autoconf is required but you have 2.69
| aclocal.m4:5: the top level
| autom4te: m4 failed with exit status: 63
| NOTE: Running /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/eglibc/2.18-r0/eglibc-2.18/libc/configure  --build=x86_64-linux             --host=x86_64-w64-mingw32   --target=x86_64-w64-mingw32              --prefix=/usr                   --exec_prefix=/usr              --bindir=/usr/bin               --sbindir=/usr/sbin             --libexecdir=/usr/lib/eglibc                 --datadir=/usr/share            --sysconfdir=/etc               --sharedstatedir=/com                   --localstatedir=/var            --libdir=/usr/lib           --includedir=/usr/include                --oldincludedir=/usr/include            --infodir=/usr/share/info               --mandir=/usr/share/man                 --disable-silent-rules      --disable-dependency-tracking            --with-libtool-sysroot=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/windows --enable-kernel=2.6.16                 --without-cvs --disable-profile                 --disable-debug --without-gd                 --enable-clocale=gnu                 --enable-add-ons                 --with-headers=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/windows/usr/include                 --without-selinux                 --enable-obsolete-rpc                 --with-kconfig=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/x86_64-linux/usr/bin
| checking build system type... x86_64-pc-linux-gnu
| checking host system type... x86_64-w64-mingw32
| checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc  -m64 --sysroot=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/windows-tcbootstrap
| checking for suffix of object files... configure: error: in `/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/eglibc/2.18-r0/build-x86_64-w64-mingw32':
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log' for more details
| Configure failed. The contents of all config.log files follows to aid debugging
| ERROR: oe_runconf failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/eglibc/2.18-r0/temp/log.do_configure.18393)
ERROR: Task 348 (/data/fto/eldk553/meta/recipes-core/eglibc/eglibc_2.18.bb, do_configure) failed with exit code '1'
ERROR: Function failed: do_configure (log file is located at /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/temp/log.do_configure.18397)
ERROR: Logfile of failure stored in: /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/temp/log.do_configure.18397
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'x86_64-w64-mingw32', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing shell function do_configure
| automake (GNU automake) 1.12.6
| Copyright (C) 2012 Free Software Foundation, Inc.
| License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
| This is free software: you are free to change and redistribute it.
| There is NO WARRANTY, to the extent permitted by law.
|
| Written by Tom Tromey <tromey at redhat.com>
|        and Alexandre Duret-Lutz <adl at gnu.org>.
| AUTOV is 1.12
| NOTE: Executing ACLOCAL="aclocal --system-acdir=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/build/aclocal-copy/ --automake-acdir=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12" autoreconf --verbose --install --force --exclude=autopoint -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/conftools/ -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/m4/
| autoreconf: Entering directory `.'
| autoreconf: configure.in: not using Gettext
| autoreconf: running: aclocal --system-acdir=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/build/aclocal-copy/ --automake-acdir=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12 -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/conftools/ -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/m4/ -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/conftools/ -I /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/m4/ --force
| aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
| autoreconf: configure.in: tracing
| autoreconf: running: libtoolize --copy --force
| libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `conftools'.
| libtoolize: copying file `conftools/ltmain.sh'
| libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
| libtoolize: copying file `m4/libtool.m4'
| libtoolize: copying file `m4/ltoptions.m4'
| libtoolize: copying file `m4/ltsugar.m4'
| libtoolize: copying file `m4/ltversion.m4'
| libtoolize: copying file `m4/lt~obsolete.m4'
| libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
| aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
| autoreconf: running: /data/fto/build_eldk553_externaltoolchain/tmp/sysroots/x86_64-linux/usr/bin/autoconf --include=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/conftools/ --include=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/m4/ --force
| autoreconf: running: /data/fto/build_eldk553_externaltoolchain/tmp/sysroots/x86_64-linux/usr/bin/autoheader --include=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/conftools/ --include=/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/m4/ --force
| autoreconf: configure.in: not using Automake
| autoreconf: running: gnu-configize
| autoreconf: Leaving directory `.'
| NOTE: Running /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/expat-2.1.0/configure  --build=x86_64-linux                  --host=x86_64-w64-mingw32   --target=x86_64-w64-mingw32              --prefix=/usr                   --exec_prefix=/usr              --bindir=/usr/bin               --sbindir=/usr/sbin             --libexecdir=/usr/lib/expat                  --datadir=/usr/share            --sysconfdir=/etc               --sharedstatedir=/com                   --localstatedir=/var            --libdir=/usr/lib           --includedir=/usr/include                --oldincludedir=/usr/include            --infodir=/usr/share/info               --mandir=/usr/share/man                 --disable-silent-rules      --disable-dependency-tracking            --with-libtool-sysroot=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/windows
| configure: WARNING: unrecognized options: --disable-silent-rules, --disable-dependency-tracking
| configure: loading site script /data/fto/eldk553/meta/site/endian-little
| configure: loading site script /data/fto/eldk553/meta/site/common
| checking build system type... x86_64-pc-linux-gnu
| checking host system type... x86_64-w64-mingw32
| checking for x86_64-w64-mingw32-as... x86_64-w64-mingw32-as
| checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
| checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
| checking how to print strings... printf
| checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc  -m64 --sysroot=/data/fto/build_eldk553_externaltoolchain/tmp/sysroots/windows
| checking whether the C compiler works... no
| configure: error: in `/data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/build':
| configure: error: C compiler cannot create executables
| See `config.log' for more details
| Configure failed. The contents of all config.log files follows to aid debugging
| ERROR: oe_runconf failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /data/fto/build_eldk553_externaltoolchain/tmp/work/x86_64-w64-mingw32/expat/2.1.0-r0/temp/log.do_configure.18397)
ERROR: Task 360 (/data/fto/eldk553/meta/recipes-core/expat/expat_2.1.0.bb, do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 447 tasks of which 399 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:

Summary: 2 tasks failed:
  /data/fto/eldk553/meta/recipes-core/eglibc/eglibc_2.18.bb, do_configure
  /data/fto/eldk553/meta/recipes-core/expat/expat_2.1.0.bb, do_configure
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
torres at ttc-visionbuilder:/data/fto/build_eldk553_externaltoolchain$
CONFIDENTIALITY: The contents of this e-mail are confidential and intended only for the above addressee(s). If you are not the intended recipient, or the person responsible for delivering it to the intended recipient, copying or delivering it to anyone else or using it in any unauthorized manner is prohibited and may be unlawful. If you receive this e-mail by mistake, please notify the sender and the systems administrator at straymail at tttech.com immediately.



More information about the yocto mailing list