Hi Joseph:

Joseph A. Huwaldt wrote:
> Trying to install java-1.2.7 package on MacOS X 10.6 with:
>
> ver
> ----------------------------------------------------------------------
> GNU Octave Version 3.2.4
> GNU Octave License: GNU General Public License
> Operating System: Darwin 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23
> 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
> ----------------------------------------------------------------------
> Package Name   | Version | Installation directory
> ---------------+---------+-----------------------
>             io *|  1.0.13 | /Users/huwaldtj/octave/io-1.0.13
> miscellaneous *|   1.0.9 | /Users/huwaldtj/octave/miscellaneous-1.0.9
>          nurbs *|   1.3.0 | /Users/huwaldtj/octave/nurbs-1.3.0
>     statistics *|   1.0.7 | /Users/huwaldtj/octave/statistics-1.0.7
>
>
> I get the following:
>
> pkg -verbose install java-1.2.7.tar.gz
> ./configure: line 3257: test: too many arguments
> configure: WARNING: this package requires at least Java-1.5

^^^^
These two lines make me think of .tar.gz. format issues, see below.

> mkdir (/var/tmp/oct-PjTt25)
> untar (java-1.2.7.tar.gz, /var/tmp/oct-PjTt25)
> checking for gcc... /opt/local/bin/gcc-mp-4.4
> 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 /opt/local/bin/gcc-mp-4.4 accepts -g... yes
> checking for /opt/local/bin/gcc-mp-4.4 option to accept ISO C89... none
> needed
> checking for mkoctfile... mkoctfile
> retrieving compile and link flags from mkoctfile
> checking for F77_FUNC... yes
> checking for octave... octave
> checking for OCTAVE_VERSION in Octave... 3.2.4
> checking for octave_config_info('canonical_host_type') in Octave...
> i386-apple-darwin10.4.0
> 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_20
> configure: creating ./config.status
> config.status: creating Makeconf
>
>    "$prefix" is /Users/huwaldtj/octave/java-1.2.7
>    "$exec_prefix" is ${prefix}
>
> octave commands will install into the following directories:
>     m-files:   /opt/local/share/octave/3.2.4/site/m/octave-forge
>     oct-files:
> /opt/local/libexec/octave/3.2.4/site/oct/i386-apple-darwin10.4.0/octave-forg
> e
>     binaries:
> /opt/local/libexec/octave/3.2.4/site/exec/i386-apple-darwin10.4.0
> alternatives:
>     m-files:   /opt/local/share/octave/3.2.4/site/octave-forge-alternatives/m
>     oct-files:
> /opt/local/libexec/octave/3.2.4/site/octave-forge-alternatives/oct/i386-appl
> e-darwin10.4.0
>
> 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:      octave (version 3.2.4)
>     mkoctfile:   mkoctfile for Octave 4
>     java:        Java Development Kit not found
>
> find . -name NOINSTALL -print    # shows which toolboxes won't be installed
>
> Java support not compiled
>
>
> I have Java 1.6.0 (as it shows above) and all the java development tools on
> are on my path.  I have made many several attempts at this by setting
> $JAVA_HOME, $JAVA_ARCH, putting $JAVA_HOME on my PATH, putting
> $JAVA_HOME/bin on my path.  No luck.  Can anyone help with this?

(Please report back to the list on whether the hints below help you out.)

You have java-1.6, OK, but is it the runtime (jre) or the development 
kit (jdk - that's the one that is needed)?
(I suppose the latter as the java archiver is found, TTBOMK jar is not 
in the jre, so you should be OK then).

In octave, do
   getenv ("JAVA_HOME")
and see if it echoes the /full/path/to/the/jdk directory.
If not, do
   setenv ("JAVA_HOME", "/full/path/to/jdk/directory")
(forward slashes, e.g. /usr/lib/jvm/.../jdk_1.6.0_20)
and check again with getenv()

BTW I found that the java package can sometimes be hard to install for 
no apparent reason. On one of my Windows boxes it simply refuses to get 
installed although that box has the exact same setup as my other boxes; 
I worked around that by copying the octave/java packages directories 
(<>/share/octave/packages  and  <>/lib[exec]/octave/packages) from 
another Windows box with proper octave/java installation to that box and do
   pkg rebuild -auto java
to get it, uhm, "installed". It worked OK then. Perhaps a similar trick 
works on OSX too.

A not quite impossible gotcha is .tar.gz format problems. Several times 
I've repacked a stubborn java package using 7zip (by inserting a random 
small text file into it and have 7zip update the package on disk), after 
that it did install OK. (Now, 7zip is what I used on Windows, on OSX 
there may be similar tools.)
In such occasions I often saw similar configure messages as in your log 
above.

Good luck,

Philip

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to