You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Archie Cobbs <ar...@dellroad.org> on 2005/11/13 23:15:08 UTC

JCHEVM builds and runs

For anyone who wants to play with the JCHEVM contribution, the code in
https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm
should now be buildable and runnable (on x86 machines only).

The file APACHE.README contains some general info as well as instructions
on how to build it. Please report any problems, questions, etc. to this
mailing list.

Cheers,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: JCHEVM builds and runs

Posted by Archie Cobbs <ar...@dellroad.org>.
Enrico Migliore wrote:
>> For anyone who wants to play with the JCHEVM contribution, the code in
>> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>>
>> should now be buildable and runnable (on x86 machines only).
>>
>> The file APACHE.README contains some general info as well as instructions
>> on how to build it. Please report any problems, questions, etc. to this
>> mailing list.
> 
> I would like to compile JCHEVM. I got Cygwin and MSVC installed on 
> Win2000 professional.
> Could you give me any suggestion before I start this work?

Oops, I should have been more specific: "builds and runs on Linux,
FreeBSD, etc.".

I have never used cygwin myself (I try to avoid using Windows if at all
possible) so am uncertain about exactly what might go wrong, but I'm
sure something will :-)

For example, I'm pretty sure it won't compile on Windows because
of missing header file elf.h.

On the other hand, the ELF loader is not needed in JCHEVM because it's
been stripped down to be an interpreter only. So one could eviscerate
the file elf.c (have all public functions return null or something)
and that would work around that problem.

Let me know what you find.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: compiling JCHEVM with MSVC

Posted by Aaron Hamid <ar...@cornell.edu>.
My understanding is that the original, C99 syntax*, allows one to populate "sparse" arrays, based on constants or enums.  This means as the constants or enums change value during development, you are not left with arrays that have been defined with values at implicit offsets (which is what priming the array with an initial bogus value of "" is doing), resulting in things starting to come down in flames because of access to incorrect array indices.

Aaron

[*] copied from Archie's post: http://docs.sun.com/source/819-0494/c99.app.html#pgfId-1004206

Enrico Migliore wrote:
> 
>>>
>>>
>>> I have to manually create the config.h file, and compile the code 
>>> step by step.
>>> At the moment, I got the following error from the MSVC compiler:
>>>
>>> D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: 
>>> syntax error : '['
>>>
>>> which refers to the following declaration:
>>>
>>> /* Map command line option to VM args property */
>>> static const    char *const jc_opt2prop[] = {
>>>    [OPT_CLASSPATH]=    JAVA_CLASS_PATH,
>>>    [OPT_LIBRARYPATH]=    JAVA_LIBRARY_PATH,
>>>    [OPT_BOOTCLASSPATH]=    JAVA_BOOT_CLASS_PATH
>>> };
>>>
>>> Got any suggestion in order for me to proceed?
>>
>>
>>
>> try:
>> +++
>> static const    char *const jc_opt2prop[] = {
>>        "",
>>        JAVA_CLASS_PATH,
>>        JAVA_LIBRARY_PATH,
>>        JAVA_BOOT_CLASS_PATH
>> };
>> +++
>> But that is a very bad work-around!
>>
> Hi Jean-frederic,
> 
> the work-around you suggested me, works!
> 
> Could you please tell me why you consider it "bad"?
> 
> ciao,
> Enrico

Re: compiling JCHEVM with MSVC

