[PURRS-devel] [Fwd: Re: Cannot compile GIAC 0.4.0]

Roberto Bagnara bagnara at cs.unipr.it
Sat Jul 3 21:47:47 CEST 2004

-------- Original Message --------
Subject: Re: Cannot compile GIAC 0.4.0
Date: Sat, 03 Jul 2004 20:26:00 +0200
From: Bernard Parisse <bernard.parisse at wanadoo.fr>
Reply-To: parisse at mozart.ujf-grenoble.fr
To: Roberto Bagnara <bagnara at cs.unipr.it>
References: <40E6CC11.7080207 at cs.unipr.it>

Roberto Bagnara wrote:

> Dear Bernard,
> I have downloaded GIAC 0.4.0 and tried to compile it with
> GCC 3.4.1 (which contains a fix for the bug I told you back
> in May).  However, the compilation fails immediately as
> follows:
I have some hints that could fix the problem, but I can not test
them since I don't have gcc 3.4 installed.

> monomial.h: In function `void 
> giac::Normalrref(std::vector<giac::monomial<T>, 
> std::allocator<giac::monomial<T> > >&, int, int, giac::index_t&, bool)':
> monomial.h:776: error: `temp' undeclared (first use this function)
> monomial.h:776: error: (Each undeclared identifier is reported only 
> once for each function it appears in.)
> monomial.h:778: error: `newcoord' undeclared (first use this function)

The template code for Normalrref is never instantiated, that's why the
error does not appear with previous versions of gcc. Declaring
temp and newcoord as vector< monomial<T> > should fix the compilation error.

> In file included from sym2poly.h:23,
>                  from sym2poly.cc:32:
> poly.h: In member function `T& giac::tensor<T>::operator()(const 
> giac::index_m&)':
> poly.h:270: error: `zero' undeclared (first use this function)
> poly.h: In member function `const T& giac::tensor<T>::operator()(const 
> giac::index_m&) const':
> poly.h:279: error: `zero' undeclared (first use this function)
> poly.h: In member function `T giac::tensor<T>::constant_term() const':
> poly.h:785: error: `zero' undeclared (first use this function)

zero is assumed to be declared of type T when these functions are
instantiated. I don't know how to declare zero as a template variable
(would extern T zero; work inside a function?)

> In file included from gen.h:37,
>                  from sym2poly.h:24,
>                  from sym2poly.cc:32:
> fraction.h: In member function `void Tfraction<T>::dbgprint()':
> fraction.h:185: error: `f' undeclared (first use this function)

gcc is correct, f. should be removed (twice)

> In file included from sym2poly.h:24,
>                  from sym2poly.cc:32:
> gen.h: At global scope:
> gen.h:308: error: `giac::gen giac::zero' used prior to declaration

Maybe it's related to the zero above?
Seems strange since line 308 is a declaration.

> The compiler seems right in, e.g., `temp' is undeclared in
> giac::Normalrref().  Have you got any idea what the problem
> may be?
Best regards,

Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
mailto:bagnara at cs.unipr.it

More information about the PURRS-devel mailing list