This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: "cannot run C compiled programs" error
- From: Anna Ceguerra <anna dot ceguerra at sydney dot edu dot au>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: kevin diggs <diggskevin38 at gmail dot com>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 19 Apr 2011 12:06:07 +1000
- Subject: Re: "cannot run C compiled programs" error
Hi Ian,
>
>> It's trying to generate from conftest.c, which I can't find either.
>
> You should be able to see the exact conftest.c in the config.log file.
I don't see any source code for that error in the config.log file - unless
I'm looking at the wrong place? I'm assuming that it would be located close
to the error.
>
> In any case, the question here is how to get your assembler to generate
> 32-bit code. Try "man as" to see if there is a special option. Try
>From the man pages, I don't see an option to generate 32-bit code in the
assembler (/usr/bin/as, Mac OS X Mach-O GNU-based assemblers, version 1.38)
> running your newly built gcc with the -v option to see how it is
> invoking the assembler. Perhaps gcc needs to pass some option that it
> is failing to pass.
./xgcc -B. -v simple.s
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: i386-apple-darwin10.7.0
Configured with: ../gcc-4.6-20110408/configure
--prefix=/Users/anna/Documents/programs/GCC/GCC/install
--with-gmp=/Users/anna/Documents/programs/GCC/GCC/libs/install
--with-mpfr=/Users/anna/Documents/programs/GCC/GCC/libs/install
--with-mpc=/Users/anna/Documents/programs/GCC/GCC/libs/install
--disable-checking --enable-werror --enable-languages=c : (reconfigured)
../gcc-4.6-20110408/configure
--prefix=/Users/anna/Documents/programs/GCC/GCC/install
--with-gmp=/Users/anna/Documents/programs/GCC/GCC/libs/install
--with-mpfr=/Users/anna/Documents/programs/GCC/GCC/libs/install
--with-mpc=/Users/anna/Documents/programs/GCC/GCC/libs/install
--disable-checking --enable-werror --enable-languages=c
--disable-libquadmath
Thread model: posix
gcc version 4.6.1 20110408 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.7' '-B' '.' '-v'
'-mtune=core2'
./as -arch i386 -force_cpusubtype_ALL -o
/var/folders/LB/LB53UltDE+SWFhXabsYXkU+++TM/-Tmp-//ccfwTZHX.o simple.s
COMPILER_PATH=./
LIBRARY_PATH=./:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.7' '-B' '.' '-v'
'-mtune=core2'
./collect2 -dynamic -arch i386 -macosx_version_min 10.6.7
-weak_reference_mismatches non-weak -o a.out -lcrt1.10.5.o -L.
/var/folders/LB/LB53UltDE+SWFhXabsYXkU+++TM/-Tmp-//ccfwTZHX.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 4.6.1 20110408 (prerelease) (i686 Darwin)
./collect-ld -dynamic -arch i386 -macosx_version_min 10.6.7
-weak_reference_mismatches non-weak -o a.out -lcrt1.10.5.o -L.
/var/folders/LB/LB53UltDE+SWFhXabsYXkU+++TM/-Tmp-//ccfwTZHX.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld PROJECT:ld64-97.17
Library search paths:
.
/usr/lib
/usr/local/lib
Framework search paths:
/Library/Frameworks/
/System/Library/Frameworks/
Thanks and regards,
Anna.