octave-maintainers
[Top][All Lists]
Advanced

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

Re: Java support in MXE build


From: Philip Nienhuis
Subject: Re: Java support in MXE build
Date: Sat, 29 Jun 2013 20:13:34 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

(maintainers list cc'd)

Anirudha Bose wrote:

On Wed, May 15, 2013 at 5:55 PM, PhilipNienhuis <address@hidden
<mailto:address@hidden>> wrote:

    Until now the MXE building process fails to include Java support.
    Looking at
    the log from a freshly checked out MXE build I see:

    configure: WARNING: JAVA_HOME environment variable not initialized.
    configure: WARNING: Auto-detection will proceed but is unreliable.
    checking for java... /usr/bin/java
    /home/philip/devel/octdev/mxe-octave/tmp-octave/octave-3.7.5/configure:
    line
    66352: pwd: -W: invalid option
    pwd: usage: pwd [-LP]
    checking for javac... /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19/bin/javac
    checking for jar... /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19/bin/jar
    checking for Java version... 1.7.0_19
    checking for jvm.dll... not found
    configure: WARNING: Library jvm.dll not found.  Octave will not be
    able to
    call Java methods.

    So the configure script defaults to the Linux Java system on the box
    where
    MXE is run.

    I then tried to configure with the Windows Java system, installed on
    another
    (windows 7) partition, by adding a few configure options in
    ./mxe-octave/src/octave.mk <http://octave.mk>   (symlink /mnt/jhm
    points to /mnt/win7/Program
    Files/Java/jdk1.7.0_21):

    :
             JAVA_HOME="/mnt/jhm" \
             --with-java-homedir="/mnt/jhm" \
             --with-java-libdir="/mnt/jhm/jre/bin/server" \

    --with-java-includedir="/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19/include"
    \
    :

    I had to make the symlink as configure hickups on spaces in path
    names. This
    trick seemed to work, but then I got other errors:

    :
    - checking for java... /usr/bin/java
    /home/philip/devel/octdev/mxe-octave/tmp-octave/octave-3.7.5/configure:
    line
    66352: pwd: -W: invalid option
    pwd: usage: pwd [-LP]
    checking for javac... /usr/bin/javac
    checking for jar... /usr/bin/jar
    checking for Java version... 1.7.0_19
    checking for jvm.dll... /mnt/jhm/jre/bin/server
    checking for include file <jni.h>... not found
    configure: WARNING: Include file <jni.h> not found.  Octave will not
    be able
    to call Java methods.
    :

    Setting JAVA_HOME to the Java installation on the Windows partition
    doesn't
    help in any way.

    So it seems the configure script consistently picks up the native
    (Linux)
    Java version and seems to largely ignore the --with-java-* configure
    options. It does find the jvm.dll (that configure option works) but not
    jni.h while the latter does live in the "java-includedir" indicated
    in the
    configure options.

    Obvious question: how can we proceed with getting Java support
    included in
    MXE builds?

    Philip


Hey Philip. Can you send me your copy of src/octave.mk
<http://octave.mk>. I am also working on getting Java enabled in MXE but
presently stuck with "Library jvm.dll not found". Is it possible to get
Java enabled in cross builds? The Linux system from which we are
compiling surely doesn't contain any DLL files, and the only obvious
option is to use the Java installation of Windows.

(Sorry short answer, I have other plans this weekend)

Read my last posting in that thread.

I had configure options pointing to the Windows-installed Java JDK.
Watch out for 64-bit vs 32-bit Java (client vs server subdir in the JDK).

I simply added the relevant configure options to the octave.mk file (+ symlinked a few things), and then the configure script picked up the proper Java stuff (i.e. the JDK on the Windows side on that machine).

However I soon ran into more obscure problems that I reported earlier in the maintainers ML:

https://mailman.cae.wisc.edu/pipermail/octave-maintainers/2013-May/033675.html

(i.e., the errors starting with dldfcn/.libs/__dsearchn__.o: In function `~octave_base_value': /home/philip/devel/octdev/mxe-octave/tmp-octave/octave-3.7.5/libinterp/octave-value/ov-base.h:211: undefined reference to `vtable for octave_base_value'
etc
etc)

I suppose the symlink / configure option trick (for cross-compiling) itself worked OK, as in later native MXE-MinGW build I got exactly the same error messages. Same for a development tip building with the MXE-built dependencies. I the post I linked to above I also reported the same issue that I got with MinGW builds earlier on. Perhaps something is wrong with the Java configure options for MinGW.

Anyway, that's how far I got.

Philip


reply via email to

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