octave-maintainers
[Top][All Lists]
Advanced

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

2.9.8 Build problems on Opteron (RHEL4)


From: John W. Eaton
Subject: 2.9.8 Build problems on Opteron (RHEL4)
Date: Tue, 5 Sep 2006 16:13:39 -0400

On  5-Sep-2006, Fredrik Lingvall wrote:

| * With the umfpack stuff I get this error (using gcc 4.1.1):
| 
| F77=gfortran CPPFLAGS="-I$HOME/work/OPTERON/usr/local/include"
| CFLAGS="-O3 -m64 -Wall -funroll-loops -march=opteron -mtune=opteron
| -pthread" CXXFLAGS="-I$HOME/work/OPTERON/usr/local/include -O3 -m64
| -Wall -funroll-loops -march=opteron -mtune=opteron -pthread"
| FFLAGS="-I$HOME/work/OPTERON/usr/local/include -O3 -m64 -Wall
| -funroll-loops -march=opteron -mtune=opteron -pthread"
| LDFLAGS="-L$HOME/work/OPTERON/usr/local/lib" ./configure  --enable-64
| --prefix=$HOME/work/OPTERON/usr/local
| --with-blas=$HOME/work/OPTERON/usr/local/lib/libBLAS.so
| --with-lapack=$HOME/work/OPTERON/usr/local/lib/libLAPACK.so

Are you sure you want --enable-64?  Did you note the warning issued by
configure when you use it?

BTW, instead of

  F77="..." CFLAGS="..." ...  configure --other-options ...

it is generally best to use

  configure F77="..." CFLAGS="..." ... --other-options ...

because then the values of these variables are recorded in the
config.status file.

| make
| 
| ...
| 
| g++ -c -I/ifi/fenris/a05/fl/work/OPTERON/usr/local/include -fPIC -I.
| -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall
| -W -Wshadow -Wold-style-cast
| -I/ifi/fenris/a05/fl/work/OPTERON/usr/local/include -O3 -m64 -Wall
| -funroll-loops -march=opteron -mtune=opteron -pthread
| sparse-base-chol.cc -o pic/sparse-base-chol.o
| /ifi/fenris/a05/fl/work/OPTERON/usr/local/include/proto.h:462: error:
| declaration of C function 'int __log2(int)' conflicts with
| /usr/include/bits/mathcalls.h:145: error: previous declaration 'double
| __log2(double)' here
| make[2]: *** [pic/sparse-base-chol.o] Error 1
| make[2]: Leaving directory
| `/ifi/fenris/p13/fl/OPTERON/octave-2.9.8/liboctave'
| make[1]: *** [liboctave] Error 2
| make[1]: Leaving directory `/ifi/fenris/p13/fl/OPTERON/octave-2.9.8'
| make: *** [all] Error 2

This looks like a bug in something other than Octave.  What package does
the file

  /ifi/fenris/a05/fl/work/OPTERON/usr/local/include/proto.h

belong to?

| make
| 
| ...
| g++ -c -I/ifi/fenris/a05/fl/work/OPTERON/usr/local/include -fPIC -I.
| -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall
| -W -Wshadow -Wold-style-cast
| -I/ifi/fenris/a05/fl/work/OPTERON/usr/local/include -O3 -m64 -Wall
| -funroll-loops -march=opteron -mtune=opteron -pthread mex.cc -o pic/mex.o
| mex.cc: In member function 'virtual octave_value
| mxArray_sparse::as_octave_value() const':
| mex.cc:1395: error: call of overloaded 'SparseBoolMatrix(int, int, const
| int&)' is ambiguous
| ../liboctave/boolSparse.h:63: note: candidates are:
| SparseBoolMatrix::SparseBoolMatrix(octave_idx_type, octave_idx_type,
| octave_idx_type)
| ../liboctave/boolSparse.h:39: note:                
| SparseBoolMatrix::SparseBoolMatrix(octave_idx_type, octave_idx_type, bool)
| mex.cc:1421: error: call of overloaded 'SparseComplexMatrix(int, int,
| const int&)' is ambiguous
| ../liboctave/CSparse.h:88: note: candidates are:
| SparseComplexMatrix::SparseComplexMatrix(octave_idx_type,
| octave_idx_type, octave_idx_type)
| ../liboctave/CSparse.h:56: note:                
| SparseComplexMatrix::SparseComplexMatrix(octave_idx_type,
| octave_idx_type, double)
| ../liboctave/CSparse.h:53: note:                
| SparseComplexMatrix::SparseComplexMatrix(octave_idx_type,
| octave_idx_type, Complex)
| mex.cc:1438: error: call of overloaded 'SparseMatrix(int, int, const
| int&)' is ambiguous
| ../liboctave/dSparse.h:78: note: candidates are:
| SparseMatrix::SparseMatrix(octave_idx_type, octave_idx_type,
| octave_idx_type)
| ../liboctave/dSparse.h:52: note:                
| SparseMatrix::SparseMatrix(octave_idx_type, octave_idx_type, double)
| mex.cc: In function 'octave_value_list call_mex(callstyle, void*, const
| octave_value_list&, int)':
| mex.cc:2826: warning: dereferencing type-punned pointer will break
| strict-aliasing rules
| make[2]: *** [pic/mex.o] Error 1
| make[2]: Leaving directory `/ifi/fenris/p13/fl/OPTERON/octave-2.9.8/src'
| make[1]: *** [src] Error 2
| make[1]: Leaving directory `/ifi/fenris/p13/fl/OPTERON/octave-2.9.8'
| make: *** [all] Error 2

Please try the following patch and let me know if it allows you to get
past this problem.

Thanks,

jwe


src/ChangeLog:

2006-09-05  John W. Eaton  <address@hidden>

        * mex.cc (mxArray_sparse::as_octave_value): Cast nzmax to
        octave_idx_type for sparse matrix constructors.


Index: src/mex.cc
===================================================================
RCS file: /cvs/octave/src/mex.cc,v
retrieving revision 1.8
diff -u -u -r1.8 mex.cc
--- src/mex.cc  27 Jul 2006 03:21:03 -0000      1.8
+++ src/mex.cc  5 Sep 2006 20:11:01 -0000
@@ -1392,7 +1392,8 @@
        {
          bool *ppr = static_cast<bool *> (pr);
 
-         SparseBoolMatrix val (get_m (), get_n (), nzmax);
+         SparseBoolMatrix val (get_m (), get_n (),
+                               static_cast<octave_idx_type> (nzmax));
 
          for (int i = 0; i < nzmax; i++)
            {
@@ -1418,7 +1419,8 @@
              double *ppr = static_cast<double *> (pr);
              double *ppi = static_cast<double *> (pi);
 
-             SparseComplexMatrix val (get_m (), get_n (), nzmax);
+             SparseComplexMatrix val (get_m (), get_n (),
+                                      static_cast<octave_idx_type> (nzmax));
 
              for (int i = 0; i < nzmax; i++)
                {
@@ -1435,7 +1437,8 @@
            {
              double *ppr = static_cast<double *> (pr);
 
-             SparseMatrix val (get_m (), get_n (), nzmax);
+             SparseMatrix val (get_m (), get_n (),
+                               static_cast<octave_idx_type> (nzmax));
 
              for (int i = 0; i < nzmax; i++)
                {


reply via email to

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