Page 1 of 2

Cross compiler error

Posted: Mon Jun 09, 2008 11:42 am
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

Posted: Mon Jun 09, 2008 2:50 pm
by Combuster
What does your path and configure log say?
Is it binutils or GCC that fails?

Posted: Mon Jun 09, 2008 3:55 pm
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

Posted: Tue Jun 10, 2008 12:21 am
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.

Posted: Tue Jun 10, 2008 3:51 am
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

Posted: Tue Jun 10, 2008 9:59 am
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?

Posted: Wed Jun 11, 2008 2:25 pm
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

Posted: Wed Jun 11, 2008 2:54 pm
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?

Posted: Wed Jun 11, 2008 3:19 pm
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

Posted: Thu Jun 12, 2008 3:11 am
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

Posted: Thu Jun 12, 2008 12:05 pm
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

Posted: Sun Jun 15, 2008 2:15 pm
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

Re: Cross compiler error

Posted: Thu Jun 19, 2008 4:21 am
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.

Re: Cross compiler error

Posted: Sat Jun 21, 2008 6:27 pm
by suthers
I followed it to the letter, so i'll try to debug it manually....
Thanks in advance,,
Jules

Re: Cross compiler error

Posted: Tue Jul 08, 2008 1:37 pm
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...