Posted by Enrico Migliore <en...@fatti.com>.
>>
>>
>> I have to manually create the config.h file, and compile the code 
>> step by step.
>> At the moment, I got the following error from the MSVC compiler:
>>
>> D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: 
>> syntax error : '['
>>
>> which refers to the following declaration:
>>
>> /* Map command line option to VM args property */
>> static const    char *const jc_opt2prop[] = {
>>    [OPT_CLASSPATH]=    JAVA_CLASS_PATH,
>>    [OPT_LIBRARYPATH]=    JAVA_LIBRARY_PATH,
>>    [OPT_BOOTCLASSPATH]=    JAVA_BOOT_CLASS_PATH
>> };
>>
>> Got any suggestion in order for me to proceed?
>
>
> try:
> +++
> static const    char *const jc_opt2prop[] = {
>        "",
>        JAVA_CLASS_PATH,
>        JAVA_LIBRARY_PATH,
>        JAVA_BOOT_CLASS_PATH
> };
> +++
> But that is a very bad work-around!
>
Hi Jean-frederic,

 the work-around you suggested me, works!

 Could you please tell me why you consider it "bad"?

ciao,
 Enrico

Re: compiling JCHEVM with MSVC

Posted by Jean-frederic Clere <jf...@telefonica.net>.
Enrico Migliore wrote:

>
>> Archie Cobbs wrote:
>>
>>> For anyone who wants to play with the JCHEVM contribution, the code in
>>> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>>>
>>> should now be buildable and runnable (on x86 machines only).
>>>
>>> The file APACHE.README contains some general info as well as 
>>> instructions
>>> on how to build it. Please report any problems, questions, etc. to this
>>> mailing list.
>>>
>>> Cheers,
>>> -Archie
>>>
>>> __________________________________________________________________________ 
>>>
>>> Archie Cobbs      *        CTO, Awarix        *      
>>> http://www.awarix.com
>>>
>>
> Hi Archie,
>
> I'm compiling JCHEVM with MSVC.
> Since I can't use the default installation method:
>
>    $ ./configure --prefix=/usr/local --enable-jni --with-jikes
>    $ gmake
>    $ gmake install
>    $ ./configure --with-classpath=DIR
>    $ make
>    $ make install
>
> I have to manually create the config.h file, and compile the code step 
> by step.
> At the moment, I got the following error from the MSVC compiler:
>
> D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: 
> syntax error : '['
>
> which refers to the following declaration:
>
> /* Map command line option to VM args property */
> static const    char *const jc_opt2prop[] = {
>    [OPT_CLASSPATH]=    JAVA_CLASS_PATH,
>    [OPT_LIBRARYPATH]=    JAVA_LIBRARY_PATH,
>    [OPT_BOOTCLASSPATH]=    JAVA_BOOT_CLASS_PATH
> };
>
> Got any suggestion in order for me to proceed?

try:
+++
static const    char *const jc_opt2prop[] = {
        "",
        JAVA_CLASS_PATH,
        JAVA_LIBRARY_PATH,
        JAVA_BOOT_CLASS_PATH
};
+++
But that is a very bad work-around!

>
> Enrico
>
>


Re: compiling JCHEVM with MSVC

Posted by Ashish Ranjan <as...@gmail.com>.
if you want to build native executables with gcc on ms-windows platform, i
will suggest to use MINGW (which is a gcc port to windows) and MSYS (which
is a gnuish environment for your build, so that your makefiles and automake
etc. will run). Hence goto www.mingw.org <http://www.mingw.org> and
download- mingw, msys, msys-DTK
and install it on MS-Windows and then give it a try. It will be easier to
try with/work with/port with/maintain with.
Just note that it is different from cygwin, which is an emulation layer.
bye :-)
Ashish Ranjan
India
ashishwave@yahoo.com


On 11/20/05, Archie Cobbs <ar...@dellroad.org> wrote:
>
> Enrico Migliore wrote:
> > I'm compiling JCHEVM with MSVC.
>
> Hi Enrico,
>
> Unfortunately JCHEVM requires the GCC compiler right now.
> It would take some nontrivial work to port it to MSVC.
> Can you get access to a Linux or FreeBSD machine?
>
> In any case, this error:
>
> D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: syntax
> error : '['
>
> I believe is not a GCC-specific issue... that syntax is a C99
> extension to standard C (I believe).. for example:
>
> http://docs.sun.com/source/819-0494/c99.app.html#pgfId-1004206
>
> Cheers,
> -Archie
>
> __________________________________________________________________________
> Archie Cobbs * CTO, Awarix * http://www.awarix.com
>

