octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ov-java.cc-tst fails on Lubuntu 14.04


From: Tatsuro MATSUOKA
Subject: Re: ov-java.cc-tst fails on Lubuntu 14.04
Date: Fri, 5 Jun 2015 18:28:15 +0900 (JST)

----- Original Message -----

> From: Philip Nienhuis 
> To: octave-maintainers
> Cc: 
> Date: 2015/6/5, Fri 17:05
> Subject: Re: ov-java.cc-tst fails on Lubuntu 14.04
> 
>t macchant wrote
>>  ----- Original Message -----
>> 
>>>  From: Tatsuro MATSUOKA 
>>  To: Rik  "octave-maintainers Julien Bect 
>>>  Cc: 
>>>  Date: 2015/6/4, Thu 19:55
>>>  Subject: Re: ov-java.cc-tst fails on Lubuntu 14.04
>>> 
>>>  ----- Original Message -----
>>> 
>>>>   From: Rik 
>>>>   To: Tatsuro MATSUOKA ; "octave-maintainers; Julien Bect> 
> Cc: 
>>>>   Date: 2015/6/3, Wed 11:53
>>>>   Subject: Re: ov-java.cc-tst fails on Lubuntu 14.04
>>>> 
>>>>   On 06/02/2015 04:28 PM, Tatsuro MATSUOKA wrote:
>>>>> 
>>>>>>    I was going to wait on the results of your test and
>>>>>>    then post to octave-maintainers, but you have beaten me 
> to it. 
>>>>> 
>>>>>    I apologize my impolite manner.
>>>> 
>>>>   No need to apologize.  It's not polite or impolite.  You were 
> simply
>>>>   working on finding a solution quickly.
>>>> 
>>>>> 
>>>>>>    assert (javaMethod ("binarySearch", 
>>>>   "java.util.Arrays", 
>>>>>>    single ([90 100 255]), single (255)), 2);
>>>>> 
>>>>>    This works without problem.
>>>> 
>>>>   Well that's good.  Maybe the default numeric type for a 32-bit 
> JRE is 
>>>  float
>>>>   rather than double?  Seems odd though.  The 32-bit JRE is supposed 
> to
>>>>  be
>>>>   about the size of references and therefore about the size of
>>>>  addressable
>>>>   memory.
>>>> 
>>>>   --Rik
>>> 
>>> 
>>>  I have built octave-4.0.0 on lubunutu 12.04 (32bit) using gcc-4.8.1.
>>>  Interestingly "test ov-java.cc-tst" passes.
>>> 
>>>>>   test ov-java.cc-tst
>>>  PASSES 5 out of 5 tests
>>> 
>>>  On lubuntu 14.04 (32 bit), I have used openjdk-7-jdk, openjdk-7-jre, 
>>>  openjdk-7-jre-headless (7u79-2.5.5-0ubuntu)
>>>  while on 12.04, I have used openjdk-6-jdk, openjdk-6-jre, 
>>>  and  openjdk-6-jre-headless (6b35-1.13.7-1ubunutu0.12.04.2).
>>> 
>>>  I do not know the difference comes from the openjdk version difference 
> at
>>>  the 
>>>  moment.
>>> 
>>>  On ubuntu 12.04, one can use openjdk-7. I may try it tomorrow if I have
>>>  time.
>>> 
>>>  Tatsuro
>> 
>> 
>>  The origin of the FAIL in ov-java.cc-tst comes from openjdk-7 on ubuntu 32
>>  bit.
>> 
>>  I have installed the openjdk-7 (it is not default for ubunut 12.04. For
>>  12.04,
>>  the openjdk-6 is default.)  and built octave against it .
>> 
>>>>  assert (javaMethod ("binarySearch", 
> "java.util.Arrays", [90 100 255],
>>>>  255), 2);
>>  error: [java] java.lang.ClassCastException: java.lang.Double cannot be
>>  cast to java.lang.Float
>>  error: evaluating argument list element number 1
>> 
>>  Of course, the modified test that you have shown is passed;
>>>>  assert (javaMethod ("binarySearch", 
> "java.util.Arrays",  single ([90 100
>>>>  255]), single (255)), 2);
>> 
>>  I do not know why 32 bit version openjdk-7 changes the behavior from that
>>  in openjdk-6.
> 
> Just to be sure:
> Did you build Octave with the 64-bit JDK? (you can check in config.log)
> 
> Octave needs to run with a JRE (JDKs usually contain a JRE as well) with the
> same arch (32 or 64 bit) as that of the JDK it was built with. 
> Could there be a mix-up of 32-bit and 64-bit JREs ? (I'm just guessing)
> (I'd expect Octave to simply not be able to invoke any Java method if the
> arch doesn't match)
> 
> Philip
> 


For 32 bit build, I have used the PCs with 32 bit CPU and 64 bit codes do not 
work on them.
Therefore the mixing of 32 bit and 64 bit codes did not occur.

Tatsuro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]