Opened 5 years ago
Closed 5 years ago
#799 closed defect (fixed)
Issue with enable-log option failing while building
Reported by: | Gaurav Arora | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.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 (7)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Description: | modified (diff) |
---|
comment:4 by , 5 years ago
comment:5 by , 5 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 , 5 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 , 5 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: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
.