Re: [linbox-use] linbox newbie with configure and gcc compile problem

52 views
Skip to first unread message

Jean-Guillaume Dumas

unread,
Jun 29, 2012, 3:34:42 AM6/29/12
to linbo...@googlegroups.com, Wolfgang Kraske
Wolfgang Kraske wrote, on 29/06/2012 05:17:
> Hi I am attempting to compile programs for the tutorial and the examples
>
> I configured linbox on my Fedora 14 system (linux
> 2.6.35.6-48.fc14.x86_64)
>
> I yum installed the following libraries:
>
> gmp.x86_64
> 4.3.1-7.fc14
> @anaconda-InstallationRepo-201010211827.x86_64
> gmp-devel.x86_64
> 4.3.1-7.fc14 @fedora
> gmp-ecm.x86_64
> 6.3-1.fc14 @updates
> gmp-ecm-devel.x86_64
> 6.3-1.fc14 @updates
> gmp-ecm-static.x86_64
> 6.3-1.fc14 @updates
> gmp-static.x86_64
> 4.3.1-7.fc14 @fedora
> gmpc.x86_64
> 0.20.0-2.fc14 @updates
> gmpc-devel.x86_64
> 0.20.0-2.fc14 @updates
> gmpy.x86_64
> 1.14-1.fc14 @updates
>
> givaro.x86_64
> 3.3.1-1.fc13 @fedora
> givaro-devel.x86_64
> 3.3.1-1.fc13 @fedora
> givaro-static.x86_64
> 3.3.1-1.fc13 @fedora
>
> blas.x86_64
> 3.2.2-4.fc14 @updates
> blas-devel.x86_64
> 3.2.2-4.fc14 @updates
> blas-static.x86_64
> 3.2.2-4.fc14 @updates
>
> with the following configure commands:
>
> ./configure --with-blas=yes --with-gmp=yes --with-givaro=yes
> make
> make install
>
> Some of the example programs compile correctly but others such as
> solve.C do not.
>
> In particular I attempted to compile the tutorial example:
>
> #include <linbox/field/modular.h>
> #include <linbox/solutions/det.h>
> #include <linbox/blackbox/dense.h>
>
> using namespace LinBox;
>
> main()
> {
> typedef Modular<double> Field;
> typedef DenseMatrix<Field> Matrix;
> Field F(65521);
> DenseMatrix<Field> A;
> Field::Element d;
> }
>
> with the following compile error
>
> [root@localhost examples]# g++ -O0 test.C -o test -I/usr/local/include
> -L/usr/local/lib -llinbox -lgivaro -lgmpxx -lgmp -lblas
> test.C: In function �int main()�:
> test.C:12:24: error: no matching function for call to
> �LinBox::DenseMatrix<LinBox::Modular<double> >::DenseMatrix()�
> /usr/local/include/linbox/blackbox/dense.h:152:2: note: candidates
> are: LinBox::DenseMatrix<_Field>::DenseMatrix(const
> LinBox::DenseMatrix<_Field>&) [with _Field = LinBox::Modular<double>,
> LinBox::DenseMatrix<_Field> =
> LinBox::DenseMatrix<LinBox::Modular<double> >]
> /usr/local/include/linbox/blackbox/dense.h:147:2:
> note: LinBox::DenseMatrix<_Field>::DenseMatrix(const
> Field&, LinBox::DenseMatrixBase<typename _Field::Element>&) [with
> _Field = LinBox::Modular<double>, Field = LinBox::Modular<double>,
> typename _Field::Element = double]
> /usr/local/include/linbox/blackbox/dense.h:139:2:
> note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(LinBox::MatrixStream<Field>&)
> [with _Field = LinBox::Modular<double>]
> /usr/local/include/linbox/blackbox/dense.h:95:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const Field&, size_t, size_t)
> [with _Field = LinBox::Modular<double>, Field =
> LinBox::Modular<double>, size_t = long unsigned int]
> /usr/local/include/linbox/blackbox/dense.h:87:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const Field&) [with _Field =
> LinBox::Modular<double>, Field = LinBox::Modular<double>]
>
> Any suggestions?
Hello,
To build a matrix you have to use one of the proposed constructors.
e.g. : DenseMatrix<Field> A(F) ...
Best,

