delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/10/11:01:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <000201bf73e0$efdbef20$010010ac@brookfield.net>
Reply-To: "Jon Beniston" <jb7216 AT bristol DOT ac DOT uk>
From: "Jon Beniston" <jon AT sentinelware DOT freeserve DOT co DOT uk>
To: "Gust, Micron" <MGust AT rfc DOT com>, "Mumit Khan" <khan AT NanoTech DOT Wisc DOT EDU>
Cc: "Cygwin AT Sourceware DOT Cygnus DOT Com" <cygwin AT sourceware DOT cygnus DOT com>
References: <200002091633 DOT KAA11055 AT hp2 DOT xraylith DOT wisc DOT edu>
Subject: Re: GCJ Error: undefined reference to `InterlockedIncrement AT 4'
Date: Wed, 9 Feb 2000 17:51:07 -0000
Organization: Sentinelware Developments
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300

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


> "Gust, Micron" <MGust AT RFC DOT 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 AT 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 AT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019