help-octave
[Top][All Lists]
Advanced

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

Re: [OctDev] xlread in 3.6.1: Still stuck with something very basic


From: Philip Nienhuis
Subject: Re: [OctDev] xlread in 3.6.1: Still stuck with something very basic
Date: Thu, 13 Dec 2012 20:52:42 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hi Ted,

Sorry to hear about these continuing troubles.

1. OctDev mailing list is no more. It is superseded by the common "core" Octave and Octave-Forge mailing lists. I've adjusted the cc address.

2. Read on:

Swift, address@hidden wrote:
Philip,
Sorry in advance for a long dump, but I want to put as many pertinent (I hope) cards on 
the table. I'm convinced this is some "newbie" problem with the basic steps of 
installing any typical open source software, but it's very frustrating.

I'm still stuck with an error in "chk_spreadsheet_support"
Pre_install now returns with no errors:

octave:1>  pre_install
octave:2>

The pre_install.m I sent you (? can't remember) is needed before you *install* or *reinstall* the Java package. It has nothing to do with the io package, let alone chk_spreadsheet_support.m

But when I run " chk_spreadsheet_support", it still apparently can't find what 
it needs:

octave:3>  chk_spreadsheet_support ('', 3)

Checking Excel/ActiveX/COM... not working.

Checking Java support...
   1. Checking Java JRE presence.... OK, found one.
   2. Checking Octave Java support... error: No Java support found: 
`java_invoke'
  undefined near line 49 column 16.
error: called from:
error:   
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\io-1.0.18\chk_spreadsheet_support.m
 at line 176, column 3

This just says that the Java package doesn't work properly. It appears that the function java_invoke simply hasn't been compiled.

I've reinstalled the 3.6.1 distribution following the instructions at 
http://wiki.octave.org/Octave_for_Windows#Manual_installation_instructions.

That's odd as the 3.6.1 distribution is self-contained & complete.

Why didn't you try the 3.6.2-MSVC2010 binary? It is newer and contains newer versions of the io and Java package.

Here is my octaverc, with some very basic changes, following the instructions 
in the comments:

## System-wide startup file for Octave.
##
## This file should contain any commands that should be executed each
## time Octave starts for every user at this site.
## This version is in the rebuilt install folder 
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\site\m\startup
more off
PS1('octave:\#>  ')
## Uncomment and change following line for your preferred editor
EDITOR('C:\\Program Files\\Notepad++\\notepad++.exe');
prefix=octave_config_info('prefix');
EXEC_PATH([EXEC_PATH,';',prefix,'\gnuplot\binary']);
EXEC_PATH([EXEC_PATH,';',prefix,'\mingw32\bin;',prefix,'\msys\bin']);
EXEC_PATH([EXEC_PATH,';',prefix,'\gs\gs9.04\bin']);
graphics_toolkit('fltk');
EXEC_PATH([EXEC_PATH,';',prefix,'\pstoedit']);
EXEC_PATH([EXEC_PATH,';',prefix,'\fig2dev']);
## Uncomment following 4 lines in order to set env vars for building oct files 
and pkgs
    regexprep(prefix,'\\','/'); % change backslash to slash
    prefix_e=['/',regexprep(regexprep(prefix,'\\','/'),':','')]; % remove disk 
double colon
    setenv('LDFLAGS',['-L',prefix_e,'/lib -Wl,--allow-multiple-definition 
-Wl,--enable-auto-import 
-Wl,--enable-runtime-pseudo-reloc-v2-Wl,--stack,10485760']);
    setenv('CPPFLAGS',['-I',prefix_e,'/include']);
## Uncomment following line and set respective JDK location in order to install 
java pkg
## setenv('JAVA_HOME','/c/Octave/jdk1.7.0');
## Was: setenv('JAVA_HOME','C:/Program Files (x86)/Java/jdk1.7.0_09');
setenv('JAVA_HOME','C:\Octave\Octave3.6.1_gcc4.6.2\jdk1.7.0_09');

???? Did you check that that directory "jdk1.7.0_09" really exists in C:\Octave\Octave3.6.1_gcc4.6.2 ?
That surely doesn't appear to be a "normal" location for the Java JDK.

Please tell us the contents of
  C:\Program Files\Java
or if that doesn't exist,
  C:\Program Files (X86)\Java
Do you have a subdirectory there whose name starts with "jdk" ? And one whose name starts with "jre" ?

<snip>
Here are the basic paths:

octave:4>  path
Octave's search path contains the following directories:
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\miscellaneous-1.1.0\i686-pc-mingw32-api-v48+
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\miscellaneous-1.1.0
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\io-1.0.18\i686-pc-mingw32-api-v48+
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\io-1.0.18
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\image-1.0.15\i686-pc-mingw32-api-v48+
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\image-1.0.15
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\gnuplot-1.0.1
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\general-1.3.1\i686-pc-mingw32-api-v48+
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\general-1.3.1
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\packages\java-1.2.8
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\3.6.1\site\oct\i686-pc-mingw32
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\site\oct\api-v48+\i686-pc-mingw32
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\site\oct\i686-pc-mingw32
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\site\m
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\site\api-v48+\m
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\site\m
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\site\m\startup
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\3.6.1\oct\i686-pc-mingw32
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\audio
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\deprecated
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\elfun
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\general
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\geometry
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\help
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\image
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\io
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\linear-algebra
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\miscellaneous
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\optimization
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\path
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\pkg
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\plot
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\polynomial
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\prefs
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\set
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\signal
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\sparse
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\specfun
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\special-matrix
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\startup
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\statistics
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\statistics\base
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\statistics\distributions
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\statistics\models
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\statistics\tests
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\strings
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\testfun
C:\Octave\Octave3.6.1_gcc4.6.2\share\octave\3.6.1\m\time

What is lacking here is a directory:
C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\java-1.2.8\i686-pc-mingw32-api-v48+
(watch out for line wrap!)
That is the directory that is supposed to contain the compiled Java functions. Little wonder that chk_spreadsheet_support.m cannot find java_invoke(). In my experience the usual cause of that directory not being created is that the Java package installation scripts can't find the Java JDK. Usually that is caused by a faulty or no JAVA_HOME setting or the Java executables not being in the Windows search PATH.

So, do you have a directory
 C:\Octave\Octave3.6.1_gcc4.6.2\lib\octave\packages\java-1.2.8
?
And if yes, what files does it contain?

Thinking that maybe chk_spreadsheet_support wasn't finding the Java JRE, I put 
its path in explicitely:

octave:5>  chk_spreadsheet_support 
('C:\Octave\Octave3.6.1_gcc4.6.2\jdk1.7.0_09', 3)

chk_spreadsheet_support does find the JRE (see above), as it finds java.exe. No problem so far. What it *doesn't* find are the compiled Java package functions (which reside in the directory I mentioned a few lines up, the one that doesn't seem to be in the path)

<snip>
The Octave java package is there and installed:

octave:2>  pkg list
Package Name   | Version | Installation directory
---------------+---------+-----------------------
       general *|   1.3.1 | ...\share\octave\packages\general-1.3.1
       gnuplot *|   1.0.1 | ...\share\octave\packages\gnuplot-1.0.1
         image *|  1.0.15 | ...\share\octave\packages\image-1.0.15
            io *|  1.0.18 | ...\share\octave\packages\io-1.0.18
          java *|   1.2.8 | ...\share\octave\packages\java-1.2.8
miscellaneous *|   1.1.0 | ...\share\octave\packages\miscellaneous-1.1.0

Yeah, Java package *looks* good but: - it can be deceiving. Very probably it has been silently miscompiled. That is one of the biggest frustrations with Octave / Java package users.

Once again, better try the 3.6.2 MSVC2010 Octave version. It is much easier for you and has all stuff precompiled. You can also find it on SourceForge / Octave-Forge, at the same place where you got Octave-3.6.1 IIRC there are some update packages for it, you can find those at the same location.

Before I can continue trying to help you with Octave-3.6.1, please answer all the questions I asked above.

Philip


======== Left in for completeness: =============
 __________________________________________
Ted Swift, Ph.D.
Staff Environmental Scientist, DWR Municipal Water Quality Investigations Branch
916-376-9718, address@hidden
Mailing: P.O. Box 942836 Sacramento, CA 94236-0001
Physical: 3500 Industrial Blvd., West Sacramento, CA  95691-6521
"Reality must take precedence over public relations, for Nature cannot be 
fooled." -Richard Feynman

-----Original Message-----
From: Philip Nienhuis [mailto:address@hidden
Sent: Friday, October 05, 2012 3:50 AM
To: Swift, Ted J.
Cc: address@hidden
Subject: Re: [OctDev] xlread in 3.6.1

Swift, Ted J. wrote:
-----Original Message-----
From: Philip Nienhuis [mailto:address@hidden
Sent: Thursday, October 04, 2012 8:23 AM
To: Swift, Ted J.; address@hidden
Subject: Re: [OctDev] xlread in 3.6.1

:
<Big snip>
:
Ted Swift wrote 3 Oct 2012:
    --------
Hello again, Philip,
I'm going back to the basics and taking a close look at
:
<snip>
:
Checking Java support...
     1. Checking Java JRE presence.... OK, found one.
     2. Checking Octave Java support... error: No Java support found: 
`java_invoke' undefined near line 49 column 16.
error: called from:
error:   
C:/Octave/Octave3.6.1_gcc4.6.2/share/octave/packages\io-1.0.18\chk_spreadsheet_support.m
 at line 176, column 3
octave:3>    system ('javac -version 2>    nul') ans =  1 octave:4>
system ('javac -version 2>    null') ans =  1 octave:5>


In the file 'null' is the message:
'javac' is not recognized as an internal or external command,
operable program or batch file.

There is a javac in the /bin subdirectory, however.
Any thoughts? Thank you.

Please keep list cc'd

Yes; clearly javac isn't in the PATH. Which makes sense as on Windows
systems, the<JDK>/bin directory is usually not in the PATH, unlike
*nix systems where there are usually symlinks to java, javac and jar
in /usr/bin

Apparently the relevant statements in preinstall.m that should fix this don't 
work properly.
So what you can do, in Octave, is (after setting JAVA_HOME):

    setenv ("PATH", [getenv('PATH') pathsep '/full/path/to/JDK/bin'])

(single quotes) where I suppose (but please check) that '/full/path/to/JDK/bin' 
boils down to 'C:/Program Files (x86)/Java/jdk1.7.0_05/bin'
and then again try to install the Java package.
If it doesn't work, try again with backslashes instead of forward slashes.

If none of this works I'm out of ideas.

Too soon... I forgot the very obvious options:

- Are you sure the Java package is loaded at all?
If you do (in Octave)
    pkg list

do you see in the output (possibly after scrolling down) a line like:

:
                 java *|   1.2.8 |
...\Octave\Octave-3.6.2\share\octave\packages\java-1.2.8
:

(line wrap!)
i.e., with the asterisk after the package name?
If not (when you don't see the asterisk) you should do (in Octave)
    pkg load java

and try again.

Philip


reply via email to

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