You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Enrico Migliore <en...@fatti.com> on 2006/02/07 19:11:38 UTC

[jchevm] building jchevm on Cygwin

Hi Archie,


GNU/Classpath problem
-------------------------
 at the moment, when I run:

 $jc HelloWorld

 I got the following exception:

java.lang.UnsatisfiedLinkError: failed to open native library:
'usr/local/classpath/lib/classpath/libjavanio.so'

The reason is simple: Classpath doesn't know it's running on Cygwin,
therefore it looks for "libjavanio.so" instead of  "libjavanio.dll" (which
exists on the filesytem). I'll post a thread on the Classpath list in order
to fix this problem.


Assertion failures on Cygwin
-----------------------------
I compiled the distribution with all assertions enabled and ran:

$jc HelloWorld

The result is that the following assertions fail:

1.  vm.c - line 46
2.  vm.c - line 176
3.  heap.c - line 238
4.  thread.c - line 1023

Of course, to get to assertions 2 I had to comment assertion 1 and so on.


Segmentation fault problem on Cygwin
---------------------------------------
While debugging JCHEVM with DDD I noticed that the pthread library issues
a segmentation fault signal. In order to proceed, I instructed DDD to 
ignore the signal.
To fix the problem, I'll have to compile the pthread library in debug 
mode and sneak in
the source code.


Comment
----------
Even if I fix all of these problems, JCHEVM will always need Cygwin to 
run on top
of Windows. That is acceptable for now, but someday, if we want JCHEVM to
became a fully fladged VM we'll have to make a native port to Windows.

Enrico


Re: [jchevm] building jchevm on Cygwin

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

> What does this program print?
>
> /*
>  * Compile me from the top jchevm directory like this:
>  *
>  *   cc -I libjc -I include -I libjc/native -I libjc/arch -o xx xx.c
>  */
> #include "libjc.h"
> int
> main(int ac, char **av)
> {
>         printf("_JC_FULL_ALIGNMENT=%u\n", _JC_FULL_ALIGNMENT);
>         return 0;
> }
>
> -Archie


Hi Archie,

here are the messages and the value of  ALIGNMENT.
As far as the Classpath problem is concerned, I posted a thread on
the Classpath mailing list.

Keep in mind that I haven't yet merged your latest pacth (replacement
of the ucontext functions with setjmp() - longjmp). with my source tree.


assertion failure 1
-----------------
vm.c - line 46
message = "assertion failure: _JC_FULL_ALIGNMENT <= (sizeof(_jc_word))"

When I add the following:

      printf("_JC_FULL_ALIGNMENT=%u\n", _JC_FULL_ALIGNMENT);

jchevm prints: 8


assertion failure 2
-----------------
vm.c - line 176
message = "assertion failure: vm->threads.pro_min <= assertion 
failure:vm->threads.pro_max"


assertion failure 3
-----------------
heap.c - line 238
message = "assertion failure: bs->hint == NULL || (((_jc_word) bs->hint 
& (_JC_PAGE_SIZE - 1) %
                  bs->size) == _JC_HEAP_BLCOK_OFFSET)


assertion failure 4
-----------------
thread.c - line 1023
/* _JC_COND_SIGNAL(vm->vm_destruction);*/
message = "assertion failure: _r == 0"


Your comments are welcome :-)

Enrico

Re: [jchevm] building jchevm on Cygwin

Posted by Archie Cobbs <ar...@dellroad.org>.
Enrico Migliore wrote:
> The result is that the following assertions fail:
> 
> 1.  vm.c - line 46

What does this program print?

/*
  * Compile me from the top jchevm directory like this:
  *
  *   cc -I libjc -I include -I libjc/native -I libjc/arch -o xx xx.c
  */
#include "libjc.h"
int
main(int ac, char **av)
{
         printf("_JC_FULL_ALIGNMENT=%u\n", _JC_FULL_ALIGNMENT);
         return 0;
}

-Archie

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