--
Jean-Guillaume Dumas.
____________________________________________________________________
Jean-Guill...@imag.fr T�l.: +33 476 514 866
Universit� Joseph Fourier, Grenoble I. Fax.: +33 476 631 263
Laboratoire Jean Kuntzmann, Math�matiques Appliqu�es et Informatique
51, avenue des Math�matiques. LJK/IMAG - BP53. 38041 Grenoble FRANCE
http://ljk.imag.fr/membres/Jean-Guillaume.Dumas
____________________________________________________________________

B Saunders

unread,
Jun 29, 2012, 10:00:52 AM6/29/12
to linbo...@googlegroups.com
Hi, Wolfgang,

It seems the tutorial is out of date in several details. Here is a
version of the example from the tutorial with adjustments that made it
work for me:

#include <iostream>
#include <linbox/field/modular.h>
#include <linbox/matrix/blas-matrix.h>
#include <linbox/solutions/det.h>

using namespace LinBox;

// Usage: a.out < file-in-one-of-several-std-formats
main()
{
typedef Modular<double> Field;
typedef BlasMatrix<Field> Matrix;
Field F(65521);
Matrix A(F); A.read(std::cin);
Field::Element d;
Method::BlasElimination M;
det(d, A, M);
F.write(std::cout << "the determinant is ", d) << std::endl;
}

Best,
-dave


PS. I'll go edit the tutorial now. Please let us know if you find
further discrepancies of this kind.

--
B. David Saunders, Prof. Invité, Laboratoire de l'Informatique du Parallélisme
ENS-Lyon, France, cell: 07 6283 3041 (replace initial 0 with 01133 if
calling from USA)
Prof., CIS Department, University of Delaware
> test.C: In function ‘int main()’:
> test.C:12:24: error: no matching function for call to
> ‘LinBox::DenseMatrix<LinBox::Modular<double> >::DenseMatrix()’
> /usr/local/include/linbox/blackbox/dense.h:152:2: note: candidates are:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const LinBox::DenseMatrix<_Field>&)
> [with _Field = LinBox::Modular<double>, LinBox::DenseMatrix<_Field> =
> LinBox::DenseMatrix<LinBox::Modular<double> >]
> /usr/local/include/linbox/blackbox/dense.h:147:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const Field&,
> LinBox::DenseMatrixBase<typename _Field::Element>&) [with _Field =
> LinBox::Modular<double>, Field = LinBox::Modular<double>, typename
> _Field::Element = double]
> /usr/local/include/linbox/blackbox/dense.h:139:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(LinBox::MatrixStream<Field>&) [with
> _Field = LinBox::Modular<double>]
> /usr/local/include/linbox/blackbox/dense.h:95:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const Field&, size_t, size_t) [with
> _Field = LinBox::Modular<double>, Field = LinBox::Modular<double>, size_t =
> long unsigned int]
> /usr/local/include/linbox/blackbox/dense.h:87:2: note:
> LinBox::DenseMatrix<_Field>::DenseMatrix(const Field&) [with _Field =
> LinBox::Modular<double>, Field = LinBox::Modular<double>]
>
> Any suggestions?
>
> I can try again on another machine to see if this changes the situation
>
> --
> You received this message because you are subscribed to the Google Groups
> "linbox-use" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/linbox-use/-/J_SSJMRRAEYJ.
> To post to this group, send email to linbo...@googlegroups.com.
> To unsubscribe from this group, send email to
> linbox-use+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/linbox-use?hl=en.
Reply all
Reply to author
Forward
0 new messages