|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
octave-3.0.2: compilation error csparse.ccHi,
I get an error during compilation of octave-3.0.2. Architecture: Linux localhost.localdomain 2.6.18-92.1.13.el5 #1 SMP Wed Sep 24 16:44:34 EDT 2008 i686 i686 i386 GNU/Linux gcc: version 4.1.2 g++: version 4.1.2 make[2]: Entering directory `/opt/octave/octave-3.0.2/liboctave' g++ -c -I/usr/include/suitesparse -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -g -O2 CSparse.cc -o pic/CSparse.o CSparse.cc: In member function ‘ComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const Matrix&, octave_idx_type&, double&, void (*)(double), bool) const’: CSparse.cc:5769: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’ CSparse.cc: In member function ‘SparseComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const SparseMatrix&, octave_idx_type&, double&, void (*)(double), bool) const’: CSparse.cc:6012: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’ CSparse.cc: In member function ‘ComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const ComplexMatrix&, octave_idx_type&, double&, void (*)(double), bool) const’: CSparse.cc:6303: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’ CSparse.cc: In member function ‘SparseComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const SparseComplexMatrix&, octave_idx_type&, double&, void (*)(double), bool) const’: CSparse.cc:6525: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’ make[2]: *** [pic/CSparse.o] Error 1 make[2]: Leaving directory `/opt/octave/octave-3.0.2/liboctave' make[1]: *** [liboctave] Error 2 make[1]: Leaving directory `/opt/octave/octave-3.0.2' make: *** [all] Error 2 I attached the config.log here: config.log I need help to resolve this issue. Please let me know if you need more information. Thanks for your help and advice. Ciao, Juergen |
|
|
Re: octave-3.0.2: compilation error csparse.ccOn Fri, Oct 10, 2008 at 4:18 AM, JuergenNeubauer
<jneubauer@...> wrote: > > Hi, > > I get an error during compilation of octave-3.0.2. > > Architecture: Linux localhost.localdomain 2.6.18-92.1.13.el5 #1 SMP Wed Sep > 24 16:44:34 EDT 2008 i686 i686 i386 GNU/Linux > > gcc: version 4.1.2 > g++: version 4.1.2 > > make[2]: Entering directory `/opt/octave/octave-3.0.2/liboctave' > g++ -c -I/usr/include/suitesparse -fPIC -I. -I.. -I../liboctave -I../src > -I../libcruft/misc -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow > -Wold-style-cast -g -O2 CSparse.cc -o pic/CSparse.o > CSparse.cc: In member function 'ComplexMatrix > SparseComplexMatrix::fsolve(MatrixType&, const Matrix&, octave_idx_type&, > double&, void (*)(double), bool) const': > CSparse.cc:5769: error: invalid conversion from 'void (*)(int, char*, int, > char*)' to 'void (*)(int, const char*, int, const char*)' > CSparse.cc: In member function 'SparseComplexMatrix > SparseComplexMatrix::fsolve(MatrixType&, const SparseMatrix&, > octave_idx_type&, double&, void (*)(double), bool) const': > CSparse.cc:6012: error: invalid conversion from 'void (*)(int, char*, int, > char*)' to 'void (*)(int, const char*, int, const char*)' > CSparse.cc: In member function 'ComplexMatrix > SparseComplexMatrix::fsolve(MatrixType&, const ComplexMatrix&, > octave_idx_type&, double&, void (*)(double), bool) const': > CSparse.cc:6303: error: invalid conversion from 'void (*)(int, char*, int, > char*)' to 'void (*)(int, const char*, int, const char*)' > CSparse.cc: In member function 'SparseComplexMatrix > SparseComplexMatrix::fsolve(MatrixType&, const SparseComplexMatrix&, > octave_idx_type&, double&, void (*)(double), bool) const': > CSparse.cc:6525: error: invalid conversion from 'void (*)(int, char*, int, > char*)' to 'void (*)(int, const char*, int, const char*)' > make[2]: *** [pic/CSparse.o] Error 1 > make[2]: Leaving directory `/opt/octave/octave-3.0.2/liboctave' > make[1]: *** [liboctave] Error 2 > make[1]: Leaving directory `/opt/octave/octave-3.0.2' > make: *** [all] Error 2 > > I attached the config.log here: > http://www.nabble.com/file/p19910718/config.log config.log > > I need help to resolve this issue. Please let me know if you need more > information. > > Thanks for your help and advice. > > Ciao, Juergen > -- Apparently there has been a subtle API change in SuiteSparse between 3.1 and 3.2. I believe the attached patch should solve the problem. I pushed this to the development sources; if nobody reports a compiler choking on this (IMHO it's standard C++, but a subtle issue), I'll transplant this into 3-0-x, so that it will appear in 3.0.4. regards -- RNDr. Jaroslav Hajek computing expert Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz # HG changeset patch # User Jaroslav Hajek <highegg@...> # Date 1223649861 -7200 # Node ID 60b4c75287a13ed3a16e414c466802c2549ba93c # Parent 0168d22e6bba2c24342079e49cc65a9a3afef693 fix for SuiteSparse 3.2 diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -0,0 +1,6 @@ +2008-10-10 Jaroslav Hajek <highegg@...> + + * sparse-util.h (SparseCholPrint): Change char * argument to const + char *. + * sparse-util.cc (SparseCholPrint): Likewise. + diff --git a/liboctave/sparse-util.cc b/liboctave/sparse-util.cc --- a/liboctave/sparse-util.cc +++ b/liboctave/sparse-util.cc @@ -30,8 +30,15 @@ #include "lo-error.h" #include "sparse-util.h" +// FIXME this overload is here due to API change in SuiteSparse (3.1 -> 3.2) void SparseCholError (int status, char *file, int line, char *message) +{ + SparseCholError (status, file, line, message); +} + +void +SparseCholError (int status, const char *file, int line, const char *message) { (*current_liboctave_warning_handler)("warning %i, at line %i in file %s", status, line, file); diff --git a/liboctave/sparse-util.h b/liboctave/sparse-util.h --- a/liboctave/sparse-util.h +++ b/liboctave/sparse-util.h @@ -24,7 +24,11 @@ #if !defined (octave_sparse_util_h) #define octave_sparse_util_h 1 -extern OCTAVE_API void SparseCholError (int status, char *file, int line, char *message); +// FIXME this overload is here due to API change in SuiteSparse (3.1 -> 3.2) +extern OCTAVE_API void SparseCholError (int status, char *file, + int line, char *message); +extern OCTAVE_API void SparseCholError (int status, const char *file, + int line, const char *message); extern OCTAVE_API int SparseCholPrint (const char *fmt, ...); #endif _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
|
|
Re: octave-3.0.2: compilation error csparse.ccDear Jaroslav, thanks for your help. I applied the patch but the compilation error message is still the same. Shouldn't the Csparse.cc file also be changed because the compilation error appears there? Please advice. Best, Ciao, Juergen Apparently there has been a subtle API change in SuiteSparse between 3.1 and 3.2. I believe the attached patch should solve the problem. I pushed this to the development sources; if nobody reports a compiler choking on this (IMHO it's standard C++, but a subtle issue), I'll transplant this into 3-0-x, so that it will appear in 3.0.4. regards -- RNDr. Jaroslav Hajek computing expert Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz |
|
|
Re: octave-3.0.2: compilation error csparse.ccOn Fri, Oct 10, 2008 at 8:05 PM, JuergenNeubauer
<jneubauer@...> wrote: > > > Dear Jaroslav, > > thanks for your help. > > I applied the patch but the compilation error message is still the same. > > Shouldn't the Csparse.cc file also be changed because the compilation error > appears there? > No. This should use C++ rules for resolving overloaded function references. This way, it should work with both SuiteSparse 3.1 and 3.2. > Please advice. > The fact that the error message didn't even change is really suspicious. I would understand if the message changed to "ambiguous function reference" or similar. Can you manually verify that the files sparse-util.h and sparse-util.cc were patched correctly? Maybe doing make clean first, then make would help? Btw. am I right that you're using SuiteSparse 3.2? regards -- RNDr. Jaroslav Hajek computing expert Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz _______________________________________________ Bug-octave mailing list Bug-octave@... https://www-old.cae.wisc.edu/mailman/listinfo/bug-octave |
| Free embeddable forum powered by Nabble | Forum Help |