* C compiler cannot create executables
@ 2002-06-21 8:59 Peter
2002-06-22 8:07 ` Elias Athanasopoulos
2002-06-23 21:23 ` lawson_whitney
0 siblings, 2 replies; 6+ messages in thread
From: Peter @ 2002-06-21 8:59 UTC (permalink / raw)
To: linux-newbie
Hi,
trying to configure a program I get the following message and .configure
stops.
checking for C compiler default output... configure: error: C compiler cannot
create executables
What has to be done to correct this?
Thanks & regards
--
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C compiler cannot create executables
2002-06-21 8:59 Peter
@ 2002-06-22 8:07 ` Elias Athanasopoulos
2002-06-23 21:23 ` lawson_whitney
1 sibling, 0 replies; 6+ messages in thread
From: Elias Athanasopoulos @ 2002-06-22 8:07 UTC (permalink / raw)
To: Peter; +Cc: linux-newbie
On Fri, Jun 21, 2002 at 04:59:27PM +0800, Peter wrote:
> Hi,
> trying to configure a program I get the following message and .configure
> stops.
>
> checking for C compiler default output... configure: error: C compiler cannot
> create executables
>
> What has to be done to correct this?
Do this:
% echo "int main(void) { return 1; }" > foo.c && gcc foo.c -o foo ; ./foo
If you get any errors check for your gcc installation.
Elias
--
http://gnewtellium.sourceforge.net MP3 is not a crime.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C compiler cannot create executables
2002-06-21 8:59 Peter
2002-06-22 8:07 ` Elias Athanasopoulos
@ 2002-06-23 21:23 ` lawson_whitney
1 sibling, 0 replies; 6+ messages in thread
From: lawson_whitney @ 2002-06-23 21:23 UTC (permalink / raw)
To: pfheiss; +Cc: linux-newbie
On Fri, 21 Jun 2002, Peter wrote:
> Hi,
> trying to configure a program I get the following message and .configure
> stops.
>
> checking for C compiler default output... configure: error: C compiler cannot
> create executables
>
> What has to be done to correct this?
>
> Thanks & regards
>
At a guess, you are missing the binutils package.
Lawson
---oops---
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 6+ messages in thread
* C compiler cannot create executables
@ 2008-12-17 15:49 Claudiu mdc
2008-12-17 16:14 ` Koen Kooi
0 siblings, 1 reply; 6+ messages in thread
From: Claudiu mdc @ 2008-12-17 15:49 UTC (permalink / raw)
To: openembedded-devel
hi, I am trying to build bootstrap-image and I have this error when building libtool-cross:
| checking for i686-linux-gcc... i686-linux-gcc-4.3.1 -mcpu=pentiumpro
| checking for C compiler default output file name...
| configure: error: C compiler cannot create executables
| See `config.log' for more details.
I've built a custom toolchain which is in $PATH.
~/oe$ i686-linux<TAB><TAB> gives this output:
i686-linux-addr2line i686-linux-gccbug i686-linux-ranlib
i686-linux-ar i686-linux-gcov i686-linux-readelf
i686-linux-as i686-linux-gprof i686-linux-real-ld
i686-linux-c++filt i686-linux-i686-linux-gcc i686-linux-size
i686-linux-cpp i686-linux-ld i686-linux-strings
i686-linux-g++ i686-linux-nm i686-linux-strip
i686-linux-gcc i686-linux-objcopy
i686-linux-gcc-4.3.1 i686-linux-objdump
I've also tested the toolchain with hello.c program:
# ----------------------
#include<stdio.h>
int main(void)
{
printf("Hello World!\n");
return 0;
}
# ----------------------
~/tmpHello$ i686-linux-gcc-4.3.1 hello.c -o hello
and it works.
so, I don't understand why compile task fails with this error.
Some bits abountmy configuration:
I use org.openembedded.stable branch
Some lines from my local.conf:
MACHINE = "i686-generic"
TARGET_OS = "linux"
DISTRO = "unmaintained/generic"
ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}gcc"
ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}g++"
PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
###### stuff I added
TARGET_LDFLAGS_prepend = ", -L/home/claudiu/oe/myToolchain/cross/lib \
-Wl,-rpath-link,/home/claudiu/oe/myToolchain/cross/lib -Wl,-rpath-link "
TARGET_CPPFLAGS_append = ", -I/home/claudiu/oe/myToolchain/cross/include "
export CC="${CCACHE}i686-linux-gcc-4.3.1 ${HOST_CC_ARCH}"
export CXX="${CCACHE}i686-linux-g++ ${HOST_CC_ARCH}"
export CPP="i686-linux-gcc-4.3.1 -E"
export LD="i686-linux-ld"
export AR="i686-linux-ar"
export AS="i686-linux-as"
export RANLIB="i686-linux-ranlib"
export STRIP="i686-linux-strip"
Someone can help me?
From gcho-openembedded-devel@m.gmane.org Wed Dec 17 17:04:34 2008
Received: from [80.91.229.2] (helo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C compiler cannot create executables
2008-12-17 15:49 C compiler cannot create executables Claudiu mdc
@ 2008-12-17 16:14 ` Koen Kooi
2008-12-18 16:58 ` claudiu
0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2008-12-17 16:14 UTC (permalink / raw)
To: openembedded-devel
On 17-12-08 16:49, Claudiu mdc wrote:
> hi, I am trying to build bootstrap-image and I have this error when building libtool-cross:
> | checking for i686-linux-gcc... i686-linux-gcc-4.3.1 -mcpu=pentiumpro
> | checking for C compiler default output file name...
> | configure: error: C compiler cannot create executables
> | See `config.log' for more details.
First: what does config.log say? (it's somewhere in
work/i686*/libtool-cross/*)
> I use org.openembedded.stable branch
>
> Some lines from my local.conf:
> MACHINE = "i686-generic"
> TARGET_OS = "linux"
> DISTRO = "unmaintained/generic"
Secondly, you can't build for x86 using the generic distro because of
namespace clashes. Try using angstrom-2007.1.
regards,
Koen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: C compiler cannot create executables
2008-12-17 16:14 ` Koen Kooi
@ 2008-12-18 16:58 ` claudiu
0 siblings, 0 replies; 6+ messages in thread
From: claudiu @ 2008-12-18 16:58 UTC (permalink / raw)
To: openembedded-devel
Koen Kooi <k.kooi <at> student.utwente.nl> writes:
>
> On 17-12-08 16:49, Claudiu mdc wrote:
> > hi, I am trying to build bootstrap-image and I have this error when building
libtool-cross:
> > | checking for i686-linux-gcc... i686-linux-gcc-4.3.1 -mcpu=pentiumpro
> > | checking for C compiler default output file name...
> > | configure: error: C compiler cannot create executables
> > | See `config.log' for more details.
>
> First: what does config.log say? (it's somewhere in
> work/i686*/libtool-cross/*)
>
> > I use org.openembedded.stable branch
> >
> > Some lines from my local.conf:
> > MACHINE = "i686-generic"
> > TARGET_OS = "linux"
> > DISTRO = "unmaintained/generic"
>
> Secondly, you can't build for x86 using the generic distro because of
> namespace clashes. Try using angstrom-2007.1.
>
> regards,
>
> Koen
>
Thank you Koen for the answer. I followed your istructions,
I tryed to use "angstrom-2007.1" DISTRO as you told me, but there are
2 different behaviours depending of kind of building:
>>> if I build a SINGLE PACKAGE (-b option)
for example:
~/oe$ bitbake -b myPackages/myhelloworld/myhelloworld_0.1.bb -DD
variables are exported CORRECTLY (with i686-linux- prefix)
some examples:
+ export LD=i686-linux-ld
+ LD=i686-linux-ld
+ export 'CC=i686-linux-gcc-4.3.1 -mcpu=pentiumpro'
+ CC='i686-linux-gcc-4.3.1 -mcpu=pentiumpro'
+ export STRIP=i686-linux-strip
+ STRIP=i686-linux-strip
+ export RANLIB=i686-linux-ranlib
+ RANLIB=i686-linux-ranlib
these i686-linux-* are in ~/oe/myToolchain/cross/bin directory
which is in my $PATH
but the build fails with: | i686-linux-gcc-4.3.1: Success
| + cd
/home/claudiu/oe/oetmp/work/i686-angstrom-linux/myhelloworld-0.1-r0/
myhelloworld-0.1
| + do_compile
| + i686-linux-gcc-4.3.1 -mcpu=pentiumpro
-isystem/home/claudiu/oe/oetmp/staging/i686-angstrom-linux/include,
-I/home/claudiu/oe/myToolchain/cross/include -fexpensive-optimizations
-fomit-frame-pointer -frename-registers -Os ,
-L/home/claudiu/oe/myToolchain/cross/lib
-Wl,-rpath-link,/home/claudiu/oe/myToolchain/cross/lib -Wl,-rpath-link
-L/home/claudiu/oe/oetmp/staging/i686-angstrom-linux/lib
-Wl,-rpath-link,/home/claudiu/oe/oetmp/staging/i686-angstrom-linux/lib -Wl,-O1
/home/claudiu/oe/oetmp/work/i686-angstrom-linux/myhelloworld-0.1-r0/
myhelloworld.c -o myhelloworld
| i686-linux-gcc-4.3.1: Success
NOTE: Task failed:
/home/claudiu/oe/oetmp/work/i686-angstrom-linux/myhelloworld-0.1-r0/temp/
log.do_compile.18268
NOTE: package myhelloworld-0.1-r0: task do_compile: failed
>>> if I build bootstrap-image or other package in the metadata
WITHOUT -b option
for example: ~/oe$ bitbake bootstrap-image -DD
variables are exported WRONGLY (WITHOUT i686-linux-
prefix, even if in local.conf I specified the prefix, see the first
post), because I want to use my toolchain. Some examples:
+ export LD=ld
+ LD=ld
+ export CC=gcc
+ CC=gcc
+ export RANLIB=ranlib
+ RANLIB=ranlib
+ export CXX=g++
+ CXX=g++
the build fails on "shasum-native" with: | collect2: cannot find 'ld'
| + export BUILD_STRIP=strip
| + BUILD_STRIP=strip
| + cd /home/claudiu/oe/oetmp/work/i686-linux/shasum-native-1.0-r1
| + do_compile
| + gcc -isystem/home/claudiu/oe/oetmp/staging/i686-linux/include -Os
-isystem/home/claudiu/oe/oetmp/staging/i686-linux/include -o oe_sha256sum
main.c sha256.c
| collect2: cannot find 'ld'
NOTE: Task failed:
/home/claudiu/oe/oetmp/work/i686-linux/shasum-native-1.0-r1/temp/
log.do_compile.18246
NOTE: package shasum-native-1.0-r1: task do_compile: failed
Otherwise, if I still use "generic" DISTRO, I have the error specified in
the first post.
The config.log (placed in :
oe/oetmp/work/i686-linux/libtool-cross-1.5.10-r9/temp/log.do_configure.5538)
says the same things as above in the first post. It ends with these lines:
...
configure: loading site script
/home/claudiu/oe/stuff/org.openembedded.stable/site/endian-little
configure: loading site script
/home/claudiu/oe/stuff/org.openembedded.stable/site/common-glibc
configure: loading site script
/home/claudiu/oe/stuff/org.openembedded.stable/site/ix86-common
configure: loading site script
/home/claudiu/oe/stuff/org.openembedded.stable/site/common
configure: loading site script
/home/claudiu/oe/stuff/org.openembedded.stable/site/common
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-linux-gcc... i686-linux-gcc-4.3.1 -mcpu=pentiumpro
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
FATAL: oe_runconf failed
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-18 17:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-17 15:49 C compiler cannot create executables Claudiu mdc
2008-12-17 16:14 ` Koen Kooi
2008-12-18 16:58 ` claudiu
-- strict thread matches above, loose matches on Subject: below --
2002-06-21 8:59 Peter
2002-06-22 8:07 ` Elias Athanasopoulos
2002-06-23 21:23 ` lawson_whitney
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.