octave-maintainers
[Top][All Lists]
Advanced

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

Re: java package and MacOS


From: Ben Abbott
Subject: Re: java package and MacOS
Date: Tue, 27 Nov 2012 15:58:45 -0500

On Nov 25, 2012, at 6:27 PM, Ben Abbott wrote:

> On Nov 25, 2012, at 3:29 PM, Alexander Hansen wrote:
> 
>> On 11/25/12 12:37 PM, Ben Abbott wrote:
>>> Adding the Octave Forge java package to core Octave breaks building Octave 
>>> on MacOS X.
>>> 
>>>     http://hg.savannah.gnu.org/hgweb/octave/rev/acf0addfc610
>>> 
>>> libtool: link: /opt/local/bin/g++-mp-4.5  -o dldfcn/.libs/__java__.so 
>>> -bundle  dldfcn/.libs/dldfcn___java___la-__java__.o   -L/opt/local/lib 
>>> ./.libs/liboctinterp.dylib -L/opt/local/libexec/llvm-3.1/lib 
>>> -L/opt/local/lib/gcc45/gcc/x86_64-apple-darwin11/4.5.4 
>>> -L/opt/local/lib/gcc45/gcc/x86_64-apple-darwin11/4.5.4/../../.. 
>>> -L/opt/local/lib/gcc45 
>>> /Users/bpabbott/Development/mercurial/default/sources/liboctave/.libs/liboctave.dylib
>>>  -lfltk_gl -lfltk -lpthread /opt/local/lib/libhdf5.dylib 
>>> /opt/local/lib/libfontconfig.dylib /opt/local/lib/libiconv.dylib 
>>> /opt/local/lib/libfreetype.dylib -lz -lbz2 /opt/local/lib/libexpat.dylib 
>>> /opt/local/lib/libX11.dylib /opt/local/lib/libxcb.dylib 
>>> /opt/local/lib/libXau.dylib /opt/local/lib/libXdmcp.dylib -lLLVMAsmParser 
>>> -lLLVMInstrumentation -lLLVMLinker -lLLVMArchive -lLLVMBitReader 
>>> -lLLVMDebugInfo -lLLVMJIT -lLLVMipo -lLLVMVectorize -lLLVMBitWriter 
>>> -lLLVMTableGen -lLLVMHexagonCodeGen -lLLVMHexagonAsmPrinter 
>>> -lLLVMHexagonDesc -lLLVMHexagonInfo
>> -lLLVMPTXCodeG
>> en -lLLVMPTXDesc -lLLVMPTXInfo -lLLVMPTXAsmPrinter -lLLVMMBlazeDisassembler 
>> -lLLVMMBlazeAsmParser -lLLVMMBlazeCodeGen -lLLVMMBlazeDesc -lLLVMMBlazeInfo 
>> -lLLVMMBlazeAsmPrinter -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo 
>> -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter 
>> -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMCellSPUCodeGen 
>> -lLLVMCellSPUDesc -lLLVMCellSPUInfo -lLLVMMipsDisassembler 
>> -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo 
>> -lLLVMMipsAsmPrinter -lLLVMARMDisassembler -lLLVMARMAsmParser 
>> -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter 
>> -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCAsmPrinter 
>> -lLLVMPowerPCInfo -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo 
>> -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser 
>> -lLLVMX86Disassembler -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter 
>> -lLLVMX86Utils -lLLVMMCDisassembler -lLLVMMCParser -lLLVMInterpreter 
>> -lLLVMCodeGen -lLLVMScalarOpts
>> -l
>> LLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT 
>> -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject 
>> -lLLVMCore -lLLVMSupport ../liboctave/.libs/liboctave.dylib -lstdc++ 
>> -lcholmod -lmetis -lumfpack -lsuitesparseconfig -lamd -lcamd -lcolamd 
>> -lccolamd -lcxsparse /opt/local/lib/libarpack.dylib -ltatlas -lqrupdate 
>> /opt/local/lib/libfftw3.dylib /opt/local/lib/libfftw3f.dylib -llapack 
>> -lcblas -lf77blas -latlas -lreadline -lncurses /opt/local/lib/libpcre.dylib 
>> -ldl /opt/local/lib/gcc45/libgfortran.dylib -lm  -O0 -m64 -pthread 
>> -Wl,-dylib_file 
>> -Wl,/usr/fubar/lib/octave/3.7.0+/liboctave.1.dylib:/Users/bpabbott/Development/mercurial/default/sources/liboctave/.libs/liboctave.dylib
>>    -pthread -framework AGL -framework OpenGL -framework ApplicationServices 
>> -framework Cocoa
>>> Undefined symbols for architecture x86_64:
>>> "_JNI_CreateJavaVM", referenced from:
>>>     initialize_jvm()      in dldfcn___java___la-__java__.o
>>> "_JNI_GetCreatedJavaVMs", referenced from:
>>>     initialize_jvm()      in dldfcn___java___la-__java__.o
>>> ld: symbol(s) not found for architecture x86_64
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [dldfcn/__java__.la] Error 1
>>> make[2]: *** [all] Error 2
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all] Error 2
>>> 
>>> Looking at config.log, I have the follow defined.
>>> 
>>> #define JAVA_ARCH ""
>>> #define JAVA_HOME ""
>>> ac_cv_prog_JAVA=java
>>> ac_cv_prog_JAVAC=javac
>>> JAVA='java'
>>> JAVAC='javac'
>>> JAVA_CPPFLAGS=''
>>> JAVA_LIBS=''
>>> 
>>> Ben
>>> 
>> 
>> Unless I missed seeing it, I didn't notice anything referencing a Java
>> library in that linker line, so that would indeed result in missing
>> symbols. :-)
>> 
>> What happens if you set JAVA_HOME before configuring, e.g. by
>> 
>> export JAVA_HOME=`/usr/libexec/java_home`
>> 
>> ?
> 
> I haven't tried JAVA_HOME, but setting JAVA_LIBS allowed the build to 
> complete.
> 
>       export JAVA_LIBS="-framework JavaVM"
> 
> Maybe this should be set in configure.ac for MacOS?
> 
> Ben

Carlo's change to configure.ac works for me.

http://octave.1599824.n4.nabble.com/changeset-for-configuring-with-Java-on-OSX-tt4647251.html

When I try "dlgtest(0)" I get ...

        Java JDK home directory  does not exist.
        Please adapt java_home in dlgtest.m.

Setting JAVA_HOME to that used during the build gives ...

        setenv JAVA_HOME "/System/Library/Frameworks/JavaVM.framework/Home"

Now "dlgtest(0)" results in ...

        0 ... STOP
        1 ... listdlg tests
        2 ... errordlg tests
        3 ... warndlg tests
        4 ... helpdlg tests
        5 ... inputdlg tests
        6 ... TeX code tests
        Run which test?   [0] > 

Is this the expected result?

Ben






reply via email to

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