Re: Porting Sable VM to SH4

Vincent Verstraete <[email protected]> Mon, 30 Oct 2006 12:32:16 +0100
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
Hello,

To create a minimal test case, is a bit of a problem. The crosscompiling 
environment I got, is not for public use but property of the company I 
cooperate with. So it is a bit of a problem to just post all the 
information on these mailing lists. I can (and will) however give you 
the files I adapted to crosscompile the vm (system.*, the libffi library 
and the parameters I set in the configure script).

The knopflerfish OSGI framework is just downloadable on 
http://www.knopflerfish.org/. It works on other platforms and I got my 
whole software framework (implemented as bundles within OSGI) working on 
a plain i686 Linux desktop.

The next step I want to try is to update to the trunk sablevm and 
sablevm-classpath. I used the stable 1.13 release, but not the trunks. 
There seems to be a problem however with connecting to the svn server 
(any firewall issues?) and the daily snapshots don't seem that daily 
anymore since 01/01/2006 :-). Is there a recent snapshot available 
somewhere?

Greetz,

Vincent



Chris Pickett wrote:

> Hi Vincent,
>
> Glad to hear you got it working.
>
> Can you try and create a minimal test case?  There is no way anybody 
> can help you from that stack trace alone.
>
> Does your program work on other architectures?
>
> Did you update to the trunk sablevm and sablevm-classpath?  There were 
> some threading fixes in April 2006.
>
> Cheers,
> Chris
>
> Vincent Verstraete wrote:
>
>> Hello,
>>
>> The problem is solved by adding 
>> --property="java.library.path=/usr/local/sablevm/lib/sablevm-classpath" 
>> as command line argument when invoking the sablevm command. I guess 
>> the internal java.library.path was wrongly configured somewhere along 
>> the road. When I compile a simple test program, it runs now.
>>
>> However, my main goal was to get an OSGI framework (more specifically 
>> knopflerfish) running on my target sh4 machine. When starting the 
>> framework, it loads, but I do (sometimes) get an error when 
>> installing some extra bundles. As it does seem more VM related than 
>> OSGI related, I thought someone here might know what causes this 
>> error. The weird thing is, it does not always occur, so my guess is 
>> it has something to do with Thread scheduling:
>>
>>
>> java.lang.InternalError
>>   at java.lang.VMThread.nativeStart (VMThread.java)
>>   at java.lang.VMThread.start (VMThread.java:322)
>>   at java.lang.VMThread.create (VMThread.java:165)
>>   at java.lang.Thread.start (Thread.java:879)
>>   at org.mcdp.client.channelsocket.Channel_SocketImpl.start 
>> (Channel_SocketImpl.java:59)
>>   at 
>> org.mcdp.client.channeltracker.bundle.ChannelTracker.addingService 
>> (ChannelTracker.java:28)
>>   at org.osgi.util.tracker.ServiceTracker$1.serviceChanged 
>> (ServiceTracker.java:267)
>>   at org.knopflerfish.framework.Listeners$3.run (Listeners.java:301)
>>   at java.security.AccessController.doPrivileged 
>> (AccessController.java:96)
>>   at org.knopflerfish.framework.Listeners.serviceChanged 
>> (Listeners.java:299)
>>   at org.knopflerfish.framework.Services.register (Services.java:141)
>>   at org.knopflerfish.framework.BundleContextImpl.registerService 
>> (BundleContextImpl.java:273)
>>   at org.mcdp.client.channelsocket.EEN.Activator.start 
>> (Activator.java:38)
>>   at org.knopflerfish.framework.BundleImpl$1.run (BundleImpl.java:281)
>>   at java.security.AccessController.doPrivileged 
>> (AccessController.java:154)
>>   at org.knopflerfish.framework.BundleImpl.start (BundleImpl.java:255)
>>   at org.knopflerfish.framework.Framework.startBundle 
>> (Framework.java:453)
>>   at org.knopflerfish.framework.Main.handleArgs (Main.java:305)
>>   at org.knopflerfish.framework.Main.main (Main.java:190)
>>   at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
>>   at java.lang.VirtualMachine.main (VirtualMachine.java:108)
>>
>>
>> Anyone who knows the cause of this error (or even better: a solution)?
>>
>> Cheers,
>>
>> Vincent
>>
>>
>>
>> Chris Pickett wrote:
>>
>>> Hi Vincent,
>>>
>>> Vincent Verstraete wrote:
>>>
>>>> java.lang.UnsatisfiedLinkError: Native library `javanio' not found 
>>>> (as file `libjavanio') in gnu.classpath.boot.library.path and 
>>>> java.library.path
>>>> [verbose gc: total gc time = 0 sec 0 usec]
>>>>
>>>>
>>>> The weird thing is I do find libjavanio on my system in 
>>>> /usr/local/sablevm/lib/sablevm-classpath/
>>>>
>>>> Any idea where this dynamic linking goes wrong?
>>>
>>>
>>>
>>>
>>> I hit the same thing last night using a system with gcc-4.0.  I 
>>> moved to an older system with gcc-3.3 and it went away.  I did hear 
>>> a report of SableVM "not working" with gcc-4.0, but there weren't 
>>> any further details.  I can't say for sure what the problem is, it 
>>> might be gcc, it might be something like libtool, it might be an 
>>> environment variable. If I figure it out, I'll let you know; please 
>>> do the same.  Note that for what I need now, I'm fine just using 
>>> gcc-3.3, so I probably won't spend a lot of time on it.
>>>
>>> Cheers,
>>> Chris
>>>
>>> _______________________________________________
>>> SableVM-devel mailing list
>>> [email protected]
>>> http://sablevm.org/lists/control/listinfo/sablevm-devel
>>
>>
>>
>
>
> _______________________________________________
> SableVM-devel mailing list
> [email protected]
> http://sablevm.org/lists/control/listinfo/sablevm-devel