octave-maintainers
[Top][All Lists]
Advanced

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

Re: heads-up on MacOS X & Java


From: Dmitri A. Sergatskov
Subject: Re: heads-up on MacOS X & Java
Date: Sun, 8 Oct 2017 11:29:25 -0500



On Sun, Oct 8, 2017 at 7:25 AM, Ben Abbott <address@hidden> wrote:
On Oct 6, 2017, at 8:43 PM, Ben Abbott <address@hidden> wrote:

On Oct 6, 2017, at 4:35 PM, Sebastian Schöps <address@hidden> wrote:

The patch doesn’t apply for me. Perhaps because there is no context info and confgure.ac has changed since you attached it.

Currently java on macOS is differently handled than on other platforms. This was necessary in former times but now it's rather harmful. My patch just disables this if statement.

You can manually change in file "libinterp/octave-value/ov-java.cc" the line
"#if ! defined (__APPLE__) && ! defined (__MACH__)" into "#if 1". Additionally the statement "-framework JavaVM" must be removed from "configure.ac".

Is there a convenient test for Java?

just calling "javaclasspath" should tell you whether it works. I recommend uninstalling Java 1.6 before these tests to actually see whether it works.

Sebastian

Hi Sebastian,

The javaclasspath() returned an empty cell, so I expect it wasn’t working. I’ll put in more time debugging.

In the meantime, I’ve attempted to change your changset by manually making the changes and then “hg diff”.

It is attached. Can you verify I got it correct?

Ben

<octave_devel_mac_java3.patch>

With High Sierra (10.13) and Java 9 I needed to modify the patch to configure.ac in order to build (patch is attached). The macOS/Darwin JAVA_CPPFLAGS are now consistent with Linux.

Unfortunately, I encountered a seg-fault when trying javaclasspath().  I’ll have some more time to debug

foo = javaclasspath ()
ASAN:DEADLYSIGNAL
=================================================================
==80466==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00012670f4f3 bp 0x00011bbfe06c sp 0x70000ae71398 T5)
    #0 0x12670f4f2  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>) 
Thread T5 created by T0 here:
    #0 0x10a963e29 in wrap_pthread_create (libclang_rt.asan_osx_dynamic.dylib+0x41e29)
    #1 0x10600fa25 in QThread::start(QThread::Priority) (QtCore+0x23a25)
    #2 0x10357eb4b in main_window::main_window(QWidget*, octave::gui_application*) main-window.cc:228
    #3 0x1035aa3b1 in octave::gui_application::execute() octave-gui.cc:228
    #4 0x10351361f in main main-gui.cc:104
    #5 0x7fff58c38144 in start (libdyld.dylib+0x1144)
    #6 0x8  (<unknown module>)

==80466==ABORTING
Abort trap: 6


​This looks the same as ​


​i.e. on linux JVM and asan have a problem. I have at least one computer that does not exhibit
it (an old-ish Xeon w/o integrated graphics + Nvidia card), but others do crash
(including an AMD CPU + AMD graphics). So it is complicated...

Dmitri.
--



 


reply via email to

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