Crash in setup 2.427

Michael D. Crawford crawford@goingware.com
Mon Sep 13 15:24:00 GMT 2004


(A stream of consciousness transcript in which Mike gets a clue about 
using Setup...)

Larry Hall wrote:
> You might be getting caught by some arcane setup logic with dependencies.
> I'd recommend uninstalling all gcc packages and then reinstall all the ones
> you need together.  That should get you the versions you want.

That made sense, and I tried it, but I was unable to get all the gcc 
packages uninstalled.  I could remove most of them, but upon trying to 
remove the last one, setup would crash.

What I tried was to get all the components at version 3.3.3-3, which 
worked ok, and then to replace them all with version 3.4.1-1.  I could 
get most of it, but I could not get rid of this error message:

$ gcj Hello.java
/usr/lib/gcc/i686-pc-cygwin/3.4.1/../../../../i686-pc-cygwin/bin/ld: 
cannot find -lgcc

Looking through gcj --help, I found the following option:

$ gcj -print-libgcc-file-name
libgcc.a

Doing a search for libgcc.a at http://cygwin.com/packages/ I found that 
it should be in one of the following packages:

gcc/gcc-3.3.1-1
gcc/gcc-3.3.1-3
gcc-core/gcc-core-3.3.3-3
gcc-core/gcc-core-3.4.1-1

The only 3.4.1-1 version there is the package gcc-core.  But it looks 
like gcc-core is only source files.  In any case, installing it doesn't 
product libgcc.a.

However, look closely at the path in the error message:

/usr/lib/gcc/i686-pc-cygwin/3.4.1/

I don't think i686-pc-cygwin is what I want.  I'm trying to create a 
win32 binary.  I need to use -mno-cygwin on the gcj command line!  Now I 
get:

$ gcj -mno-cygwin Hello.java
/usr/lib/gcc/i686-pc-mingw32/3.4.1/../../../../i686-pc-mingw32/bin/ld: 
cannot find -lgcc

At some point I had libgcj.a installed in i686-pc-mingw32. 
Unfortunately, it went away.  Now let me see if I can get it back.

Just now I see that Yitzchak Scott-Thoennes wrote:

> Don't mess with the version numbers it shows you.  Use the ones it shows
> when the Curr(ent) radio button is selected or the ones it shows when
> the Exp(erimental) radio button is selected.

That looks like it might work.  Before I saw that, I had dropped back 
again to 3.3.3-3.  With the experimental button selected, I setup wants 
to install version 3.4.1-1 for gcc, gcc-core, gcc-g++ and gcc-java. 
gcc-mingw it wants to keep at 20040810-1.  It wants to install 
20040822-1 for gcc-mingw-core, gcc-mingw-g++, and gcc-mingw-java.

(Hopefully, he presses the Next button...  Installation complete...)

$ gcj -mno-cygwin Hello.java
/usr/lib/gcc/i686-pc-mingw32/3.4.1/../../../../i686-pc-mingw32/lib/libmingw32.a(
main.o)(.text+0x106):main.c: undefined reference to `WinMain@16'

Well that's progress.

$ gcj -mno-cygwin Hello.java -lm

Nope.  Try "man gcj":

$ gcj -mno-cygwin --main=Hello Hello.java
gcj: installation problem, cannot exec 'cc1': No such file or directory

I did "download from internet", selected the Exp button, and now the 
installer wants to download the binary for gcc-core 3.4.1-1.  I thought 
there was just source. Must have missed that before...

$ gcj -mno-cygwin --main=Hello Hello.java

mike@bjarne ~/IrateDev/Hello
$ ls
Hello.java  a.exe

mike@bjarne ~/IrateDev/Hello
$ ./a.exe
Hello, World!

Now to checkout the iRATE sources.  Taras Glek managed to built iRATE 
with gcj for Win32 last night, but I think he was doing the builds on 
Linux.

Success!

Thanks for your help, I appreciate it.

Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
crawford@goingware.com

     Tilting at Windmills for a Better Tomorrow.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list