Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <035301c10410$41c67ec0$806410ac@local> From: "Robert Collins" To: "Julian Hall" , , References: <3B421165 DOT 1D114955 AT acris DOT co DOT uk> Subject: Re: Compiling libgjc under cygwin Date: Wed, 4 Jul 2001 08:33:59 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-OriginalArrivalTime: 03 Jul 2001 22:21:26.0944 (UTC) FILETIME=[802B0200:01C1040E] ----- Original Message ----- From: "Julian Hall" To: ; Sent: Wednesday, July 04, 2001 4:39 AM Subject: Compiling libgjc under cygwin > Hi; I know that for the moment this is unsupported but I'm trying to get > libgjc from the gcc-3.0 distribution to compile in a cygwin environment. What target do you have (win32/mingw | cygwin | unix*) ? > I've figured out the following: > > - I've looked at win32-threads.cc and the threads porting documentation, > and guess from the looks of it that it should work OK as distributed (?) Ah, no. Cygwin != win32. On cygwin, to ensure that fork() and fork() dependant calls work properly I strongly recommend the use of pthreads. Some serious bugs and have been corrected recently so they should :} be working fine. Speed wise they are now comparable to the win32-pthreads library. win32 threads _may_ work, but no guarantees. > - I modified configure so that it would recognise gcc's win32 thread > model and choose win32-threads.cc > - The resulting makefile had java.awt packages that failed to compile, > so I simply removed all of the awt and related sources. I think the > compilation errors here were due to the case-insensitivity of the file > system: they were effectively errors about duplicate class definitions > in (eg) image.java and Image.java. There were patches posted by me and another cygwinner whose name escapes me (sorry!) about 4-5 months ago. Search for cygwin in the java list archives. I go the filename issues fixed at that point. Unfortunately the patches weren't really ready for integration - they would likely have destabilised unix platforms. Some enthusatic cygwin + java person probably needs to hop on and stay on the java list. > - java/util/natGregorianCalendar.cc wasn't compiling correctly; I had to > forcibly undefine HAVE_TIMEZONE to persuade it to work, as the > definition of 'timezone' it used was incompatible with the cygwin > definition. There are patches that dont' require breaking unix for this. > - Fastjar required patching in order to function correctly; the patch I > applied is attached, and simply causes files to be opened with the > O_BINARY flag if it is defined. I don't think we had tackled that (bin mounts were used) - thanks for the patches. > However, I am still faced with compile errors when it comes to linking > the utilitty programs that are part of the library; the errors > specifically are: > > ./.libs/libgcj.a(natClass.o): In function `ZN4java4lang5Class4sizeEv': > /usr/local/src/gcc-cygwin-w32threads/i686-pc-cygwin/libjava/../../../gcc-3.0 /libjava/java/lang/Class.h(.text$_ZN4java4lang5ClassC1Ev+0x0): > multiple definition of `java::lang::Class::Class()' This looks like the case sensivity thing we already squashed. Try looking up our old patches. Rob -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/