Re: compiling JCHEVM with MSVC

Posted by Enrico Migliore <en...@fatti.com>.
Hi,

 I'm compiling JCHEVM with MSCV/Win/x86 and I'm facing the following errors.
 Any ideas to help me out?

Enrico


------------------------------------------------------------
Error 1

d:\projects\harmony-jcvm\jcvm\include\jc_defs.h(218) : error C2229: 
struct '_jc_object_array' has an illegal zero-sized array

struct _jc_object_array {
    _jc_object        *elems[0];
    _jc_word        lockword;     <------ line 218
    _jc_type        *type;
    const jint        length;
};

------------------------------------------------------------
Error 2

d:\projects\harmony-jcvm\jcvm\include\jc_defs.h(454) : error C2061: 
syntax error : identifier 'sigjmp_buf'


struct _jc_catch_frame {
    _jc_catch_frame        *next;      
    const _jc_method    *method;  
    volatile _jc_uint16    region;      
    sigjmp_buf        context;            <------ line 454
};


------------------------------------------------------------
Error 3

d:\projects\harmony-jcvm\jcvm\include\jc_defs.h(522) : error C2010: '.' 
: unexpected in macro formal parameter list


#define _JC_DEFINE_TRAPS(env, catch, method_info, targets...)        
\             <------ line 522
    do {                                                                 
              \
    _jc_env_head *const _eh = (_jc_env_head *)(env);        \
    static const void *const _targets[]                                    \
        /* __attribute__ ((section(".rodata"))) */                      \
        = { _JC_NULL, targets };                                          \
    int _target_index;                    
                                         \
                                
                                                           \
    (catch).next = _eh->catch_list;                
                         \
    _eh->catch_list = &(catch);                
                             \
    (catch).method = (method_info);                                      \
    (catch).region = 0;                    
                                       \
    if ((_target_index = sigsetjmp((catch).context, 0)) != 0)    \
        goto *_targets[_target_index];                                     \
    } while (0)


Re: Snapshots (was Re: compiling JCHEVM with MSVC)

Posted by Archie Cobbs <ar...@dellroad.org>.
Geir Magnusson Jr. wrote:
> Instead of distributing from freebsd.org, we should think about  making 
> binary snapshots of Harmony stuff available for people to run  and play 
> with.

Definitely. Just show me where to put it.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: Snapshots (was Re: compiling JCHEVM with MSVC)

Posted by Enrico Migliore <en...@fatti.com>.
Geir Magnusson Jr. wrote:

> Instead of distributing from freebsd.org, we should think about  
> making binary snapshots of Harmony stuff available for people to run  
> and play with.
>
> This isn't a release, of course, but just a binary snapshot of where  
> we are for those that don't have the toolchains installed...
>
> geir
>
Hi,

 This is a good idea to foster the project.


Enrico
 

Snapshots (was Re: compiling JCHEVM with MSVC)

Posted by "Geir Magnusson Jr." <ge...@apache.org>.
Instead of distributing from freebsd.org, we should think about  
making binary snapshots of Harmony stuff available for people to run  
and play with.

This isn't a release, of course, but just a binary snapshot of where  
we are for those that don't have the toolchains installed...

geir

On Nov 21, 2005, at 11:59 AM, Archie Cobbs wrote:

