Re: "cannot run C compiled programs" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 April 2011 00:20, Anna Ceguerra wrote:
> Hi Ian,
>
> Thanks for your reply.
>
> You're right I haven't built the required libraries using --disable-shared,
> but I did attempt to build gcc by passing the library location as arguments.

That's not enough, see the description of --with-gmp in the installation docs.

It's simpler if gmp and the other libs are not linked to dynamically,
which means you should build them with --disable-shared, or even
simpler, just put the gmp sources under the gcc source tree (in a
directory called just 'gmp') and similarly for mpfr and mpc.


> A search for the word error in config.log finds the following:

Searching for 'error' is a waste of time, the configure script works
by trying lots of things, then based on what works and what doesn't it
sets up the build makefiles for your system.  That means the word
error will occur in places where things don't work, but that's not a
problem.  Only the specific error message from the fatal error matters
("cannot run C compiled programs")


> configure:3028: /Users/anna/Documents/programs/GCC/GCC/build/./gcc/xgcc
> -B/Users/anna/Documents/programs/GCC/GCC/build/./gcc/
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/bin
> /
> -B/Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/lib
> / -isystem
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/inclu
> de -isystem
> /Users/anna/Documents/programs/GCC/GCC/install/i386-apple-darwin10.7.0/sys-i
> nclude  -m64 -V >&5
> xgcc: error: unrecognized option '-V'
> xgcc: fatal error: no input files
> compilation terminated.
>
> ...
>
> configure:3166: checking whether the C compiler works
> configure:3175: ./a.out
> ../../../../gcc-4.6-20110408/libgcc/configure: line 3177: ./a.out: Bad CPU
> type in executable

I'm not sure what this error means - do you have a working gcc
installed that can actually compile successfully for your system?


> configure:3179: $? = 126
> configure:3186: error: in
> `/Users/anna/Documents/programs/GCC/GCC/build/i386-apple-darwin10.7.0/x86_64
> /libgcc':
> configure:3190: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux