undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

Andreas Weber-2
Dear maintainers,

I get a "undefined reference to octave_java::register_type ()" when
configured with "--disable-java" in dev fafd51a1b0f0+

I guess the reason for this is that
ov.cc:2758 octave_java::register_type ();
is not conditional with "if defined HAVE_JAVA"
but
./libinterp/octave-value/ov-java.cc:1840:DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA
(octave_java, "octave_java", "octave_java");
is.

Another problem was
In file included from ../../octave-src/libinterp/octave-value/ov.cc:79:0:
../../octave-src/libinterp/octave-value/ov-java.h:26:17: fatal error:
jni.h: No such file or directory

I changed ov.cc
#if defined HAVE_JAVA
#include "ov-java.h"
#endif

after that I was able to compile until
./java.texi:238: Crossverweis auf nicht existierenden Knoten
„doc-javamem“ (vielleicht @section statt @subsection o.ä.?).
makeinfo: Entferne Ausgabedatei
„../../../octave-src/doc/interpreter/octave.info“ wegen Fehler; --force
benutzen, um diese beizubehalten.

which I didn't tracked further yet. I ran "make -i check" and got 3
unexpected fails. I think none of them are caused by my 2 changes.

Summary:

PASS 10673
FAIL 3
XFAIL 3

 >>>>> processing /home/andy/octave-src/libinterp/interpfcn/file-io.cc
assert (sscanf ("1,2", "%f", "fr_FR"), 1.2)
!!!!! test failed

 >>>>> processing /home/andy/octave-src/scripts/plot/copyobj.m
***** testif HAVE_MAGICK
h1 = figure ();
set (h1, "visible", "off");
x = 0:0.1:2*pi;
y1 = sin (x);
y2 = exp (x - 1);
ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
xlabel ("X");
ylabel (ax(1), "Axis 1");
ylabel (ax(2), "Axis 2");
axes (ax(1));
text (0.5, 0.5, "Left Axis", ...
"color", [0 0 1], "horizontalalignment", "center");
axes (ax(2));
text (4.5, 80, "Right Axis", ...
"color", [0 0.5 0], "horizontalalignment", "center");
s1 = hdl2struct (h1);
h2 = struct2hdl (s1);
s2 = hdl2struct (h2);
png1 = strcat (tmpnam (), ".png");
png2 = strcat (tmpnam (), ".png");
unwind_protect
print (h1, png1);
[img1, map1, alpha1] = imread (png1);
print (h2, png2);
[img2, map2, alpha2] = imread (png2);
unwind_protect_cleanup
unlink (png1);
unlink (png2);
end_unwind_protect
assert (img1, img2);
assert (map1, map2);
assert (alpha1, alpha2);
!!!!! test failed

 >>>>> processing /home/andy/octave-src/scripts/sparse/svds.m
***** testif HAVE_ARPACK
s = svds (speye (10));
assert (s, ones (6, 1), 4*eps);
!!!!! test failed


Best regards, Andy

--
Mit freundlichen Grüßen

Dipl.-Ing.(FH) Andreas Weber
Akademischer Mitarbeiter
Fakultät Elektrotechnik und Informationstechnik

Hochschule Offenburg - University of Applied Sciences Offenburg
Badstraße 24
77652 Offenburg
Telefon +49 781 205-386


ov_cc_java_fix.patch (961 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

marco atzeri-2
On 12/12/2012 10:04 AM, Andreas Weber wrote:
> Dear maintainers,
>
> I get a "undefined reference to octave_java::register_type ()" when
> configured with "--disable-java" in dev fafd51a1b0f0+

same here
https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-December/031126.html
I guess my patch skipped both problems at least on:

changeset:   15755:3216dafbbd48
tag:         tip
user:        Rik <[hidden email]>
date:        Sat Dec 08 08:27:03 2012 -0800
summary:     ov-java.cc: Correcty typo HAVE_WINDWOS_H to HAVE_WINDOWS_H


>
> I guess the reason for this is that
> ov.cc:2758 octave_java::register_type ();
> is not conditional with "if defined HAVE_JAVA"
> but
> ./libinterp/octave-value/ov-java.cc:1840:DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA
> (octave_java, "octave_java", "octave_java");
> is.
>
> Another problem was
> In file included from ../../octave-src/libinterp/octave-value/ov.cc:79:0:
> ../../octave-src/libinterp/octave-value/ov-java.h:26:17: fatal error:
> jni.h: No such file or directory
>
> I changed ov.cc
> #if defined HAVE_JAVA
> #include "ov-java.h"
> #endif
>
> after that I was able to compile until
> ./java.texi:238: Crossverweis auf nicht existierenden Knoten
> „doc-javamem“ (vielleicht @section statt @subsection o.ä.?).
> makeinfo: Entferne Ausgabedatei
> „../../../octave-src/doc/interpreter/octave.info“ wegen Fehler; --force
> benutzen, um diese beizubehalten.
>
> which I didn't tracked further yet. I ran "make -i check" and got 3
> unexpected fails. I think none of them are caused by my 2 changes.

documentation for Java should be complete excluded when "--disable-java"
but some link are left behind.

>
> Summary:
>
> PASS 10673
> FAIL 3
> XFAIL 3
>
>  >>>>> processing /home/andy/octave-src/libinterp/interpfcn/file-io.cc
> assert (sscanf ("1,2", "%f", "fr_FR"), 1.2)
> !!!!! test failed

I guess this is failing when a real locale change is not possible.
Same on Cygwin

>
>  >>>>> processing /home/andy/octave-src/scripts/plot/copyobj.m
> ***** testif HAVE_MAGICK
> h1 = figure ();
> set (h1, "visible", "off");
> x = 0:0.1:2*pi;
> y1 = sin (x);
> y2 = exp (x - 1);
> ax = plotyy (x,y1, x-1,y2, @plot, @semilogy);
> xlabel ("X");
> ylabel (ax(1), "Axis 1");
> ylabel (ax(2), "Axis 2");
> axes (ax(1));
> text (0.5, 0.5, "Left Axis", ...
> "color", [0 0 1], "horizontalalignment", "center");
> axes (ax(2));
> text (4.5, 80, "Right Axis", ...
> "color", [0 0.5 0], "horizontalalignment", "center");
> s1 = hdl2struct (h1);
> h2 = struct2hdl (s1);
> s2 = hdl2struct (h2);
> png1 = strcat (tmpnam (), ".png");
> png2 = strcat (tmpnam (), ".png");
> unwind_protect
> print (h1, png1);
> [img1, map1, alpha1] = imread (png1);
> print (h2, png2);
> [img2, map2, alpha2] = imread (png2);
> unwind_protect_cleanup
> unlink (png1);
> unlink (png2);
> end_unwind_protect
> assert (img1, img2);
> assert (map1, map2);
> assert (alpha1, alpha2);
> !!!!! test failed
>
>  >>>>> processing /home/andy/octave-src/scripts/sparse/svds.m
> ***** testif HAVE_ARPACK
> s = svds (speye (10));
> assert (s, ones (6, 1), 4*eps);
> !!!!! test failed

svds is always problematic due to different LAPACK/ATLAS/BLAS
implementation and libc variant.

>
>
> Best regards, Andy
>
Regards
Marco

Reply | Threaded
Open this post in threaded view
|

undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

John W. Eaton
Administrator
In reply to this post by Andreas Weber-2
On 12-Dec-2012, Andreas Weber wrote:

| Dear maintainers,
|
| I get a "undefined reference to octave_java::register_type ()" when
| configured with "--disable-java" in dev fafd51a1b0f0+

I checked in a change for this problem.

Thanks,

jwe
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

Andreas Weber-2
In reply to this post by marco atzeri-2
Hi Marco, thank you for your reply

On 12.12.2012 11:04, marco atzeri wrote:

> On 12/12/2012 10:04 AM, Andreas Weber wrote:
>> Dear maintainers,
>>
>> I get a "undefined reference to octave_java::register_type ()" when
>> configured with "--disable-java" in dev fafd51a1b0f0+
>
> same here
> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-December/031126.html 
>
>
Ah, I didn't see this. Nice to know that we proposed the same patch.
> documentation for Java should be complete excluded when "--disable-java"
> but some link are left behind.
Yes, but I didn't dig deeper in this. I hope someone catches this bug
and fix it :-)
>> >>>>> processing /home/andy/octave-src/libinterp/interpfcn/file-io.cc
>> assert (sscanf ("1,2", "%f", "fr_FR"), 1.2)
>> !!!!! test failed
>
> I guess this is failing when a real locale change is not possible.
> Same on Cygwin
I've seen this failure for half a year now:
https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-July/029044.html
and thought this would be an easy bug to fix. I'll have a look on this
the next days.

Regards, Andy


Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to octave_java::register_type when configured with --disable-java, patch suggested

marco atzeri-2
On 12/17/2012 9:00 AM, Andreas Weber wrote:

> Hi Marco, thank you for your reply
>
> On 12.12.2012 11:04, marco atzeri wrote:
>> On 12/12/2012 10:04 AM, Andreas Weber wrote:
>>> Dear maintainers,
>>>
>>> I get a "undefined reference to octave_java::register_type ()" when
>>> configured with "--disable-java" in dev fafd51a1b0f0+
>>
>> same here
>> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-December/031126.html
>>
>>
> Ah, I didn't see this. Nice to know that we proposed the same patch.
>> documentation for Java should be complete excluded when "--disable-java"
>> but some link are left behind.
> Yes, but I didn't dig deeper in this. I hope someone catches this bug
> and fix it :-)

already fixed.

>>> >>>>> processing /home/andy/octave-src/libinterp/interpfcn/file-io.cc
>>> assert (sscanf ("1,2", "%f", "fr_FR"), 1.2)
>>> !!!!! test failed
>>
>> I guess this is failing when a real locale change is not possible.
>> Same on Cygwin
> I've seen this failure for half a year now:
> https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2012-July/029044.html
>
> and thought this would be an easy bug to fix. I'll have a look on this
> the next days.

we will appreciate

>
> Regards, Andy
>

Marco