> Enrico Migliore wrote:
>> I'm trying to figure out how far is your code from a successful build
>> with MSVC on Win2000. That is, at the end of this work, I want to  
>> have
>> a clear picture of which source files are 100% OS/architecture  
>> independent
>> and which are OS/architecture dependent.
>> One of the problem I'm facing right now, are the memory management  
>> functions
>> you call. for example, Windows doesn't have the mmap() function,
>> therefore, at the moment, I must supply a dummy mmap()  
>> implementation,
>> in order to proceed.
>> The other problem I got is that I don't have the files and the  
>> macros, generated
>> by the automake and autoconf tools, and I need them as a reference.
>> In order to for me to proceed I need to take a look at the source  
>> tree generated
>> by automake and autoconf. Could anybody send me the tree built for  
>> Linux?
>
> Try this... I built a distribution tarball from the current SVN  
> sources:
>
>   http://people.freebsd.org/~archie/jchevm-1.0.tar.gz
>
> -Archie
>
> ______________________________________________________________________ 
> ____
> Archie Cobbs      *        CTO, Awarix        *      http:// 
> www.awarix.com

-- 
Geir Magnusson Jr                                  +1-203-665-6437
geirm@apache.org



Re: compiling JCHEVM with MSVC

Posted by Archie Cobbs <ar...@dellroad.org>.
Enrico Migliore wrote:
> I'm trying to figure out how far is your code from a successful build
> with MSVC on Win2000. That is, at the end of this work, I want to have
> a clear picture of which source files are 100% OS/architecture independent
> and which are OS/architecture dependent.
> 
> One of the problem I'm facing right now, are the memory management 
> functions
> you call. for example, Windows doesn't have the mmap() function,
> therefore, at the moment, I must supply a dummy mmap() implementation,
> in order to proceed.
> 
> The other problem I got is that I don't have the files and the macros, 
> generated
> by the automake and autoconf tools, and I need them as a reference.
> In order to for me to proceed I need to take a look at the source tree 
> generated
> by automake and autoconf. Could anybody send me the tree built for Linux?

Try this... I built a distribution tarball from the current SVN sources:

   http://people.freebsd.org/~archie/jchevm-1.0.tar.gz

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: compiling JCHEVM with MSVC

Posted by Enrico Migliore <en...@fatti.com>.
Hi Archie,

>
> Hi Enrico,
>
> Unfortunately JCHEVM requires the GCC compiler right now.

Ok

> It would take some nontrivial work to port it to MSVC.

I'm trying to figure out how far is your code from a successful build
with MSVC on Win2000. That is, at the end of this work, I want to have
a clear picture of which source files are 100% OS/architecture independent
and which are OS/architecture dependent.

One of the problem I'm facing right now, are the memory management 
functions
you call. for example, Windows doesn't have the mmap() function,
therefore, at the moment, I must supply a dummy mmap() implementation,
in order to proceed.

The other problem I got is that I don't have the files and the macros, 
generated
by the automake and autoconf tools, and I need them as a reference.
In order to for me to proceed I need to take a look at the source tree 
generated
by automake and autoconf. Could anybody send me the tree built for Linux?


> In any case, this error:
>
>   D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: 
> syntax error : '['
>
> I believe is not a GCC-specific issue... that syntax is a C99
> extension to standard C (I believe).. for example:
>
>   http://docs.sun.com/source/819-0494/c99.app.html#pgfId-1004206
>
yes, I think it's a C99 issue. I think I have to upgrade my VC 6.0 compiler

> Cheers,
> -Archie
>
ciao,
 Enrico

 


 



Re: compiling JCHEVM with MSVC

Posted by Archie Cobbs <ar...@dellroad.org>.
Enrico Migliore wrote:
> I'm compiling JCHEVM with MSVC.

Hi Enrico,

Unfortunately JCHEVM requires the GCC compiler right now.
It would take some nontrivial work to port it to MSVC.
Can you get access to a Linux or FreeBSD machine?

In any case, this error:

   D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: syntax 
error : '['

I believe is not a GCC-specific issue... that syntax is a C99
extension to standard C (I believe).. for example:

   http://docs.sun.com/source/819-0494/c99.app.html#pgfId-1004206

Cheers,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

compiling JCHEVM with MSVC

