* Ralf Treinen <[email protected]> [2009-06-10 21:25]:

> Package: libsofa1-dev,libsuitesparse-dev
> Version: libsofa1-dev/1.0~beta4-1
> Version: libsuitesparse-dev/1:3.4.0-1
> Severity: serious
> User: [email protected]
> Usertags: edos-file-overwrite
> 
> Date: 2009-06-10
> Architecture: amd64
> Distribution: sid
> 
> [snip]
>
> Here is a list of files that are known to be shared by both packages
> (according to the Contents file for sid/amd64, which may be slightly
> out of sync):
> 
>   usr/lib/libcsparse.so

This library is built from the a version of SuiteSparse's CSparse
library.  More precisely, the file extlibs/csparse/csparse.c in
sofa-framework is a like a concatenation of the files CSparse/Source/*.c
in the suitesparse package.

I tried to build sofa-framework against libsuitesparse-dev using the
simple patch attached below.  However, the compilation fials.  I did not
investigate this issuedeeply, but it seems that extlibs/csparse/csparse.c
contains an old version of SuiteSparse's CSparse.

I see the following solutions for this:

1) Ask the upstream authors to link agaisnt SuiteSparse instead of
   shipping a copy of the CSparse library and adapt their code for working
   with a modern version of the library.
   
2) Link against an internal version of CSparse but put it somewhere else
   (e.g. /usr/lib/sofa/libcsparse*).  I do not now if this is fully
   appropriate for the libcsparse.so symlink included in libsofa1-dev.

Cheers,

-- 
Rafael
--- sofa-framework-1.0~beta4.orig/Sofa.pro
+++ sofa-framework-1.0~beta4/Sofa.pro
@@ -21,7 +21,7 @@
 #CSParse
 
 contains(DEFINES,SOFA_HAVE_CSPARSE){
-	SUBDIRS += extlibs/csparse
+#	SUBDIRS += extlibs/csparse
 }
 
 
--- sofa-framework-1.0~beta4.orig/sofa.cfg
+++ sofa-framework-1.0~beta4/sofa.cfg
@@ -253,7 +253,7 @@
 contains(DEFINES,SOFA_HAVE_CSPARSE){
   SOFA_EXT_LIBS *= -lcsparse$$LIBSUFFIX
   # use csparse headers included in extlibs
-  INCLUDEPATH *= $$SOFA_DIR/extlibs/csparse
+#  INCLUDEPATH *= $$SOFA_DIR/extlibs/csparse
 }
 
 ########################################################################
--- sofa-framework-1.0~beta4.orig/modules/sofa/component/linearsolver/SparseLUSolver.h
+++ sofa-framework-1.0~beta4/modules/sofa/component/linearsolver/SparseLUSolver.h
@@ -32,7 +32,7 @@
 #include <sofa/component/linearsolver/FullMatrix.h>
 #include <sofa/helper/map.h>
 #include <math.h>
-#include <csparse.h>
+#include <suitesparse/cs.h>
 
 namespace sofa {
 
--- sofa-framework-1.0~beta4.orig/modules/sofa/component/linearsolver/SparseCholeskySolver.h
+++ sofa-framework-1.0~beta4/modules/sofa/component/linearsolver/SparseCholeskySolver.h
@@ -34,7 +34,7 @@
 #include <sofa/component/component.h>
 #include <sofa/helper/map.h>
 #include <math.h>
-#include <csparse.h>
+#include <suitesparse/cs.h>
 
 namespace sofa {
 

Reply via email to