public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: GCJ Error: undefined reference to `InterlockedIncrement@4'
@ 2000-02-09 10:46 Earnie Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Earnie Boyd @ 2000-02-09 10:46 UTC (permalink / raw)
  To: Gust, Micron, Cygwin@Sourceware.Cygnus.Com

--- "Gust, Micron" <MGust@RFC.com> wrote:
> Thanks Mumit.
> 
> I downloaded and tried to uncompress the file libkernel32.a.bz2, however, I
> get an error saying that "this doesn't look like a tar archive". Do you know
> why I cannot uncompress it? 
> 
> I'm typing this command:
> 
>    bunzip2 -c libkernel32.a.bz2 | tar xfv -
> 

Ummm... This isn't a tar file. Just `bunzip2 libkernel32.a.bz2' will get the
job done.  Duh... ;^)


=====
Earnie Boyd < mailto:earnie_boyd@yahoo.com >
Cygwin Newbies, please visit
< http://www.freeyellow.com/members5/gw32/index.html >
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GCJ Error: undefined reference to `InterlockedIncrement@4'
  2000-02-09  8:33 ` Mumit Khan
@ 2000-02-10  8:07   ` Jon Beniston
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Beniston @ 2000-02-10  8:07 UTC (permalink / raw)
  To: Gust, Micron, Mumit Khan; +Cc: Cygwin@Sourceware.Cygnus.Com

----- Original Message -----
From: Mumit Khan <khan@NanoTech.Wisc.EDU>
To: Gust, Micron <MGust@rfc.com>
Cc: Cygwin@Sourceware.Cygnus.Com <cygwin@sourceware.cygnus.com>;
<jb7216@bristol.ac.uk>
Sent: 09 February 2000 16:33
Subject: Re: GCJ Error: undefined reference to `InterlockedIncrement@4'


> "Gust, Micron" <MGust@RFC.com> writes:
> > I am having problems getting a very simple "Hello World" java class to
> > compile with gcj.
> >
> > When I try to compile the class file it gives me the error message
below.
> > I've also tried compiling the .java file and I got the same error. Can
> > anyone tell me what I'm doing wrong?
> >
> > FYI: I have installed:
> > 1) The full version of Cygwin B20.1
> > 2) GCC version 2.95.2 for Cygwin B20.x
> > 3) Libgcj for Win32
> >
> > Error Messages:
>
> --------------------------------------------------------------------------
--
> > -----------------
> > bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
> > /usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
> >
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
> > 0x142): undefined reference to `InterlockedIncrement@4'
> > /usr/local/lib/libgccgcj.a(frame.o): In function
`init_object_mutex_once':
> >
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
> > 4a): undefined reference to `InterlockedIncrement@4'
> > collect2: ld returned 1 exit status
>
> --------------------------------------------------------------------------
--
>
> Looks like the gcj specs is incorrect, and not linking in libkernel32.a
> which contains the missing symbol.
>
> Make sure you read up on Jon Beniston's web page on libgcj:
>
>    Linkname: Libgcj for Win32
>    URL: http://www.cs.bris.ac.uk/~jb7216/libgcj/
>
> He mentions some problems with the specs, and possibly also with
> libkernel32.a, and provides an alternative/fixed one.
>
> Jon, can you elaborate on the problem with libkernel32.a so I can
> fix it? Note that there is no GetFileAttributeEx exported by the
> kernel interface, but rather GetFileAttributeEx{A,W} for ASCII
> and Unicode.

Howdy,

Well, there appears to be two problems as far as I can tell, but I'm far
from an expert on how GCC links things. Firstly, I the orignal spec file
that comes with gcc produces something like

   ...  libkernel32.a ... libgcc.a

The libgcc.a references InterlockedIncrement (Used by the thread safe
exception handling stuff, gthr-win32.c) which is not getting picked up
because it isnt referenced until after the inclusion of libkernel32.

One of the other problems someone was experiencing was solved by me giving
him the same copy of the libkernel32.a that I am using. I'm not sure if
there are some versioning issues here or perhaps if mine / his is mangled in
some way. The libkernel32.a that I use is available on the Web site.

Also, I've just found out that there are some problems with downloading .bz2
files from the site as the server is sending them as text/plain. I'll try to
address this ASAP, but I don't run the server. Until then, I suggest people
use the gzips.

Jon.

>
> Regards,
> Mumit
>
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: GCJ Error: undefined reference to `InterlockedIncrement@4'
@ 2000-02-09 11:25 Gust, Micron
  0 siblings, 0 replies; 6+ messages in thread