Posted by Enrico Migliore <en...@fatti.com>.
> Archie Cobbs wrote:
>
>> For anyone who wants to play with the JCHEVM contribution, the code in
>> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>>
>> should now be buildable and runnable (on x86 machines only).
>>
>> The file APACHE.README contains some general info as well as 
>> instructions
>> on how to build it. Please report any problems, questions, etc. to this
>> mailing list.
>>
>> Cheers,
>> -Archie
>>
>> __________________________________________________________________________ 
>>
>> Archie Cobbs      *        CTO, Awarix        *      
>> http://www.awarix.com
>>
>
Hi Archie,

 I'm compiling JCHEVM with MSVC.
 Since I can't use the default installation method:

    $ ./configure --prefix=/usr/local --enable-jni --with-jikes
    $ gmake
    $ gmake install
    $ ./configure --with-classpath=DIR
    $ make
    $ make install

I have to manually create the config.h file, and compile the code step 
by step.
At the moment, I got the following error from the MSVC compiler:

D:\projects\harmony-jcvm\jcvm\libjc\jc_invoke.c(81) : error C2059: 
syntax error : '['

which refers to the following declaration:

/* Map command line option to VM args property */
static const    char *const jc_opt2prop[] = {
    [OPT_CLASSPATH]=    JAVA_CLASS_PATH,
    [OPT_LIBRARYPATH]=    JAVA_LIBRARY_PATH,
    [OPT_BOOTCLASSPATH]=    JAVA_BOOT_CLASS_PATH
};

Got any suggestion in order for me to proceed?

Enrico


Re: JCHEVM builds and runs

Posted by Enrico Migliore <en...@fatti.com>.
Archie Cobbs wrote:

> For anyone who wants to play with the JCHEVM contribution, the code in
> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>
> should now be buildable and runnable (on x86 machines only).
>
> The file APACHE.README contains some general info as well as instructions
> on how to build it. Please report any problems, questions, etc. to this
> mailing list.
>
> Cheers,
> -Archie
>
> __________________________________________________________________________ 
>
> Archie Cobbs      *        CTO, Awarix        *      
> http://www.awarix.com
>
Hi Archie,

 I would like to compile JCHEVM. I got Cygwin and MSVC installed on 
Win2000 professional.
 Could you give me any suggestion before I start this work?

ciao,
  Enrico
 

Re: JCHEVM builds and runs

Posted by Archie Cobbs <ar...@dellroad.org>.
Jean-frederic Clere wrote:
> The following patch helps for most unix like machine:
> +++
> jfclere@jfcexpert:~/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm> 
> svn diff configure.in
> Index: configure.in
> ===================================================================
> --- configure.in        (revision 345091)
> +++ configure.in        (working copy)
> @@ -80,6 +80,7 @@
>        [AC_MSG_ERROR([required library crypto missing])])
> AC_CHECK_LIB(popt, poptGetContext,,
>        [AC_MSG_ERROR([required library libpopt missing])])
> +AC_CHECK_LIB(dl, dlopen,,,)

Thanks, I added that.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: JCHEVM builds and runs

Posted by Jean-frederic Clere <jf...@telefonica.net>.
Tom Tromey wrote:

>>>>>>"Archie" == Archie Cobbs <ar...@dellroad.org> writes:
>>>>>>            
>>>>>>
>
>Archie> Great! What O/S are you using? Do you know a good ./configure test
>Archie> for whether "-ldl" is required?
>
>The usual thing is to pick whatever symbol is used by the package and
>do a series of AC_CHECK_LIB calls.  The original poster didn't say how
>the link failed, but for instance if dlopen was missing you would look
>for that.  There's an example of this for dlopen and friends in
>libltdl (part of libtool).
>
>There's no hard and fast rule for knowing what functions to check for.
>
>I'd say to look at APR before spending a lot of time on configury
>though.
>  
>
The following patch helps for most unix like machine:
+++
jfclere@jfcexpert:~/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm> 
svn diff configure.in
Index: configure.in
===================================================================
--- configure.in        (revision 345091)
+++ configure.in        (working copy)
@@ -80,6 +80,7 @@
        [AC_MSG_ERROR([required library crypto missing])])
 AC_CHECK_LIB(popt, poptGetContext,,
        [AC_MSG_ERROR([required library libpopt missing])])
