harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snowdosker <snowdos...@academ.org>
Subject Re: [jchevm] Cygwin issues
Date Mon, 20 Feb 2006 15:16:12 GMT
Hello, Enrico

2) in order to proceed, let's "align" our development environment in terms

> of source code modifications. In fact, to build jchevm, just like you, 
> I had
> to add some declarations in some header files, and modify the pread()
> call into a read(). My proposal is the following:
> let's install the new versions of Cygwin, Classpath, and jchevm,
> build them from scratch, produce a written document with all the steps
> and modifications, and post it this mailing list.
> Afterwards, we will be able to write and debug some test cases.
> what do you think?

I think that I already did this since started.. Just recorded all (or I 
hope all)  I did
Below is copy of my records....

Install  Cygwin  ( 
http://developer.classpath.org/mediation/ClasspathOnCygwin )
    + gcc-core
    + gcc-g++
    + gcc-java
    + make
    + zip
    + GTK
    + pkgconfig
    + autocofig
    + automake
    + libtool
(not sure that I recorded all optional packages I installed)

Download  jikes  from

Apply this patch

build jikes ( cygwin version )
$ tar -xjf jikes-1.22.tar.bz2
$ cd jikes-1.22
$ ./configure
$ make && make install

Build Classpth-0.20
$ ./configure --with-jikes --enable-gtk-peer --enable-jni
$ make

$ ./configure --with-classpath=/usr/local/classpath
Add cache clean to  autogen.sh  before each call automake or autoconfig
rm -rf autom4te*.cache
echo "running automake"
rm -rf autom4te*.cache
echo "running autoconf"

libjc/definitions.h    ADD
#if defined (__CYGWIN__)
#define PTHREAD_STACK_MIN 1024

libjc/properties.c    ADD
#if defined(__CYGWIN__)
    if (_jc_set_property(env,
        "user.timezone", _tzname[0]) != JNI_OK)
        return JNI_ERR;

    if (_jc_set_property(env,
        "user.timezone", localtime(&now)->tm_zone) != JNI_OK)
        return JNI_ERR;

libjc/os_functions.c  ADD
 *                CYGWIN                    *

#elif defined(__CYGWIN__)

#include <unistd.h>

_jc_num_cpus(_jc_env *env)

       return (int)sysconf(_SC_NPROCESSORS_ONLN);

in libjc/zip.c   replace
 pread(3) with  lseek,read

#define _JC_LIBRARY_FMT        "lib%s.so"

#define _JC_LIBRARY_FMT        "lib%s.dll.a"

libjc/arch/i386/i386_libjc.h    ( not sure for this is correct! )
#elif defined(__CYGWIN__)
extern inline const void *
_jc_jmpbuf_sp(const sigjmp_buf buf)
    return (const void *)buf[7];

libjc\native\java_lang_VMThread.c  ADD
/* Cygwin pthread_create() with supplied attributes is completely broken! */
#ifdef __CYGWIN__

in "static const struct poptOption jc_popt_options[] = {" remove   

in libjc\arch\arch_definitions.h
redefine dll name format for cygwin
#if defined(__CYGWIN__)
  #define _JC_LIBRARY_FMT        "cyg%s-0.dll"
  #define _JC_LIBRARY_FMT        "lib%s.dll.a"

View raw message