From: Gust, Micron @ 2000-02-09 11:25 UTC (permalink / raw)
  To: Cygwin@Sourceware.Cygnus.Com

Thanks everyone, I got gcj to work.

I downloaded the new libkernel32.a and libgcj.spec today (2/9/2000) from Jon
Beniston's web page on libgcj  ( http://www.cs.bris.ac.uk/~jb7216/libgcj/ ).

I copied libkernel32.a to /cygnus/cygwin-b20/lib and libgcj.spec to
/usr/local/lib and now everything works.

Micron

-----Original Message-----
From: Mumit Khan [ mailto:khan@NanoTech.Wisc.EDU ]
Sent: Wednesday, February 09, 2000 10:33 AM
To: Gust, Micron
Cc: Cygwin@Sourceware.Cygnus.Com; jb7216@bristol.ac.uk
Subject: Re: GCJ Error: undefined reference to `InterlockedIncrement@4' 


"Gust, Micron" <MGust@RFC.com> writes:
> I am having problems getting a very simple "Hello World" java class to
> compile with gcj.
> 
> When I try to compile the class file it gives me the error message below.
> I've also tried compiling the .java file and I got the same error. Can
> anyone tell me what I'm doing wrong? 
> 
> FYI: I have installed:
> 1) The full version of Cygwin B20.1
> 2) GCC version 2.95.2 for Cygwin B20.x
> 3) Libgcj for Win32
> 
> Error Messages:
>
----------------------------------------------------------------------------
> -----------------
> bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
> /usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
> 0x142): undefined reference to `InterlockedIncrement@4'
> /usr/local/lib/libgccgcj.a(frame.o): In function `init_object_mutex_once':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
> 4a): undefined reference to `InterlockedIncrement@4'
> collect2: ld returned 1 exit status
>
----------------------------------------------------------------------------

Looks like the gcj specs is incorrect, and not linking in libkernel32.a
which contains the missing symbol.

Make sure you read up on Jon Beniston's web page on libgcj:

   Linkname: Libgcj for Win32
   URL: http://www.cs.bris.ac.uk/~jb7216/libgcj/

He mentions some problems with the specs, and possibly also with 
libkernel32.a, and provides an alternative/fixed one.

Jon, can you elaborate on the problem with libkernel32.a so I can
fix it? Note that there is no GetFileAttributeEx exported by the
kernel interface, but rather GetFileAttributeEx{A,W} for ASCII
and Unicode. 

Regards,
Mumit

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: GCJ Error: undefined reference to `InterlockedIncrement@4'
@ 2000-02-09  9:16 Gust, Micron
  0 siblings, 0 replies; 6+ messages in thread
From: Gust, Micron @ 2000-02-09  9:16 UTC (permalink / raw)
  To: Cygwin@Sourceware.Cygnus.Com

Thanks Mumit.

I downloaded and tried to uncompress the file libkernel32.a.bz2, however, I
get an error saying that "this doesn't look like a tar archive". Do you know
why I cannot uncompress it? 

I'm typing this command:

   bunzip2 -c libkernel32.a.bz2 | tar xfv -

Thanks,

Micron

-----Original Message-----
From: Mumit Khan [ mailto:khan@NanoTech.Wisc.EDU ]
Sent: Wednesday, February 09, 2000 10:33 AM
To: Gust, Micron
Cc: Cygwin@Sourceware.Cygnus.Com; jb7216@bristol.ac.uk
Subject: Re: GCJ Error: undefined reference to `InterlockedIncrement@4' 


"Gust, Micron" <MGust@RFC.com> writes:
> I am having problems getting a very simple "Hello World" java class to
> compile with gcj.
> 
> When I try to compile the class file it gives me the error message below.
> I've also tried compiling the .java file and I got the same error. Can
> anyone tell me what I'm doing wrong? 
> 
> FYI: I have installed:
> 1) The full version of Cygwin B20.1
> 2) GCC version 2.95.2 for Cygwin B20.x
> 3) Libgcj for Win32
> 
> Error Messages:
>
----------------------------------------------------------------------------
> -----------------
> bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
> /usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
> 0x142): undefined reference to `InterlockedIncrement@4'
> /usr/local/lib/libgccgcj.a(frame.o): In function `init_object_mutex_once':
>
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
> 4a): undefined reference to `InterlockedIncrement@4'
> collect2: ld returned 1 exit status
>
----------------------------------------------------------------------------

Looks like the gcj specs is incorrect, and not linking in libkernel32.a
which contains the missing symbol.

Make sure you read up on Jon Beniston's web page on libgcj:

   Linkname: Libgcj for Win32
   URL: http://www.cs.bris.ac.uk/~jb7216/libgcj/

He mentions some problems with the specs, and possibly also with 
libkernel32.a, and provides an alternative/fixed one.

Jon, can you elaborate on the problem with libkernel32.a so I can
fix it? Note that there is no GetFileAttributeEx exported by the
kernel interface, but rather GetFileAttributeEx{A,W} for ASCII
and Unicode. 

Regards,
Mumit

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GCJ Error: undefined reference to `InterlockedIncrement@4'
  2000-02-09  8:15 Gust, Micron