+AC_CHECK_LIB(dl, dlopen,,,)

 # Check for pthread library, linking either via -pthread or -lpthread
 AC_MSG_CHECKING([whether -pthread gets us the pthread library])

+++

>Tom
>
>  
>


Re: JCHEVM builds and runs

Posted by Jean-frederic Clere <jf...@telefonica.net>.
Tom Tromey wrote:

>>>>>>"Archie" == Archie Cobbs <ar...@dellroad.org> writes:
>>>>>>            
>>>>>>
>
>Archie> Great! What O/S are you using? Do you know a good ./configure test
>Archie> for whether "-ldl" is required?
>
>The usual thing is to pick whatever symbol is used by the package and
>do a series of AC_CHECK_LIB calls.  The original poster didn't say how
>the link failed, but for instance if dlopen was missing you would look
>for that.  There's an example of this for dlopen and friends in
>libltdl (part of libtool).
>
>There's no hard and fast rule for knowing what functions to check for.
>
>I'd say to look at APR before spending a lot of time on configury
>though.
>  
>
Yep... I am preparing a patch, doing copy + paste of apr/configure.in.

>Tom
>
>  
>


Re: JCHEVM builds and runs

Posted by Tom Tromey <tr...@redhat.com>.
>>>>> "Archie" == Archie Cobbs <ar...@dellroad.org> writes:

Archie> Great! What O/S are you using? Do you know a good ./configure test
Archie> for whether "-ldl" is required?

The usual thing is to pick whatever symbol is used by the package and
do a series of AC_CHECK_LIB calls.  The original poster didn't say how
the link failed, but for instance if dlopen was missing you would look
for that.  There's an example of this for dlopen and friends in
libltdl (part of libtool).

There's no hard and fast rule for knowing what functions to check for.

I'd say to look at APR before spending a lot of time on configury
though.

Tom

Re: JCHEVM builds and runs

Posted by Archie Cobbs <ar...@dellroad.org>.
Jean-frederic Clere wrote:
> Oops I used etc/regen.sh instead of etc/makedist.sh... Big fingers.
> 
> A -ldl is missing somewhere I have used:
> +++
> sudo sh etc/makedist.sh
> ./configure --with-classpath=/usr/local/classpath 
> CPPFLAGS="-I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include" 
> LDFLAGS="-L/opt/SMAWPlus/openssl/lib -L/opt/SMAWPlus/lib -ldl"
> make
> +++
> And it works ;-)))

Great! What O/S are you using? Do you know a good ./configure test
for whether "-ldl" is required?

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: JCHEVM builds and runs

Posted by Jean-frederic Clere <jf...@telefonica.net>.
Archie Cobbs wrote:

