Cross compiler error

Programming, for all ages and all languages.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Cross compiler error

Post by suthers »

I've been trying to build one again....
Every time I try to build it (except for the first time I did it were it worked fine but I made a mistake in the setup...), I get the error: 'C compiler cannot build executables...", a cygcheck -c reveals that:
libecpg-compat1
libecpg4
libecpg5
libpgtypes1
postgresql-contrib
postgresql-plperl
postgresql-plpython
xorg-x11-bin
xorg-x11-f100
xorg-x11-fcyr
xorg-x11-fnts
are 'incomplete'.
I don't think any of these would cause this error...
Anybody know what's causing the error.
Thanks in advance,

Jules
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

What does your path and configure log say?
Is it binutils or GCC that fails?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

The part of the config log where the error occurs says:

Code: Select all

configure:2820: checking for gcc
configure:2836: found /usr/bin/gcc
configure:2846: result: gcc
configure:3090: checking for C compiler version
configure:3093: gcc --version </dev/null >&5
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 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:3096: $? = 0
configure:3098: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
configure:3101: $? = 0
configure:3103: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:3106: $? = 1
configure:3129: checking for C compiler default output file name
configure:3132: gcc    conftest.c  >&5
configure:3135: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3174: error: C compiler cannot create executables
All that tells me is that configure tested gcc and it failed to compile the test program...
Thanks in advance,

Jules
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

I suspect your first attempt borked your setup. Unless your Cygwin setup is somehow precious to you, I would suggest uninstall / reinstall of Cygwin.
Every good solution is obvious once you've found it.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Yah thats what people keep saying about it...
But its a bit weird its a fresh install and in the last few month it must be at least the 50th time I've fresh installed it and it only ever worked the first time.... (But I made a mistake in the build....)
Jules
User avatar
inx
Member
Member
Posts: 142
Joined: Wed Mar 05, 2008 12:52 am

Post by inx »

I haven't encountered that one on Cygwin, but I know the error about GCC not being able to produce executables on Ubuntu and Debian is usually caused by glibc-dev not being installed by default. Perhaps the dev headers for glibc are missing?
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Em... I would try and install it, but I couldn't figure it out....
I tried finding it in the cygwin installer and google search, but it wasn't in the first and I couldn't find it on google, most of the search results (whatever search criteria I try), are installations for other packages that say that glibc-dev is necessary for this packages....
Any help?
Thanks in advance,

Jules
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

You haven't yet answered all my questions:
What does your path and configure log say?
Is it binutils or GCC that fails?
And a new one, when you reinstall cygwin, did you physically delete all files and folders from the cygwin installation?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

I already pasted what the config log said in one off my previous pastes (though I don't think you'd make a mistake/miss it so I'm probably pasting the wrong log...)
It fails during the build of GCC and of binutils...
And I've done both I've re-installed over a past copy and I've tried to re-install from scratch (I went to the point of using eraser to replace the deleted files on the disk with garbage data...., yah that is paranoid...).
It only ever worked the first time I installed GCC, but that time, I messed up the config process, so I got a compiler that gave loads of error like this one:
junk at end of line, first unrecognized character is ','
So I tried to redo it, but I've never been able to redo it, I've always had this error and as you can see, I've gone to some pretty desperate measures to get it working, but nothing worked....
Thanks in advance,

Jules
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

I still don't see the system path :?
suthers wrote:It fails during the build of GCC and of binutils...
You can't build GCC before having the appropriate binutils.

edit: run this in cygwin and post the results

Code: Select all

echo $PATH
which gcc
which as
which ld
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Ok so I did this and it gave me:

Code: Select all


Jules@n-6605640dd7c24 ~
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINDOWS/system32:/cygdri
ve/c/WINDOWS:/cygdrive/c/WINDOWS/system32/WBEM:/cygdrive/c/Program Files/Samsung
/Samsung PC Studio 3/:/usr/lib/lapack

Jules@n-6605640dd7c24 ~
$ which gcc
/usr/bin/gcc

Jules@n-6605640dd7c24 ~
$ which as
/usr/bin/as

Jules@n-6605640dd7c24 ~
$ which ld
/usr/bin/ld
This is a really weird problem...
Thanks for the help,

Jules
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

I don't see how any of this helps, though it does confirm that they are present... (Still haven't resolved this problem...)
Thanks in advance,

Jules
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Cross compiler error

Post by Combuster »

I was basically wondering if you had a conflicting GCC install somewhere that was messing you up.

Other than that, it might help to run the programs yourself and see what they actually do. If you have a DLL conflict that might show up that way. In other words, go debug GCC itself :wink:

To be honest, I've pretty much ran out of ideas that could solve your problem. Assuming of course that you did read and follow the tutorial to the letter.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Re: Cross compiler error

Post by suthers »

I followed it to the letter, so i'll try to debug it manually....
Thanks in advance,,
Jules
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Re: Cross compiler error

Post by suthers »

Damn it, I've been trying to repair this for ages, and I can't continue my OS project without a cross compiler....
I really don't know what to do anymore....
Jules

edit: update: I've been trying all day, I don't know what to do anymore, I think I might quit my OS project, because I've been at a stand still for nearly two weeks now...
Post Reply