help-octave
[Top][All Lists]
Advanced

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

Re: Excel Data in Octave


From: PhilipNienhuis
Subject: Re: Excel Data in Octave
Date: Fri, 27 Apr 2012 02:59:32 -0700 (PDT)

Timothy,

As this concerns an Octave-Forge package, please let's move this thread over
to the Octave-Forge mailing list (cc'd now): 
address@hidden

I've put some comments below just to skip extra postings - when replying
please first wipe 
"address@hidden"  from the To: or CC: address lists before clicking
"Send" button.


Timothy Field wrote
> 
>>Yes, please keep us informed on that.
>>
>>I do not know what is needed to get the java package installed on Mac OSX. 
>>There are some comments in the source files (notably ./src/__java__.cc)
indicating some OSX support, >but AFAIK none of the people recently working
on the Java package have ever been able to test it on >OSX.
>>
>>If you succeed you could help me add the relevant info to the Octave wiki
/ Java package section.
>>
>>As to .csv:
>>The latest io package release has csv2cell, which seems to be able to read
mixed numeric/text info in >.csv files (a known stumbling block for many
other .csv reading functions). In addition it is *much* faster >then many
other text read functions.
>>While csv2cell doesn't depend on Java, it is a compiled function, so I
think you'd need some sort of >development framework anyway.
>>Hopefully the OSX gurus jump in to explain how to proceed.
> 
> Okay, it looks like OS X will have a JDK Pre-installed. It should be added
> to the wiki that mac users should check for the most up to date version
> but should have it installed through the software update program. On my
> machine I confirmed that I had it by looking for it here:
> 
>> javac -version
> javac 1.6.0_31
>> which javac
> /usr/bin/javac
> 

Did you set the JAVA_HOME environment variable first?

In Octave: 
setenv ("JAVA_HOME", "/full/path/to/Java/JDK")
such that <JAVA_HOME>/jre/bin/client  (with some arch subdir setting
somewhere in between)
points to the jvm library?

On some 64-bit systems (which may include OSX) it should rather point to
<JAVA_HOME>/jre/bin/server   (with arch in between somewhere)
or perhaps a symlink is needed in ./server to the jvm in ./client.

Have a look at the wiki (Java pkg section),
http://www.octave.org/wiki/index.php?title=Java_package
(still incomplete as to these specific gotchas :-(  )



> Then for downloading the java package, with the file saved under a more
> specific folder and the correct path added, I called 'pkg install -verbose
> java-1.2.8.tar.gz' and got the following:
> 
> error: feval: function `java_exit' not found
> error: feval: function `java_exit' not found
> error: feval: function `java_exit' not found
> ./configure: line 3257: test: too many arguments
> configure: WARNING: this package requires at least Java-1.5
> mkdir (/var/tmp/oct-8pbW5P)
> untar (java-1.2.8.tar.gz, /var/tmp/oct-8pbW5P)
> checking for gcc... /usr/bin/gcc-4.2
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether /usr/bin/gcc-4.2 accepts -g... yes
> checking for /usr/bin/gcc-4.2 option to accept ISO C89... none needed
> checking for mkoctfile...
> /Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0
> retrieving compile and link flags from
> /Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0
> checking for F77_FUNC... yes
> checking for octave...
> /Applications/Octave.app/Contents/Resources/bin/octave-3.4.0
> checking for OCTAVE_VERSION in Octave... 3.4.0
> checking for octave_config_info('canonical_host_type') in Octave...
> x86_64-apple-darwin10.7.3
> checking for octave_config_info('SHLEXT') in Octave... dylib
> checking whether ln -s works... yes
> checking for ranlib... ranlib
> checking for strip... strip
> checking for java... java
> checking for javac... javac
> checking for jar... jar
> checking for Java version... 1.6.0_31
> configure: creating ./config.status
> config.status: creating Makeconf
>  
>   "$prefix" is /Users/timothyfield/octave/java-1.2.8
>   "$exec_prefix" is ${prefix}
> 
> octave commands will install into the following directories:
>    m-files:  
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/site/m/octave-forge
>    oct-files:
> /Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/oct/x86_64-apple-darwin10.7.3/octave-forge
>    binaries: 
> /Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/exec/x86_64-apple-darwin10.7.3
> alternatives:
>    m-files:  
> /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/site/octave-forge-alternatives/m
>    oct-files:
> /Applications/Octave.app/Contents/Resources/libexec/octave/3.4.0/site/octave-forge-alternatives/oct/x86_64-apple-darwin10.7.3
> 
> shell commands will install into the following directories:
>    binaries:  ${exec_prefix}/bin
>    man pages: ${datarootdir}/man
>    libraries: ${exec_prefix}/lib
>    headers:   ${prefix}/include
> 
> octave-forge is configured with
>    octave:     
> /Applications/Octave.app/Contents/Resources/bin/octave-3.4.0 (version
> 3.4.0)
>    mkoctfile:  
> /Applications/Octave.app/Contents/Resources/bin/mkoctfile-3.4.0 for Octave
> 0
>    java:        Java Development Kit not found
> 
> find . -name NOINSTALL -print    # shows which toolboxes won't be
> installed
> 
> Java support not compiled
> warning: function /Users/timothyfield/octave/java-1.2.8/dlgtest.m shadows
> a core library function
> warning: function /Users/timothyfield/octave/java-1.2.8/errordlg.m shadows
> a core library function
> :
> <snip>
> :
> warning: function /Users/timothyfield/octave/java-1.2.8/warndlg.m shadows
> a core library function
> 
> It looks like everything ran fine until it couldn't find the JDK. 'Java
> support not compiled' (just before 
> 

No, a bit higher up it says:
"   java:        Java Development Kit not found"
which usually means that JAVA_HOME wasn't set properly.



> the shadows a core... list) doesn't sound promising,
> 

I'd rather say it sounds intriguing.....



>  but when I checked 'pkg list' it said that I had installed the java
> package.
> 

Yeah, you hit two of my favorite issues on the head:

- Java pkg silently installing only half way when a JDK isn't found by the
Java package install scripts. 
I have some ideas on how to fix this (checking the JDK / JAVA_HOME setting
in preinstall.m), but no time now.

- Octave's pkg command not being able to roll back a failed package
installation. 
Luckily, you can do a manual:
pkg uninstall java
from within Octave.

<snip>
:


> I think the problem with 'No support for Excel .xls I/O' has to do with
> the java support. If so, are there any red flags in the error list above
> that signal that I'm missing important pieces to the java package?
> 

Yes, the Java development kit (JDK) not found message.

Anyway, I appreciate your experiments with the Java pkg on OSX.

<To be continued on Octave-Forge>


--
View this message in context: 
http://octave.1599824.n4.nabble.com/Excel-Data-in-Octave-tp4590377p4592273.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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