> Jean-frederic Clere wrote:
>
>> Archie Cobbs wrote:
>>
>>> For anyone who wants to play with the JCHEVM contribution, the code in
>>> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>>>
>>> should now be buildable and runnable (on x86 machines only).
>>
>>
>>
>> I have probably done something wrong:
>> +++
>> gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./native -I./arch 
>> -I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include -g -O2 -g -O3 
>> -pipe -Wall -Waggregate-return -Wcast-align -Wchar-subscripts 
>> -Wcomment -Wformat -Wimplicit -Wmissing-declarations 
>> -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wparentheses 
>> -Wpointer-arith -Wredundant-decls -Wreturn-type -Wswitch -Wtrigraphs 
>> -Wuninitialized -Wunused -Wwrite-strings 
>> -D_AC_INCLUDEDIR=\"/usr/local/include\" 
>> -D_AC_DATADIR=\"/usr/local/share\" -D_AC_LIBDIR=\"/usr/local/lib\" 
>> -D_AC_SYSCONFDIR=\"/usr/local/etc\" 
>> -D_JC_CLASSPATH_HOME=\"/usr/local/classpath\" 
>> -D_JC_BOOTSTRAP_JAVA=\"/home/jfclere/JAVA/j2sdk1.4.2_06/bin/java\" 
>> -D_JC_GNU_COMPILER=\"/usr/bin/gcc\" -g -O2 -MT vm.lo -MD -MP -MF 
>> .deps/vm.Tpo -c vm.c  -fPIC -DPIC -o .libs/vm.o
>> vm.c:22:30: java_lang_Thread.h: No such file or directory
>> vm.c: In function `_jc_create_vm':
>> vm.c:215: `java_lang_Thread_MIN_PRIORITY' undeclared (first use in 
>> this function)
>> vm.c:215: (Each undeclared identifier is reported only once
>> vm.c:215: for each function it appears in.)
>> vm.c:216: `java_lang_Thread_MAX_PRIORITY' undeclared (first use in 
>> this function)
>> vm.c:217: `java_lang_Thread_NORM_PRIORITY' undeclared (first use in 
>> this function)
>> make[2]: *** [vm.lo] Error 1
>> make[2]: Leaving directory 
>> `/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc' 
>>
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory 
>> `/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc' 
>>
>> make: *** [all-recursive] Error 1
>> +++
>>
>> Any hints?
>
>
> Yes.. you are trying to build from the SVN checkout rather than
> creating a distribution first and building from that.. see instructions
> in APACHE.README for how to build the distribution first, etc.

Oops I used etc/regen.sh instead of etc/makedist.sh... Big fingers.

A -ldl is missing somewhere I have used:
+++
sudo sh etc/makedist.sh
./configure --with-classpath=/usr/local/classpath 
CPPFLAGS="-I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include" 
LDFLAGS="-L/opt/SMAWPlus/openssl/lib -L/opt/SMAWPlus/lib -ldl"
make
+++
And it works ;-)))

>
> This is a result of the fact that in order to avoid stale/redundant info,
> some files required for build are not checked in, e.g., the jcjavah
> generated native header files (which is what is causing the above 
> failure).
>
> -Archie
>
> __________________________________________________________________________ 
>
> Archie Cobbs      *        CTO, Awarix        *      
> http://www.awarix.com
>


Re: JCHEVM builds and runs

Posted by Archie Cobbs <ar...@dellroad.org>.
Jean-frederic Clere wrote:
> Archie Cobbs wrote:
> 
>> For anyone who wants to play with the JCHEVM contribution, the code in
>> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>>
>> should now be buildable and runnable (on x86 machines only).
> 
> 
> I have probably done something wrong:
> +++
> gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./native -I./arch 
> -I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include -g -O2 -g -O3 
> -pipe -Wall -Waggregate-return -Wcast-align -Wchar-subscripts -Wcomment 
> -Wformat -Wimplicit -Wmissing-declarations -Wmissing-prototypes 
> -Wnested-externs -Wno-long-long -Wparentheses -Wpointer-arith 
> -Wredundant-decls -Wreturn-type -Wswitch -Wtrigraphs -Wuninitialized 
> -Wunused -Wwrite-strings -D_AC_INCLUDEDIR=\"/usr/local/include\" 
> -D_AC_DATADIR=\"/usr/local/share\" -D_AC_LIBDIR=\"/usr/local/lib\" 
> -D_AC_SYSCONFDIR=\"/usr/local/etc\" 
> -D_JC_CLASSPATH_HOME=\"/usr/local/classpath\" 
> -D_JC_BOOTSTRAP_JAVA=\"/home/jfclere/JAVA/j2sdk1.4.2_06/bin/java\" 
> -D_JC_GNU_COMPILER=\"/usr/bin/gcc\" -g -O2 -MT vm.lo -MD -MP -MF 
> .deps/vm.Tpo -c vm.c  -fPIC -DPIC -o .libs/vm.o
> vm.c:22:30: java_lang_Thread.h: No such file or directory
> vm.c: In function `_jc_create_vm':
> vm.c:215: `java_lang_Thread_MIN_PRIORITY' undeclared (first use in this 
> function)
> vm.c:215: (Each undeclared identifier is reported only once
> vm.c:215: for each function it appears in.)
> vm.c:216: `java_lang_Thread_MAX_PRIORITY' undeclared (first use in this 
> function)
> vm.c:217: `java_lang_Thread_NORM_PRIORITY' undeclared (first use in this 
> function)
> make[2]: *** [vm.lo] Error 1
> make[2]: Leaving directory 
> `/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory 
> `/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
> make: *** [all-recursive] Error 1
> +++
> 
> Any hints?

