bugGNU Octave - Bugs: bug #32477, Java package 1.2.7 won't install...

 
 

bug #32477: Java package 1.2.7 won't install on Octave 3.4.0

Submitter:  Chansup Byun <cbalways>
Submitted:  Mon 14 Feb 2011 03:09:43 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Octave Forge Assigned to:  None
Originator Name:  Chansup Byun Open/Closed:  * Closed
Release:  * 3.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 23 May 2013 07:39:34 PM UTC, comment #8: 

The "timestamp.... " stuff looks an operating system issue to me.

As to JDK: I'm no Java low-level expert, but AFAIK a JDK comprises a JRE.
The Java package installation hard-codes the libjvm.so location from the JDK, not from the JRE.

But an other, more important issue is that you have a 64-bit system, where the jvm is often not in .../client but in .../server.
Usually it suffices to make a symlink in .../server to .../client/libjvm.so

Unfortunately the Java package isn't prepared to catch this for 64-bit systems, and it may never be as Java will be in core Octave in the next stable release - soon to come out.

BTW please move this thread to the help-octave mailing list, do not hijack an old and fixed-bug tracker thread. I think I'll close/lock the discussion.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 22 May 2013 10:04:44 PM UTC, comment #7: 

Ok, I have found the problem. I have opened also the new bug #39045 because is potentially related to all the octave forge packages.

Now I have the java package installed but I have still a minor issue. When I execute a function of the java package I got the following error:

octave:5> javamem
warning: timestamp on file /etc/java-config-2/current-system-vm/jre/lib/amd64/client/libjvm.so is in the future
error: java_invoke: /etc/java-config-2/current-system-vm/jre/lib/amd64/client/libjvm.so: failed to load: /etc/java-config-2/current-system-vm/jre/lib/amd64/client/libjvm.so: cannot open shared object file: No such file or directory
error: called from:
error:   /usr/share/octave/packages/java-1.2.9/javamem.m at line 65, column 6

