----- Original Message ----- From: "Igor Pechtchanski" <[EMAIL PROTECTED]> To: "Alan Larkin" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] > > 10018030 T [EMAIL PROTECTED] > > 10018100 T [EMAIL PROTECTED] > > [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/ > |\ _,,,---,,_ [EMAIL PROTECTED] > ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] > |,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/