help-octave
[Top][All Lists]
Advanced

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

Re: Help compiling CVS 2.9.3


From: Quentin Spencer
Subject: Re: Help compiling CVS 2.9.3
Date: Fri, 28 Oct 2005 16:27:02 -0500
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Andy Adler wrote:

On Fri, 28 Oct 2005, Quentin Spencer wrote:

Andy Adler wrote:

I'm trying to get the CVS to compile with all the sparse matrix
features on a Xandros (debian) box. I'm having trouble with
cholmod and metis.

OK, I tried configuring current CVS on my Fedora box with ufsparse
installed and no metis, and it passed all of the ufsparse-related tests,
including this one. It's not obvious to me what the source of your
problem here is, but I did notice something I hadn't thought of before.
The Fedora Extras development RPMS are build on gcc 4 (and a
particularly bleeding-edge version of it), and it appears you're using
3.3.5.  That could probably cause plenty of other problems even if it
isn't causing this one. I'd suggest building ufsparse locally and then
see what results you get.

Thanks,

I've ditched METIS, and I've followed the script in your ufsparse.spec
file to install UFSparse into /usr/local/lib and /usr/local/include/ufsparse

I've needed to make the following patches to octave
address@hidden:~/octave$ cvs diff
 Index: configure.in
 ===================================================================
 RCS file: /cvs/octave/configure.in,v
 retrieving revision 1.491
 diff -r1.491 configure.in
 839c839
 <           AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)],
 ---
 >           $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)],
 Index: liboctave/oct-sparse.h
 ===================================================================
 RCS file: /cvs/octave/liboctave/oct-sparse.h,v
 retrieving revision 1.1
 diff -r1.1 oct-sparse.h
 35c35
 < #if defined (HAVE_UFSPARSE_UMFPACK_h)
 ---
 > #if defined (HAVE_UFSPARSE_UMFPACK_H)

Now, I'm seeing this error during linking.

 address@hidden:~/octave/liboctave$ make liboctave.so

 pic/CSparse.o(.bss+0x0):/home/andy/octave/liboctave/CSparse.cc:106: multiple 
definition of `ccolamd_printf'
 pic/sparse-base-chol.o(.bss+0x0):/home/andy/octave/liboctave/str-vec.h:37: 
first defined here
 ...


Any more ideas?



I compiled metis and ufsparse with metis support and tried building with the following patch applied (fixes one more error in configure.in):


Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.491
diff -u -r1.491 configure.in
--- a/configure.in 27 Oct 2005 02:44:43 -0000 1.491
+++ b/configure.in 28 Oct 2005 21:10:08 -0000
@@ -836,14 +836,14 @@
with_cholmod=yes], [
AC_CHECK_LIB(cholmod_start, cholmod,
[CHOLMOD_LIBS="-lcholmod -cblas -lmetis"; with_cholmod=yes], [],
- AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)],
+ $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)],
$AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS -lmetis)
else
AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod";
with_cholmod=yes], [
AC_CHECK_LIB(cholmod_start, cholmod, [CHOLMOD_LIBS="-lcholmod -cblas";
with_cholmod=yes], [],
- AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)],
+ $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)],
$AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)
fi

Index: liboctave/oct-sparse.h
===================================================================
RCS file: /cvs/octave/liboctave/oct-sparse.h,v
retrieving revision 1.1
diff -u -r1.1 oct-sparse.h
--- a/liboctave/oct-sparse.h 27 Oct 2005 02:20:17 -0000 1.1
+++ b/liboctave/oct-sparse.h 28 Oct 2005 21:10:11 -0000
@@ -32,7 +32,7 @@
extern "C" {
#endif

-#if defined (HAVE_UFSPARSE_UMFPACK_h)
+#if defined (HAVE_UFSPARSE_UMFPACK_H)
#include <ufsparse/umfpack.h>
#elif defined (HAVE_UMFPACK_UMFPACK_H)
#include <umfpack/umfpack.h>




When I tried to build, I didn't even get as far as you have. It fails with the following error:


make liboctave

...

g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -g -O2 sparse-base-chol.cc -o pic/sparse-base-chol.o sparse-base-chol.cc: In member function ‘octave_idx_type sparse_base_chol<chol_type, chol_elt, p_type>::sparse_base_chol_rep::init(const chol_type&, bool)’:
sparse-base-chol.cc:100: error: ‘FALSE’ was not declared in this scope
sparse-base-chol.cc:140: error: ‘TRUE’ was not declared in this scope
make[2]: *** [pic/sparse-base-chol.o] Error 1
make[2]: Leaving directory `/home/qspencer/octave/cvs/liboctave'
make[1]: *** [liboctave] Error 2
make[1]: Leaving directory `/home/qspencer/octave/cvs'
make: *** [liboctave] Error 2

I suspect the problem has something to do with gcc 4, which is more strict about enforcing the C/C++ standards than previous versions, but it's not obvious to me how to fix this. I think the code here is David Bateman's creation. Are you reading, David?

-Quentin



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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