/etc/java-config-2/current-system-vm is a symlink to the current java installation (it's managed in this way on Gentoo).

What happens is that libjvm.so is not found because I have installed a JDK and not a JRE. On my system the file is installed below /etc/java-config-2/current-system-vm/jre/lib/amd64/server/libjvm.so

What do you think? Can this be fixed at package level or should it be fixed at distribution level?

Fabio <efferre79>
Mon 20 May 2013 01:25:04 PM UTC, comment #6: 

java_invoke is a compiled function living in _java_.oct (in the /usr/local/lib/octave/packages/../java-1.2.9 subdir).

Did you set JAVA_HOME properly?
Do you have a 32 or 64 bit system?
What does "uname -a" say (at the bash prompt?
Is there (in Octave) a directory  /usr/local/lib/octave/packages/.../java-1.2.9  in the path? ( ... stands for your arch, just type "path" and check Octave's output)

Philip Nienhuis <philipnienhuis>
Group Member
Sun 19 May 2013 11:45:24 PM UTC, comment #5: 

I'm sorry, I was trying to install an older version of java package, not it installs but it still doesn't work correctly :-( I'm working under linux

octave:1> pkg list
Package Name   | Version | Installation directory
---------------+---------+-----------------------
         java *|   1.2.9 | /usr/share/octave/packages/java-1.2.9

octave:2> system ("javac -version")
javac 1.6.0_45
ans = 0

octave:2> javamem
error: 'java_invoke' undefined near line 65 column 8
error: called from:
error:   /usr/share/octave/packages/java-1.2.9/javamem.m at line 65, column 6

I don't see the java_invoke.m function definition in the package. Should I open a new bug report?

Fabio <efferre79>
Sun 19 May 2013 10:44:23 PM UTC, comment #4: 

A few more details would be helpful.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 19 May 2013 10:00:50 PM UTC, comment #3: 

The same still applies to octave 3.6.4

Fabio <efferre79>
Mon 14 Feb 2011 10:43:44 PM UTC, comment #2: 

John, that msg you referred to was about an issue with another variable.

I've already answered the original poster through the OctDev (octave-forge) mailing list, see here:

http://sourceforge.net/mailarchive/message.php?msg_id=27059390

Thx

Philip Nienhuis <philipnienhuis>
Group Member
Mon 14 Feb 2011 07:51:56 PM UTC, comment #1: 

To avoid this problem, you just need to rename the variable in the java package to something else.

https://mailman.cae.wisc.edu/pipermail/help-octave/2011-February/044625.html

John W. Eaton <jwe>
Group administrator
Mon 14 Feb 2011 03:09:43 PM UTC, original submission:  

I tried to install a java package,  java-1.2.7.tar.gz, on Octave 3.4.0 installation but it failed with the following error:


# octave
GNU Octave, version 3.4.0
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-unknown-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

warning: function /usr/local/octave/3.4.0/share/octave/packages/strings-1.0.7/strtrim.m shadows a core library function
warning: function /usr/local/octave/3.4.0/share/octave/packages/specfun-1.0.9/erfcx.m shadows a built-in function
warning: function /usr/local/octave/3.4.0/share/octave/packages/statistics-1.0.10/prctile.m shadows a core library function
warning: function /usr/local/octave/3.4.0/share/octave/packages/statistics-1.0.10/fstat.m shadows a core library function
octave:1> pkg install -auto -global java-1.2.7.tar.gz
__java__.cc:59: error: ‘int octave_refcount’ redeclared as different kind of symbol
/usr/local/octave/3.4.0/include/octave-3.4.0/octave/../octave/oct-refcount.h:28: error: previous declaration of ‘template<class T> class octave_refcount’
__java__.cc: In function ‘std::string get_module_path(const std::string&, bool)’:
__java__.cc:223: error: ‘getcwd’ is not a member of ‘octave_env’
__java__.cc: In function ‘void initialize_jvm()’:
__java__.cc:385: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In function ‘octave_value get_array_elements(JNIEnv*, __jobject*, const octave_value_list&)’:
__java__.cc:612: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In function ‘octave_value set_array_elements(JNIEnv*, __jobject*, const octave_value_list&, const octave_value&)’:
__java__.cc:634: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In function ‘octave_value box(JNIEnv*, __jobject*, __jclass*)’:
__java__.cc:783: warning: deprecated conversion from string constant to ‘char*’
__java__.cc:848: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In function ‘int unbox(JNIEnv*, const octave_value&, jobject_ref&, jclass_ref&)’:
__java__.cc:988: warning: deprecated conversion from string constant to ‘char*’
__java__.cc:1052: warning: deprecated conversion from string constant to ‘char*’
__java__.cc:1054: error: missing template arguments before ‘++’ token
__java__.cc: In function ‘int java_event_hook()’:
__java__.cc:1117: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In member function ‘octave_value octave_java::do_java_invoke(JNIEnv*, const std::string&, const octave_value_list&)’:
__java__.cc:1696: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In static member function ‘static octave_value octave_java::do_java_invoke(JNIEnv*, const std::string&, const std::string&, const octave_value_list&)’:
__java__.cc:1721: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In static member function ‘static octave_value octave_java::do_java_create(JNIEnv*, const std::string&, const octave_value_list&)’:
__java__.cc:1746: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In member function ‘octave_value octave_java::do_java_get(JNIEnv*, const std::string&)’:
__java__.cc:1767: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In static member function ‘static octave_value octave_java::do_java_get(JNIEnv*, const std::string&, const std::string&)’:
__java__.cc:1787: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In member function ‘octave_value octave_java::do_java_set(JNIEnv*, const std::string&, const octave_value&)’:
__java__.cc:1813: warning: deprecated conversion from string constant to ‘char*’
__java__.cc: In static member function ‘static octave_value octave_java::do_java_set(JNIEnv*, const std::string&, const std::string&, const octave_value&)’:
__java__.cc:1835: warning: deprecated conversion from string constant to ‘char*’
make: *** [__java__.oct] Error 1
'make' returned the following error: make: Entering directory `/tmp/oct-s3ldFY/java-1.2.7/src'
if [ "Xamd64X" = "XX" ]; then \
                        /usr/local/octave/3.4.0/bin/mkoctfile-3.4.0 -DHAVE_OCTAVE_34 -v -DJAVAPKG_BUILD -I/usr/lib/jvm/include -I/usr/lib/jvm/include/linux -o __java__.oct __java__.cc ; \
            else \
                        /usr/local/octave/3.4.0/bin/mkoctfile-3.4.0 -DHAVE_OCTAVE_34 -v -DJAVAPKG_BUILD -DJAVA_ARCH=\\\"amd64\\\" -DJAVA_HOME=\\\"/usr/lib/jvm\\\" -I/usr/lib/jvm/include -I/usr/lib/jvm/include/linux -o __java__.oct __java__.cc ; \
            fi
g++ -c -fPIC -I/usr/local/octave/3.4.0/include/octave-3.4.0/octave/.. -I/usr/local/octave/3.4.0/include/octave-3.4.0/octave -I/usr/local/octave/3.4.0/include -I/usr/include/freetype2 -g -O2 -I/usr/lib/jvm/include -I/usr/lib/jvm/include/linux -DHAVE_OCTAVE_34 -DJAVAPKG_BUILD -DJAVA_ARCH=\"amd64\" -DJAVA_HOME=\"/usr/lib/jvm\" __java__.cc -o __java__.o
make: Leaving directory `/tmp/oct-s3ldFY/java-1.2.7/src'
error: called from `pkg>configure_make' in file /usr/local/octave/3.4.0/share/octave/3.4.0/m/pkg/pkg.m near line 1332, column 9
error: called from:
error:   /usr/local/octave/3.4.0/share/octave/3.4.0/m/pkg/pkg.m at line 783, column 5
error:   /usr/local/octave/3.4.0/share/octave/3.4.0/m/pkg/pkg.m at line 354, column 9


Chansup Byun <cbalways>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by efferre79 (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by cbalways (Submitted the item)
  • -email is unavailable- added by cbalways
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-14 jwe StatusNone Octave Forge
        Open/ClosedOpen Closed
    2011-02-14 cbalways Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code