#69 closed defect (released)
compile error on ubuntu 5.10
Reported by: | ynzheng | Owned by: | Olly Betts |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Test Suite | Version: | 0.9.2 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | Linux |
Description
gcc4 used but after 'make':
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../common -I../../include -Wall -W -
Wredundant-decls -Wundef -Wpointer-arith -Wcast-qual -Wcast-align -Wno- multichar -Wno-long-long -fno-gnu-keywords -g -O2 -MT inmemory_database.lo -MD - MP -MF .deps/inmemory_database.Tpo -c inmemory_database.cc -fPIC -DPIC - o .libs/inmemory_database.o inmemory_database.h:139: error: ISO C++ forbids declaration of 'type name' with no type inmemory_database.h:139: error: missing '>' to terminate the template argument list inmemory_database.h:139: error: template argument 1 is invalid inmemory_database.h:139: error: expected ';' before '>' token inmemory_database.h:141: error: ISO C++ forbids declaration of 'type name' with no type inmemory_database.h:141: error: missing '>' to terminate the template argument list inmemory_database.h:141: error: template argument 1 is invalid inmemory_database.h:141: error: expected ',' or '...' before '>' token inmemory_database.h:171: error: ISO C++ forbids declaration of 'type name' with no type inmemory_database.h:171: error: missing '>' to terminate the template argument list inmemory_database.h:171: error: template argument 1 is invalid inmemory_database.h:171: error: expected ';' before '>' token inmemory_database.h:175: error: ISO C++ forbids declaration of 'type name' with no type inmemory_database.h:175: error: missing '>' to terminate the template argument list inmemory_database.h:175: error: template argument 1 is invalid inmemory_database.h:175: error: expected ',' or '...' before '>' token inmemory_database.cc:79: error: prototype for 'InMemoryPostList::InMemoryPostList(Xapian::Internal::RefCntPtr<const InMemoryDatabase>, const InMemoryTerm&)' does not match any in class 'InMemoryPostList' inmemory_database.h:126: error: candidates are: InMemoryPostList::InMemoryPostList(const InMemoryPostList&) inmemory_database.h:142: error: InMemoryPostList::InMemoryPostList(int) inmemory_database.cc: In constructor 'InMemoryPostList::InMemoryPostList (Xapian::Internal::RefCntPtr<const InMemoryDatabase>, const InMemoryTerm&)': inmemory_database.cc:84: error: class 'InMemoryPostList' does not have any field named 'db' inmemory_database.cc: In member function 'virtual Xapian::doclength InMemoryPostList::get_doclength() const': inmemory_database.cc:153: error: 'db' was not declared in this scope inmemory_database.cc: At global scope: inmemory_database.cc:182: error: prototype for 'InMemoryTermList::InMemoryTermList(Xapian::Internal::RefCntPtr<const InMemoryDatabase>, Xapian::docid, const InMemoryDoc&, Xapian::doclength)' does not match any in class 'InMemoryTermList' inmemory_database.h:163: error: candidates are: InMemoryTermList::InMemoryTermList(const InMemoryTermList&) inmemory_database.h:177: error: InMemoryTermList::InMemoryTermList(int) inmemory_database.cc: In constructor 'InMemoryTermList::InMemoryTermList (Xapian::Internal::RefCntPtr<const InMemoryDatabase>, Xapian::docid, const InMemoryDoc&, Xapian::doclength)': inmemory_database.cc:184: error: class 'InMemoryTermList' does not have any field named 'db' inmemory_database.cc: In member function 'virtual Xapian::doccount InMemoryTermList::get_termfreq() const': inmemory_database.cc:205: error: 'db' was not declared in this scope inmemory_database.cc: In member function 'virtual OmExpandBits InMemoryTermList::get_weighting() const': inmemory_database.cc:223: error: 'db' was not declared in this scope inmemory_database.cc: In member function 'virtual Xapian::PositionIterator InMemoryTermList::positionlist_begin() const': inmemory_database.cc:256: error: 'db' was not declared in this scope inmemory_database.cc: In member function 'virtual LeafPostList* InMemoryDatabase::do_open_post_list(const std::string&) const': inmemory_database.cc:283: error: no matching function for call to 'InMemoryPostList::InMemoryPostList(Xapian::Internal::RefCntPtr<const InMemoryDatabase>, const InMemoryTerm&)' inmemory_database.h:142: note: candidates are: InMemoryPostList::InMemoryPostList(int) inmemory_database.h:126: note: InMemoryPostList::InMemoryPostList(const InMemoryPostList&) inmemory_database.cc: In member function 'virtual LeafTermList* InMemoryDatabase::open_term_list(Xapian::docid) const': inmemory_database.cc:349: error: no matching function for call to 'InMemoryTermList::InMemoryTermList(Xapian::Internal::RefCntPtr<const InMemoryDatabase>, Xapian::docid&, const InMemoryDoc&, Xapian::doclength)' inmemory_database.h:177: note: candidates are: InMemoryTermList::InMemoryTermList(int) inmemory_database.h:163: note: InMemoryTermList::InMemoryTermList(const InMemoryTermList&) make[3]: * [inmemory_database.lo] ´íÎó 1 make[3]: Leaving directory `/home/username/tmp/xapian092/xapian-core- 0.9.2/backends/inmemory' make[2]: * [all-recursive] ´íÎó 1 make[2]: Leaving directory `/home/username/tmp/xapian092/xapian-core- 0.9.2/backends' make[1]: * [all-recursive] ´íÎó 1 make[1]: Leaving directory `/home/username/tmp/xapian092/xapian-core-0.9.2' make: * [all] ´íÎó 2 username@colinux:~/tmp/xapian092/xapian-core-0.9.2$
Change History (3)
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | compile error on ubuntu 5.10 → compile error on ubuntu 5.10 |
comment:3 by , 19 years ago
Operating System: | → Linux |
---|---|
Resolution: | fixed → released |
The problem is some non-ISO-conformant C++ code which previous GCC versions and other compilers accept, but GCC 4.0.1 rejects.
You can fix this by adding:
class InMemoryDatabase;
at line 123 of backends/inmemory/inmemory_database.h
Also detailed here: http://article.gmane.org/gmane.comp.search.xapian.devel/577
I'm hoping to release 0.9.3 today, which will include this fix.