Yes.. you are trying to build from the SVN checkout rather than
creating a distribution first and building from that.. see instructions
in APACHE.README for how to build the distribution first, etc.

This is a result of the fact that in order to avoid stale/redundant info,
some files required for build are not checked in, e.g., the jcjavah
generated native header files (which is what is causing the above failure).

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

Re: JCHEVM builds and runs

Posted by Jean-frederic Clere <jf...@telefonica.net>.
Archie Cobbs wrote:

> For anyone who wants to play with the JCHEVM contribution, the code in
> https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm 
>
> should now be buildable and runnable (on x86 machines only).

I have probably done something wrong:
+++
 gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./native -I./arch 
-I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include -g -O2 -g -O3 
-pipe -Wall -Waggregate-return -Wcast-align -Wchar-subscripts -Wcomment 
-Wformat -Wimplicit -Wmissing-declarations -Wmissing-prototypes 
-Wnested-externs -Wno-long-long -Wparentheses -Wpointer-arith 
-Wredundant-decls -Wreturn-type -Wswitch -Wtrigraphs -Wuninitialized 
-Wunused -Wwrite-strings -D_AC_INCLUDEDIR=\"/usr/local/include\" 
-D_AC_DATADIR=\"/usr/local/share\" -D_AC_LIBDIR=\"/usr/local/lib\" 
-D_AC_SYSCONFDIR=\"/usr/local/etc\" 
-D_JC_CLASSPATH_HOME=\"/usr/local/classpath\" 
-D_JC_BOOTSTRAP_JAVA=\"/home/jfclere/JAVA/j2sdk1.4.2_06/bin/java\" 
-D_JC_GNU_COMPILER=\"/usr/bin/gcc\" -g -O2 -MT vm.lo -MD -MP -MF 
.deps/vm.Tpo -c vm.c  -fPIC -DPIC -o .libs/vm.o
vm.c:22:30: java_lang_Thread.h: No such file or directory
vm.c: In function `_jc_create_vm':
vm.c:215: `java_lang_Thread_MIN_PRIORITY' undeclared (first use in this 
function)
vm.c:215: (Each undeclared identifier is reported only once
vm.c:215: for each function it appears in.)
vm.c:216: `java_lang_Thread_MAX_PRIORITY' undeclared (first use in this 
function)
vm.c:217: `java_lang_Thread_NORM_PRIORITY' undeclared (first use in this 
function)
make[2]: *** [vm.lo] Error 1
make[2]: Leaving directory 
`/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
make: *** [all-recursive] Error 1
+++

Any hints?

Cheers

Jean-Frederic

>
> The file APACHE.README contains some general info as well as instructions
> on how to build it. Please report any problems, questions, etc. to this
> mailing list.
>
> Cheers,
> -Archie
>
> __________________________________________________________________________ 
>
> Archie Cobbs      *        CTO, Awarix        *      
> http://www.awarix.com
>