@ 2000-02-09  8:33 ` Mumit Khan
  2000-02-10  8:07   ` Jon Beniston
  0 siblings, 1 reply; 6+ messages in thread
From: Mumit Khan @ 2000-02-09  8:33 UTC (permalink / raw)
  To: Gust, Micron; +Cc: Cygwin@Sourceware.Cygnus.Com, jb7216

"Gust, Micron" <MGust@RFC.com> writes:
> I am having problems getting a very simple "Hello World" java class to
> compile with gcj.
> 
> When I try to compile the class file it gives me the error message below.
> I've also tried compiling the .java file and I got the same error. Can
> anyone tell me what I'm doing wrong? 
> 
> FYI: I have installed:
> 1) The full version of Cygwin B20.1
> 2) GCC version 2.95.2 for Cygwin B20.x
> 3) Libgcj for Win32
> 
> Error Messages:
> ----------------------------------------------------------------------------
> -----------------
> bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
> /usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
> /usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
> 0x142): undefined reference to `InterlockedIncrement@4'
> /usr/local/lib/libgccgcj.a(frame.o): In function `init_object_mutex_once':
> /usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
> 4a): undefined reference to `InterlockedIncrement@4'
> collect2: ld returned 1 exit status
> ----------------------------------------------------------------------------

Looks like the gcj specs is incorrect, and not linking in libkernel32.a
which contains the missing symbol.

Make sure you read up on Jon Beniston's web page on libgcj:

   Linkname: Libgcj for Win32
   URL: http://www.cs.bris.ac.uk/~jb7216/libgcj/

He mentions some problems with the specs, and possibly also with 
libkernel32.a, and provides an alternative/fixed one.

Jon, can you elaborate on the problem with libkernel32.a so I can
fix it? Note that there is no GetFileAttributeEx exported by the
kernel interface, but rather GetFileAttributeEx{A,W} for ASCII
and Unicode. 

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* GCJ Error: undefined reference to `InterlockedIncrement@4'
@ 2000-02-09  8:15 Gust, Micron
  2000-02-09  8:33 ` Mumit Khan
  0 siblings, 1 reply; 6+ messages in thread
From: Gust, Micron @ 2000-02-09  8:15 UTC (permalink / raw)
  To: Cygwin@Sourceware.Cygnus.Com

I am having problems getting a very simple "Hello World" java class to
compile with gcj.

When I try to compile the class file it gives me the error message below.
I've also tried compiling the .java file and I got the same error. Can
anyone tell me what I'm doing wrong? 

FYI: I have installed:
1) The full version of Cygwin B20.1
2) GCC version 2.95.2 for Cygwin B20.x
3) Libgcj for Win32

Error Messages:
----------------------------------------------------------------------------
-----------------
bash-2.02$ gcj -mno-cygwin --main=Hello -o Hello Hello.class
/usr/local/lib/libgccgcj.a(_eh.o): In function `eh_context_initialize':
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/libgcc2.c(.text+
0x142): undefined reference to `InterlockedIncrement@4'
/usr/local/lib/libgccgcj.a(frame.o): In function `init_object_mutex_once':
/usr/local/build/gcc-2.95.2/gcc/../../../src/gcc-2.95.2/gcc/frame.c(.text+0x
4a): undefined reference to `InterlockedIncrement@4'
collect2: ld returned 1 exit status
----------------------------------------------------------------------------
-----------------

Hello.java
--------------------------------------------------
public class Hello {

    public static void main (String[] args) {
        System.out.println ("Hello World");
    }
}
--------------------------------------------------

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-02-10  8:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-09 10:46 GCJ Error: undefined reference to `InterlockedIncrement@4' Earnie Boyd
  -- strict thread matches above, loose matches on Subject: below --
2000-02-09 11:25 Gust, Micron
2000-02-09  9:16 Gust, Micron
2000-02-09  8:15 Gust, Micron
2000-02-09  8:33 ` Mumit Khan
2000-02-10  8:07   ` Jon Beniston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).