Re: Cannot compile GIAC 0.4.0

Bernard Parisse wrote:
I have some hints that could fix the problem, but I can not test them since I don't have gcc 3.4 installed.
Dear Bernard,
please let me know if I can help (e.g., by giving you access to a machine with gcc 3.4.1).
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.
OK.
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?)
Yes, if this is what you want. However, this conflicts with the declaration
extern gen zero;
in gen.h.
gcc is correct, f. should be removed (twice)
OK.
We still have the following problems (apart from the conflicting declarations for zero):
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -c gausspol.cc -fPIC -DPIC -o .libs/gausspol.lo gausspol.cc: In function `bool giac::gcd_modular_algo(giac::polynome&, giac::polynome&, giac::polynome&)': gausspol.cc:982: error: no match for call to `(giac::polynome) (giac::polynome&, giac::polynome&, giac::gen&)' poly.h:385: note: candidates are: giac::tensor<T> giac::tensor<T>::operator()(const T&) const [with T = giac::gen] poly.h:266: note: T& giac::tensor<T>::operator()(const giac::index_m&) [with T = giac::gen] poly.h:277: note: const T& giac::tensor<T>::operator()(const giac::index_m&) const [with T = giac::gen]
The following is cured by adding an include of <iostream> in global.h
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -g -O2 -c ti89.cc -fPIC -DPIC -o .libs/ti89.lo In file included from misc.h:23, from ti89.cc:25: global.h: In member function `void giac::dbgprint_vector<T>::dbgprint()': global.h:130: error: `cout' is not a member of `std'
A similar problem with cerr is in monomial.h.
The nastier seems to be this one:
monomial.h: In function `std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > > giac::operator+(const std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&, const std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&)': monomial.h:302: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available monomial.h:302: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) monomial.h: In function `std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > > giac::operator-(const std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&, const std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&)': monomial.h:364: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available In file included from sym2poly.h:23, from input_lexer.ll:44: poly.h: In constructor `giac::tensor<T>::tensor()': poly.h:47: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available poly.h: In constructor `giac::tensor<T>::tensor(int)': poly.h:48: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available poly.h: In constructor `giac::tensor<T>::tensor(const giac::monomial<T>&)': poly.h:49: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available poly.h: In constructor `giac::tensor<T>::tensor(const T&, int)': poly.h:52: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available poly.h: In constructor `giac::tensor<T>::tensor(int, const std::vector<giac::monomial<T>, std::allocator<giac::monomial<T> > >&)': poly.h:56: error: there are no arguments to `ptr_fun' that depend on a template parameter, so a declaration of `ptr_fun' must be available
I attach the patch file containing my changes up to now. I would be grateful if you could tell me how to procees. All the best,
Roberto
participants (1)
-
Roberto Bagnara