All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Vinokurov <d.vinokuroff@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: LPC3250, helloworld-image, configure: error: cannot run C compiled programs
Date: Sun, 23 Aug 2009 10:17:56 +0600	[thread overview]
Message-ID: <4A90C2F4.1010300@gmail.com> (raw)
In-Reply-To: <20090822231735.GA12848@gmail.com>

Khem Raj wrote:
> On (22/08/09 13:45), Dmitry Vinokurov wrote:
>   
>> Dmitry Vinokurov wrote:
>>     
>>> Holger Hans Peter Freyther wrote:
>>>       
>>>> On Thursday 20 August 2009 20:42:03 Dmitry Vinokurov wrote:
>>>>
>>>> I will update the documentation with these bits:
>>>>
>>>>
>>>> ASSUME_PROVIDED += " virtual/${TARGET_PREFIX}gcc "
>>>> ASSUME_PROVIDED += " virtual/libc "
>>>> ASSUME_PROVIDED += "linux-libc-headers "
>>>> ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}gcc "
>>>> ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}gcc-initial "
>>>> ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}gcc-intermediate "
>>>> ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}binutils "
>>>> ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}libc-for-gcc "
>>>> ASSUME_PROVIDED += "virtual/libintl "
>>>> ASSUME_PROVIDED += "virtual/libiconv "
>>>>
>>>> TARGET_PREFIX = "arm-linux-gnueabi-"
>>>> ASSUME_SHLIBS = "libc.so.6:libc"
>>>>
>>>>
>>>> The main difference are. Assume provided more
>>>> binaries/libraries, use the TARGET_PREFIX instead of CC, CXX,
>>>> NM....
>>>>
>>>>
>>>> does this work any better?
>>>>    z.
>>>>
>>>>         
>>> I changed my config according to your advises, final version
>>> attached. Tried to build helloworld application: 'bitbake -v -DDD
>>> helloworld', it compiles and runs on target board fine. Tried to
>>> build linux kernel: 'bitbake -v -DDD linux-2.6.27', it fails with
>>> --------
>>> checking build system type... i686-pc-linux-gnu
>>> checking host system type... i686-pc-linux-gnu
>>> checking target system type... arm-oe-linux-gnueabi
>>> checking for a BSD-compatible install... /home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/bin/install
>>> -c
>>> checking whether build environment is sane... yes
>>> checking for a thread-safe mkdir -p... /home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/bin/mkdir
>>> -p
>>> checking for gawk... gawk
>>> checking whether make sets $(MAKE)... yes
>>> checking for i686-linux-gcc... /opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc
>>>
>>> checking for C compiler default output file name... a.out
>>> checking whether the C compiler works... configure: error: cannot
>>> run C compiled programs.
>>> If you meant to cross compile, use `--host'.
>>> See `config.log' for more details.
>>> + oefatal 'oe_runconf failed'
>>> + echo FATAL: 'oe_runconf failed'
>>> FATAL: oe_runconf failed
>>> + exit 1
>>> ERROR: function do_configure failed
>>> ERROR: see log in /home/raydan/work/oe/build-linux/tmp/work/arm-oe-linux-gnueabi/module-init-tools-cross-3.2.2-r5/temp/log.do_configure.30320
>>>
>>> NOTE: Task failed: /home/raydan/work/oe/build-linux/tmp/work/arm-oe-linux-gnueabi/module-init-tools-cross-3.2.2-r5/temp/log.do_configure.30320
>>>
>>> ERROR: TaskFailed event exception, aborting
>>> ERROR: Build of /home/raydan/work/oe/openembedded/recipes/module-init-tools/module-init-tools-cross_3.2.2.bb
>>> do_configure failed
>>> ERROR: Task 107 (/home/raydan/work/oe/openembedded/recipes/module-init-tools/module-init-tools-cross_3.2.2.bb,
>>> do_configure) failed
>>> NOTE: Tasks Summary: Attempted 86 tasks of which 21 didn't need to
>>> be rerun and 1 failed.
>>> ERROR: '/home/raydan/work/oe/openembedded/recipes/module-init-tools/module-init-tools-cross_3.2.2.bb'
>>> failed
>>> --------
>>>
>>> I.e. bitbake again confused cross-gcc and x86-gcc. Updated my OE
>>> with git pull, removed tmp/ and made rebuild -- same result.
>>>       
>> Looks like error is in wrong ./configure parameter:
>> --host=i686-linux instead of --host=arm-oe-linux-gnueabi .
>> Now I'm trying to find, why --host was set to i686 and where it can
>> be changed.
>>     
>
> its a cross package so host being i686-linux (I suppose you are building
> on i686 box) is ok. Look into the config.log error message should be in
> there
>
> -Khem
>   
Hm, "configure --help" says "--host=HOST cross-compile to build programs 
to run on HOST [BUILD]" and as I understand, I will run programs on ARM, 
so it should be 'arm-oe-linux-gnueabi'.

