www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/02/20:02:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 2 Apr 2004 20:02:20 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Hans Horn <hannes AT 2horns DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Loading gcc-compiled DLL with Java (JNI) crashes when using newer (>1.5.5) cygwin1.dll
In-Reply-To: <c4l05r$5d9$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.56.0404021957450.2840@slinky.cs.nyu.edu>
References: <404E2A9B DOT 10804 AT Proefrock DOT de> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040309160528 DOT 03d47338 AT 127 DOT 0 DOT 0 DOT 1> <404E3A33 DOT 4090805 AT Proefrock DOT de> <Pine DOT GSO DOT 4 DOT 56 DOT 0403091647360 DOT 18797 AT slinky DOT cs DOT nyu DOT edu> <c2nqv4$ieh$1 AT sea DOT gmane DOT org> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040310164105 DOT 03a223e0 AT 127 DOT 0 DOT 0 DOT 1> <c4l05r$5d9$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

FYI, there was no need for you to go to all this trouble.  You could have
instead installed the "gcc-mingw" and "mingw-runtime" packages via
Cygwin's setup, and gotten the same functionality via "gcc -mno-cygwin".

As long as your DLL doesn't use any of Cygwin's POSIX features, you should
be fine with a MinGW version (i.e., -mno-cygwin one).
	Igor

On Fri, 2 Apr 2004, Hans Horn wrote:

> Dear Group,
>
> I'd like to follow up on this seemingly abandoned thread.
>
> I just ran into the same problem as reported by Niklas.
>
> Googling around brought me to the idea to try to use mingw's gcc flavour
> to create the desired dll.
> I just downloaded and uncompressed four of the mingw packages mentioned
> on http://www.mingw.org/download.shtml (mingw-runtime, w32api, binutils
> and gcc tarball packages) and followed the hints given here:
> http://www.mingw.org/mingwfaq.shtml#faq-jni-dll, essentially,
>
> mingw-gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at -shared ...
>
> The JNI dll created this way works neatly (and doesn't make the JVM
> croak as the dll created using cygwin's gcc).
> This may be just a temporary work-around until cygwin's gcc is back on
> track, but at least one can live with it!
>
> cheers,
> Hans
>
> "Larry Hall" <cygwin-lh<at>cygwin<dot>com> wrote:
> > At 02:40 PM 3/10/2004, you wrote:
> > >Igor Pechtchanski wrote:
> > >
> > >>The core Cygwin DLL (/bin/cygwin1.dll) has no support for dynamic
> > >>loading. You may have been lucky before in that the functionality
> > >>you had in your DLL didn't require the loading of the core one.
> > >>Apparently this has changed between 1.5.5 and 1.5.7.
> > >
> > >Right. This seems to be, on the face of it, the same problem that bit
> > >the WinCVS users - WinCVS looks for a tcl84.dll in the PATH and
> > >automatically dynamically loads it, and if it happens to be a
> > >Cygwin-compiled one, it hangs. This also changed after 1.5.6 - before
> > >that, it would "work", for some definition of "working".
> > >
> > >Someone (I see eyes turning this way :-) needs to debug this, at
> > >least to understand what changed..
> >
> > Dynamic loading of cygwin1.dll has been broken for a very long time.
> > That doesn't mean it cannot be fixed.  Just that figuring out what
> > changed between 1.5.5 and 1.5.7 and reinstating it would not be a fix.
> > It's the Cygwin DLL initialization that needs attention really.  But I
> > do expect that everyone would like it if someone got this working
> > again. :-)

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

- Raw text -


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