#799 closed defect (fixed)
Issue with enable-log option failing while building
| Reported by: | Gaurav Arora | Owned by: | Olly Betts |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.0.0 |
| Component: | Build system | Version: | git master |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Operating System: | All |
Description (last modified by )
Pastebin of error: https://pastebin.com/Zk4hqU7R
: ./common/pretty.h:59:11: required from ‘PrettyOStream<S>& operator<<(PrettyOStream<S>&, const T&) [with S = std::__cxx11::basic_ostringstream<char>; T = Xapian::KeyMaker]’ ./common/pretty.h:87:15: required from ‘PrettyOStream<S>& operator<<(PrettyOStream<S>&, const T*) [with S = std::__cxx11::basic_ostringstream<char>; T = Xapian::KeyMaker]’ api/registry.cc:448:5: required from here /usr/include/c++/8/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream<char>&>’ make[2]: *** [Makefile:3259: api/registry.lo] Error 1
When build is configured with --enable-log option, building xapian fails. It fails because KeyMaker class doesn't have get_description method which is probably used for logging.
I was get away with an error while adding a dummy get_description method. It will be good to fix this issue. I can try fixing this but I was not sure what to return in description for KeyMaker.
I can give it a go with guidance on what to return.
Change History (8)
comment:1 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 6 years ago
comment:5 by , 6 years ago
Thanks, olly This change seems to work. Do you want me to make a PR or would it be better if you directly apply the change?
comment:6 by , 6 years ago
| Component: | Other → Build system |
|---|---|
| Milestone: | → 1.5.0 |
| Status: | new → assigned |
| Version: | → git master |
It's simplest for me just to apply the fix - will push as 99ee5809c4d21a4c2d284cbabff2b9d1293e3be9 shortly once my test build completes. This problem shouldn't affect 1.4.x as it's caused by the changes to support remote KeyMaker objects, so nothing to backport.
comment:7 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
I pushed a fix back on Jan 6th: 99ee5809c4d21a4c2d284cbabff2b9d1293e3be9

Classes which don't have a
get_description()method are handled incommon/pretty.h. Something like this (untested) should show them in the debug log as their class name:diff --git a/xapian-core/common/pretty.h b/xapian-core/common/pretty.h index 1e0393399fa3..c459d3836893 100644 --- a/xapian-core/common/pretty.h +++ b/xapian-core/common/pretty.h @@ -280,6 +280,7 @@ operator<<(PrettyOStream<S> &ps, const Xapian::VecCOW<T>& v) { namespace Xapian { class ExpandDecider; + class KeyMaker; class LatLongMetric; class MatchDecider; class Registry; @@ -316,6 +317,7 @@ XAPIAN_PRETTY_AS_CLASSNAME(Xapian::Centroid) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::Cluster) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::ClusterSet) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::ExpandDecider) +XAPIAN_PRETTY_AS_CLASSNAME(Xapian::KeyMaker) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::LatLongMetric) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::MatchDecider) XAPIAN_PRETTY_AS_CLASSNAME(Xapian::Point)XAPIAN_PRETTY_AS_CLASSNAME(C)is a macro which expands to anoperator<<overload forconst C&.Classes with
get_description()are handled automatically via the template incommon/output.h.