Anyway, even if host should be x86, instead of i686-linux-gcc it finds 
arm-vfp-linux-gcc and fails.
Here is config.log:
-----------------------------------------------------------------------------------------------------------
configure:1739: checking build system type
configure:1757: result: i686-pc-linux-gnu
configure:1779: checking host system type
configure:1794: result: i686-pc-linux-gnu
configure:1816: checking target system type
configure:1831: result: arm-oe-linux-gnueabi
configure:1876: checking for a BSD-compatible install
configure:1932: result: 
/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/bin/install -c
configure:1943: checking whether build environment is sane
configure:1986: result: yes
configure:2014: checking for a thread-safe mkdir -p
configure:2053: result: 
/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/bin/mkdir -p
configure:2066: checking for gawk
configure:2082: found /usr/bin/gawk
configure:2093: result: gawk
configure:2104: checking whether make sets $(MAKE)
configure:2125: result: yes
configure:2336: checking for i686-linux-gcc
configure:2363: result: 
/opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc
configure:2641: checking for C compiler version
configure:2648: 
/opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc 
--version >&5
arm-vfp-linux-gnu-gcc (crosstool-NG-1.3.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2651: $? = 0
configure:2658: 
/opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc 
-v >&5
Using built-in specs.
Target: arm-vfp-linux-gnu
Configured with: /home/usb10132/ct1/bin/targets/src/gcc-4.3.2/configure 
--build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu 
--target=arm-vfp-linux-gnu 
--prefix=/home/usb10132/x-tools/arm-vfp-linux-gnu 
--with-sysroot=/home/usb10132/x-tools/arm-vfp-linux-gnu/arm-vfp-linux-gnu/sys-root 
--enable-languages=c,c++ --disable-multilib --with-arch=armv5te 
--with-abi=atpcs --with-cpu=arm926ej-s --with-fpu=vfp --with-float=soft 
--with-gmp=/home/usb10132/x-tools/arm-vfp-linux-gnu 
--with-mpfr=/home/usb10132/x-tools/arm-vfp-linux-gnu 
--with-pkgversion=crosstool-NG-1.3.1 --enable-__cxa_atexit 
--with-local-prefix=/home/usb10132/x-tools/arm-vfp-linux-gnu/arm-vfp-linux-gnu/sys-root 
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 
--enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.3.2 (crosstool-NG-1.3.1)
configure:2661: $? = 0
configure:2668: 
/opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc 
-V >&5
arm-vfp-linux-gnu-gcc: '-V' option must have argument
configure:2671: $? = 1
configure:2694: checking for C compiler default output file name
configure:2721: 
/opt/nxp/gcc-4.3.2-glibc-2.7/arm-vfp-linux-gnu/../bin/arm-vfp-linux-gnu-gcc 
-isystem/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/include 
-O2 -g 
-isystem/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/include 
-L/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/lib 
-Wl,-rpath-link,/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/lib 
-Wl,-rpath,/home/raydan/work/oe/build-linux/tmp/staging/i686-linux/usr/lib 
-Wl,-O1 conftest.c  >&5
configure:2724: $? = 0
configure:2762: result: a.out
configure:2779: checking whether the C compiler works
configure:2789: ./a.out
/home/raydan/work/oe/build-linux/tmp/work/arm-oe-linux-gnueabi/module-init-tools-cross-3.2.2-r5/module-init-tools-3.2.2/configure: 
line 2790: ./a.out: cannot execute binary file
configure:2792: $? = 126
configure:2801: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
-----------------------------------------------------------------------------------------------------------

--
Best Regards,
Dmitry Vinokurov



  reply	other threads:[~2009-08-23  4:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20 13:01 LPC3250, helloworld-image, configure: error: cannot run C compiled programs Dmitry Vinokurov
2009-08-20 13:23 ` Holger Hans Peter Freyther
2009-08-20 13:26 ` Holger Hans Peter Freyther
2009-08-20 18:42   ` Dmitry Vinokurov
2009-08-21  1:10     ` Holger Hans Peter Freyther
2009-08-21  1:43     ` Holger Hans Peter Freyther
2009-08-22  7:18       ` Dmitry Vinokurov
2009-08-22  7:45         ` Dmitry Vinokurov
2009-08-22 23:17           ` Khem Raj
2009-08-23  4:17             ` Dmitry Vinokurov [this message]
2009-08-23  6:53               ` Khem Raj
2009-08-23 13:25                 ` Dmitry Vinokurov
2009-08-23 15:43                   ` Khem Raj
2009-08-25 17:47                     ` Dmitry Vinokurov
2009-08-29  9:09                       ` Dmitry Vinokurov
2009-08-24 12:34       ` Rolf Offermanns

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A90C2F4.1010300@gmail.com \
    --to=d.vinokuroff@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.