Opened 9 years ago

Closed 9 years ago

#499 closed bug (fixed)

libfac fails to compile due to bad C++

Reported by: jdemeyer@… Owned by: somebody
Priority: blocker Milestone: 3-2-0 and higher
Component: libfac Version: 3-1-6
Keywords: Cc:

Description

When compiling libfac inside Singular-3-1-6 or the git master with g++-4.8.0 (g++-4.2.4 gives a similar error):

g++ -O2 -g  -fPIC -I./factor -I./charset -I. -I.. -I/home/jdemeyer/sage/sage-5.8/local -I./factor -I/home/jdemeyer/sage/sage-5.8/local/include -I/home/jdemeyer/sage/sage-5.8/local/include   -DHAVE_CONFIG_H  -c factor/tmpl_inst.cc -o OPTOBJ/tmpl_inst.o
factor/tmpl_inst.cc: In instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]':
factor/tmpl_inst.cc:75:64:   required from here
factor/tmpl_inst.cc:75:64: error: explicit instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]' but no definition available [-fpermissive]
factor/tmpl_inst.cc: In instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]':
factor/tmpl_inst.cc:75:64:   required from here
factor/tmpl_inst.cc:75:64: error: explicit instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]' but no definition available [-fpermissive]
factor/tmpl_inst.cc: In instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]':
factor/tmpl_inst.cc:75:64:   required from here
factor/tmpl_inst.cc:75:64: error: explicit instantiation of 'std::ostream& operator<<(std::ostream&, const Array<T>&) [with T = int; std::ostream = std::basic_ostream<char>]' but no definition available [-fpermissive]
make: *** [OPTOBJ/tmpl_inst.o] Error 1

This used to work in Singular-3-1-5.

Attachments (1)

0001-fix-template-instantiation-in-libfac.patch (1.1 KB) - added by mlee 9 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 years ago by mlee

Hi, I hope the attached patch helps. Martin

comment:2 Changed 9 years ago by jdemeyer@…

Thanks, that patch fixes the problem indeed.

comment:3 Changed 9 years ago by mlee

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.