help-octave
[Top][All Lists]
Advanced

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

Re: can't find qhull and HDF5 libs on octave 3.0 installing (share exper


From: guez offtsing
Subject: Re: can't find qhull and HDF5 libs on octave 3.0 installing (share experience)
Date: Sat, 29 Mar 2008 08:07:38 +0800

It took me about a month compiling octave. I insisted on it because of
my first experience of MPI-compilation. My oooooold Linux OS kill me
most time. It doesn't mean Novell Suse is a BAD OS. But a commercial
linux on transitional processors means support absence no doubt.
For my octave-3 installation, the following packages need be built from
source, gcc/g77 is the recommended compiler.

===>Metis, needed by SuiteSparse, partly needed by octave.
 You'd better edit the Makefile.in:
-------------
CC = gcc
OPTFLAGS = -O3
COPTIONS = -fexceptions -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-------------

===>BLAS, needed by suitesparse, lapack and octave.
I choose gotoblas.
If your CPU use SMP, -lpthread is recommended when link to blas.

===>LAPACK, needed by SuiteSparse, octave
You can use built gotoblas, just edit make.inc which copy from 
make.inc.example, 
and comment the blas entry in Makefile.

=> SuiteSparse, needed by octave
If your CPU use SMP, -lpthread is recommended when link to blas.
gfortran is unavailable on Suse EN9 server, so -lg2c needed when link to lapack.
The above two settings will be found in UFconfig/UFconfig.mk. 
Using intel compiler will get "undefined symbol" error somewhere.
It's a problem that SuiteSparse doesn't provide an install-script. 
You need created a script like this(errors have been corrected):
-------------
         INSTALL_DIR=/usr/local
    # Make sure the install directories exist
    if !(test -d $INSTALL_DIR/include);
    then
    echo $INSTALL_DIR/include did not exist, creating $INSTALL_DIR/include
    mkdir $INSTALL_DIR/include
    fi;
    if !(test -d $INSTALL_DIR/include/suitesparse);
    then
    echo $INSTALL_DIR/include/suitesparse did not exist, creating 
