delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/25/05:53:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Message-ID: <00ad01c45a9a$3e3ff9a0$7a81869f@elmoii>
From: "Alan Larkin" <nobrow AT eircom DOT net>
To: <cygwin AT cygwin DOT com>
References: <005301c459e6$1eeec090$5f8401c1 AT elmoii> <Pine DOT GSO DOT 4 DOT 58 DOT 0406240935120 DOT 28578 AT slinky DOT cs DOT nyu DOT edu> <004f01c459f5$05efd5c0$5f8401c1 AT elmoii> <Pine DOT GSO DOT 4 DOT 58 DOT 0406241022060 DOT 28578 AT slinky DOT cs DOT nyu DOT edu>
Subject: Re: Old Cygwin Versions -or- Elusive Compatability Problem
Date: Fri, 25 Jun 2004 10:52:28 +0100
MIME-Version: 1.0
X-IsSubscribed: yes

----- Original Message ----- 
From: "Igor Pechtchanski" <pechtcha AT cs DOT nyu DOT edu>
To: "Alan Larkin" <nobrow AT eircom DOT net>
Cc: <cygwin AT cygwin DOT com>
Sent: Thursday, June 24, 2004 3:29 PM
Subject: Re: Old Cygwin Versions -or- Elusive Compatability Problem


> On Thu, 24 Jun 2004, Alan Larkin wrote:
>
> > > FWIW, I didn't find a -Xrun flag in the Sun JDK.  I did find
a -Xrunhprof
> > > flag, which doesn't seem to allow running an external program...  You
> > > should let the list know if you're using another JDK.  BTW, from your
> > > description above, it's unclear whether you actually run an
executable, or
> > > dynamically load a DLL.  If the latter, you should know that the
Cygwin
> > > DLL is not amenable to dynamic loading, and there are no plans to fix
it
> > > ATM.
> >
> > I never noticed that its not in the help before, but I assure you that
Sun
> > JVMs support it (-Xrunhprof is a particular instance that loads
hprof.dll, a
> > profiler built in exactly the same manner as mine). Its a DLL. If I
invoke
> >
> > java -Xruncygforrest-0:<options> HelloWorld
> >
> > (or more simply
> >
> > java -Xruncygforrest-0:help
> >
> > to print out my profilers help message)
> >
> > the JVM looks for a hook in forrest.dll which sets things in motion. I
have
> > seen all sorts of crashes and error messages whilst developing this, but
its
> > just so queer to see nothing!
> >
> > The Cygwin DLL must be dynamically loading ...
> >
> > $ nm ./cygforrest-0.dll | grep -C 2 cygwin
> > 10047d40 B __bss_end__
> > 10043000 B __bss_start__
> > 10018630 T __cygwin_crt0_common AT 8
> > 10018030 T __cygwin_dll_entry AT 12
> > 10018100 T __cygwin_noncygwin_dll_entry AT 12
> > [snip]
> > 100185c0 T _cygwin_attach_dll
> > 100185b0 T _cygwin_detach_dll
> > [snip]
> > 10018330 T _dlclose
> >
> > Maybe this was possible up to but not after version 1.5.5? Might that be
the
> > cause?
> >
> > I appreciate your help,
> > Alan.
>
> Alan,
>
> Ok, I see now.  Well, the Cygwin DLL does pay lip service to dynamic
> loading (i.e., defines all the necessary methods and entry points), but
> it's never reliably loaded dynamically (i.e., via LoadLibrary or dlopen),
> since it doesn't perform the necessary initialization in that case.  This
> is a known problem, and, as I said above, nobody is working on resolving
> it, due to lack of interest.  Maybe you were just lucky that it worked
> with 1.5.5, e.g., the parts that weren't initialized properly weren't
> touched in what you used in your program, as they are now?  If you expect
> this to get fixed, you'll probably have to be the one to fix it[*].
> Sorry.
>
> FWIW, you could still try strace on the whole java process (it will, of
> course, only trace the Cygwin parts, but it might give you some clues).
> Igor
> [*] See <http://cygwin.com/contrib.html> for instructions on how to build
> Cygwin and submit patches.
> -- 
> 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
>
>

So, given that I dont know enough about the topic to be fixing this bug, the
only reliable solution is/might be to build without Cygwin (that
whole -mno-cygwin fiasco)?

Adding strace to the command causes errors...

$ strace java -Xruncygforrest-0:help
Registry key 'Software\JavaSoft\Java Runetime Environment\CurrentVersion'
has value '1.4', but '1.5' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.

Al.


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