$INSTALL_DIR/include/suitesparse
    mkdir $INSTALL_DIR/include/suitesparse
    fi;
    if !(test -d $INSTALL_DIR/lib);
    then
    echo $INSTALL_DIR/lib did not exist, creating $INSTALL_DIR/lib
    mkdir $INSTALL_DIR/lib
    fi;
    # Copy all the files to the new directories
    echo Copying UMFPACK files into $INSTALL_DIR...
    cp UFconfig/UFconfig.h $INSTALL_DIR/include/suitesparse
    cp UMFPACK/Include/*.h $INSTALL_DIR/include/suitesparse
    cp UMFPACK/Lib/libumfpack.a $INSTALL_DIR/lib
    cp UMFPACK/Include/*.h $INSTALL_DIR/include/suitesparse
    cp UMFPACK/Lib/libumfpack.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libumfpack.a
    echo Copying AMD files into $INSTALL_DIR/...
    cp AMD/Include/*.h $INSTALL_DIR/include/suitesparse
    cp AMD/Lib/libamd.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libamd.a
    echo Copying CAMD files into $INSTALL_DIR/...
    cp CAMD/Include/*.h $INSTALL_DIR/include/suitesparse
    cp CAMD/Lib/libcamd.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libcamd.a
    echo Copying COLAMD files into $INSTALL_DIR/...
    cp COLAMD/Include/*.h $INSTALL_DIR/include/suitesparse
    cp COLAMD/Lib/libcolamd.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libcolamd.a
    echo Copying CCOLAMD files into $INSTALL_DIR/...
    cp CCOLAMD/Include/*.h $INSTALL_DIR/include/suitesparse
    cp CCOLAMD/Lib/libccolamd.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libccolamd.a
    echo Copying CXSPARSE files into $INSTALL_DIR/...
    cp CHOLMOD/Include/*.h $INSTALL_DIR/include/suitesparse
    cp CHOLMOD/Lib/libcholmod.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libcholmod.a
    cp CHOLMOD/Lib/libcholmod.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libcholmod.a
    echo Copying CHOLMOD files into $INSTALL_DIR/...
    cp CXSparse/Include/*h $INSTALL_DIR/include/suitesparse
    cp CXSparse/Lib/libcxsparse.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libcxsparse.a
    echo Copying METIS files into $INSTALL_DIR/...
    cp metis-4.0/Lib/*.h $INSTALL_DIR/include/suitesparse
    cp metis-4.0/libmetis.a $INSTALL_DIR/lib
    ranlib $INSTALL_DIR/lib/libmetis.a
-------------

=>FFTW, needed by octave
octave uses the dynamic lib of fftw, add --enable-shared when you
configure.

=>GLPK, needed by octave
nothing special

=>Qhull, needed by octave
octave MUST use the dynamic lib of qhull, you would edit the Makefile,
add libqhull.so entry manually. octave also invoke headers of qhull, pls
put them on {prefix}/lib/qhull/.

=>curl, needed by octave
Suse YaST use libcurl.so.2, which is too old for octave. you would
rename newly libcurl to workaround and use --with-curl=<newcurl> option
when compile octave.

===>krb5, needed by curl
krb5 must compile using gcc. intel compiler is not trusted by krb5.

===>lam-mpi, needed by hdf5 and octave.
Although I have commercial mpich, it is not the right one octave
chooses.
some "undefined symbol" error will bounce up at the very end of octave
compiling. Plz add --enable-shared when configure.

===>szip, needed by hdf5
intel compiler cannot pass make-check.

=>hdf5, needed by octave
hdf5-1.8 is current not surport by octave, so add
"--enable-deprecated-symbols --with-default-api-version=v16" to
workaround. 
--enable-shared is also needed. Create shared lib is active by default.
but if set api-version to 16, shared lib will not be created. Maybe it
is a bug?

Finally, come to compile octave.
specify BLAS_LIBS to use gotoblas. At the last step you may encounter an
error like this:
------------------
mpiCC -I/usr/local/include  -I. -I.. -I../liboctave -I../src
-I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast
-g -O2 -rdynamic \
-L..  -fPIC -L/usr/local/lib -o octave \
main.o  \
-L../liboctave -L../libcruft -L../src -Wl,-rpath
-Wl,/usr/local/lib/octave-3.0.0 \
-loctinterp -loctave  -lcruft   \
 -lumfpack -lamd -lcamd -lcolamd \
-lcholmod -lccolamd -lcxsparse -llapack /usr/local/lib/libgoto.a \
-lfftw3 -lreadline  -lncurses -ldl -lhdf5 -lz -lm  -L/usr/local/lib
-L/usr/lib/gcc-lib/ia64-suse-linux/3.3.3
-L/usr/lib/gcc-lib/ia64-suse-linux/3.3.3/../../../../ia64-suse-linux/lib
-L/usr/lib/gcc-lib/ia64-suse-linux/3.3.3/../../.. -lhdf5 -lz -lfrtbegin
-lg2c -lm -llammpio -llamf77mpi -lmpi -llam -laio -lutil -ldl -lpthread
../liboctave/liboctave.so: undefined reference to `METIS_NodeND'
../liboctave/liboctave.so: undefined reference to
`METIS_NodeComputeSeparator'
collect2: ld returned 1 exit status
mpiCC: No such file or directory
make[2]: *** [octave] Error 1
make[2]: Leaving directory `/root/octave-3.0.0/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory `/root/octave-3.0.0'
make: *** [all] Error 2
-------------------------
It seems a litter bug that octave not link to metis. cd src, add a
-lmetis to the command line, excute the compile. after return to parent
dir, all will ok. 
intel compiler is not proper for octave in my experience. I ever build
one successfully use mpicc-icc, but segment fault occurs
when ./run-octave test, and cxsparse gives wrong result.

Hope this can help others.
Regards, 


在 2008-03-26三的 12:54 +0900,Tatsuro MATSUOKA写道:
> Hello
> 
> I'm glad to hear your finding the right way.
> 
> Regards
> 
> Tatsuro
> --- guez offtsing <address@hidden> wrote:
> 
> > Your words DO direct me right way. 
> > I look in the HDF5 Makefile and set the octave's compilers same as them.
> > Now all libs are ready.
> > Thank you.
> 
> 
> --------------------------------------
> Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
> http://pr.mail.yahoo.co.jp/toolbar/




reply via email to

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