[Xapian-tickets] [Xapian] #631: Doesn't build with Sun C++ since C++11 switch (was: Compilation error in Xapian::Database::get_spelling_suggestion)

Xapian nobody at xapian.org
Tue May 12 06:10:58 BST 2015


#631: Doesn't build with Sun C++ since C++11 switch
--------------------------+----------------------------
 Reporter:  dmichelsen    |             Owner:  olly
     Type:  defect        |            Status:  new
 Priority:  normal        |         Milestone:  1.3.5
Component:  Build system  |           Version:  1.3.1
 Severity:  normal        |        Resolution:
 Keywords:                |        Blocked By:
 Blocking:                |  Operating System:  Solaris
--------------------------+----------------------------
Changes (by olly):

 * component:  Other => Build system
 * milestone:   => 1.3.5


Old description:

> I get a compilation error on Solaris 10 with Oracle Studio 12.3:
> {{{
> libtool: compile:  /opt/solarisstudio12.3/bin/CC -DHAVE_CONFIG_H -I.
> -I./common -I./include -I/opt/csw/include -xO3 -m32 -xarch=sparc
> -L/opt/csw/lib -c api/matchspy.cc -o api/matchspy.o >/dev/null 2>&1
> source='api/omdatabase.cc' object='api/omdatabase.lo' libtool=yes \
> DEPDIR=.deps depmode=none /bin/bash ./depcomp \
> /bin/bash ./libtool  --tag=CXX   --mode=compile
> /opt/solarisstudio12.3/bin/CC  -DHAVE_CONFIG_H -I.  -I./common
> -I./include  -I/opt/csw/include  -xO3 -m32 -xarch=sparc -L/opt/csw/lib -c
> -o api/omdatabase.lo api/omdatabase.cc
> libtool: compile:  /opt/solarisstudio12.3/bin/CC -DHAVE_CONFIG_H -I.
> -I./common -I./include -I/opt/csw/include -xO3 -m32 -xarch=sparc
> -L/opt/csw/lib -c api/omdatabase.cc  -KPIC -DPIC -o
> api/.libs/omdatabase.o
> "api/omdatabase.cc", line 562: Error: Could not find a match for
> std::vector<unsigned>::vector(Xapian::Utf8Iterator, Xapian::Utf8Iterator)
> needed in Xapian::Database::get_spelling_suggestion(const std::string &,
> unsigned) const.
> "api/omdatabase.cc", line 605: Error: Could not find a match for
> std::vector<unsigned>::assign(Xapian::Utf8Iterator, Xapian::Utf8Iterator)
> needed in Xapian::Database::get_spelling_suggestion(const std::string &,
> unsigned) const.
> 2 Error(s) detected.
> }}}
> Maybe cast is needed?

New description:

 After a few fixes, xapian-core compiles all the objects cleanly and then
 fails to link libxapian:

 {{{
 /bin/sh ./libtool  --tag=CXX    --mode=link /opt/solarisstudio12.4/bin/CC
 -g -std=c++11 -Bsymbolic-functions -no-undefined  -version-info 3:0:0
 -o libxapian-1.3.la -rpath /usr/local/lib api/compactor.lo
 api/constinfo.lo  api/decvalwtsource.lo api/documentvaluelist.lo
 api/editdistance.lo api/emptypostlist.lo api/error.lo  api/errorhandler.lo
 api/expanddecider.lo api/keymaker.lo  api/leafpostlist.lo api/matchspy.lo
 api/omdatabase.lo  api/omdocument.lo api/omenquire.lo
 api/positioniterator.lo  api/postingiterator.lo api/postingsource.lo
 api/postlist.lo  api/query.lo api/queryinternal.lo api/registry.lo
 api/replication.lo api/smallvector.lo api/snipper.lo  api/sortable-
 serialise.lo api/termiterator.lo api/termlist.lo  api/valueiterator.lo
 api/valuerangeproc.lo  api/valuesetmatchdecider.lo api/vectortermlist.lo
 backends/alltermslist.lo backends/dbcheck.lo  backends/database.lo
 backends/databasereplicator.lo  backends/dbfactory.lo
 backends/slowvaluelist.lo  backends/valuelist.lo
 backends/dbfactory_remote.lo backends/contiguousalldocspostlist.lo
 backends/flint_lock.lo   backends/chert/chert_alldocsmodifiedpostlist.lo
 backends/chert/chert_alldocspostlist.lo
 backends/chert/chert_alltermslist.lo  backends/chert/chert_btreebase.lo
 backends/chert/chert_check.lo  backends/chert/chert_compact.lo
 backends/chert/chert_cursor.lo  backends/chert/chert_database.lo
 backends/chert/chert_databasereplicator.lo
 backends/chert/chert_dbcheck.lo  backends/chert/chert_dbstats.lo
 backends/chert/chert_document.lo  backends/chert/chert_metadata.lo
 backends/chert/chert_modifiedpostlist.lo
 backends/chert/chert_positionlist.lo  backends/chert/chert_postlist.lo
 backends/chert/chert_record.lo  backends/chert/chert_spelling.lo
 backends/chert/chert_spellingwordslist.lo  backends/chert/chert_synonym.lo
 backends/chert/chert_table.lo  backends/chert/chert_termlist.lo
 backends/chert/chert_termlisttable.lo  backends/chert/chert_valuelist.lo
 backends/chert/chert_values.lo  backends/chert/chert_version.lo
 backends/glass/glass_alldocspostlist.lo
 backends/glass/glass_alltermslist.lo  backends/glass/glass_changes.lo
 backends/glass/glass_check.lo  backends/glass/glass_compact.lo
 backends/glass/glass_cursor.lo  backends/glass/glass_database.lo
 backends/glass/glass_databasereplicator.lo
 backends/glass/glass_dbcheck.lo  backends/glass/glass_dbstats.lo
 backends/glass/glass_document.lo  backends/glass/glass_freelist.lo
 backends/glass/glass_inverter.lo  backends/glass/glass_metadata.lo
 backends/glass/glass_positionlist.lo  backends/glass/glass_postlist.lo
 backends/glass/glass_spelling.lo
 backends/glass/glass_spellingwordslist.lo  backends/glass/glass_synonym.lo
 backends/glass/glass_table.lo  backends/glass/glass_termlist.lo
 backends/glass/glass_termlisttable.lo  backends/glass/glass_valuelist.lo
 backends/glass/glass_values.lo  backends/glass/glass_version.lo
 backends/inmemory/inmemory_alltermslist.lo
 backends/inmemory/inmemory_database.lo
 backends/inmemory/inmemory_document.lo
 backends/inmemory/inmemory_positionlist.lo
 backends/multi/multi_alltermslist.lo  backends/multi/multi_postlist.lo
 backends/multi/multi_termlist.lo  backends/multi/multi_valuelist.lo
 backends/remote/remote-document.lo  backends/remote/net_postlist.lo
 backends/remote/net_termlist.lo  backends/remote/remote-database.lo
 common/bitstream.lo common/closefrom.lo common/debuglog.lo
 common/errno_to_string.lo common/fileutils.lo  common/io_utils.lo
 common/keyword.lo common/msvc_dirent.lo  common/omassert.lo
 common/posixy_wrapper.lo  common/replicate_utils.lo common/safe.lo  common
 /serialise-double.lo common/socket_utils.lo  common/str.lo
 common/stringutils.lo common/compression_stream.lo   expand/bo1eweight.lo
 expand/esetinternal.lo  expand/expandweight.lo expand/ortermlist.lo
 expand/tradeweight.lo geospatial/geoencode.lo  geospatial/latlongcoord.lo
 geospatial/latlong_distance_keymaker.lo  geospatial/latlong_metrics.lo
 geospatial/latlong_posting_source.lo languages/armenian.lo
 languages/basque.lo  languages/catalan.lo languages/danish.lo
 languages/dutch.lo  languages/english.lo languages/earlyenglish.lo
 languages/finnish.lo languages/french.lo languages/german2.lo
 languages/german.lo languages/hungarian.lo  languages/italian.lo
 languages/kraaij_pohlmann.lo  languages/lovins.lo languages/norwegian.lo
 languages/porter.lo  languages/portuguese.lo languages/romanian.lo
 languages/russian.lo languages/spanish.lo languages/swedish.lo
 languages/turkish.lo   languages/stem.lo languages/steminternal.lo
 matcher/remotesubmatch.lo  matcher/andmaybepostlist.lo
 matcher/andnotpostlist.lo  matcher/branchpostlist.lo matcher/collapser.lo
 matcher/const_database_wrapper.lo  matcher/exactphrasepostlist.lo
 matcher/externalpostlist.lo  matcher/localsubmatch.lo
 matcher/maxpostlist.lo  matcher/mergepostlist.lo matcher/msetcmp.lo
 matcher/msetpostlist.lo matcher/multiandpostlist.lo  matcher/multimatch.lo
 matcher/multixorpostlist.lo  matcher/nearpostlist.lo matcher/orpostlist.lo
 matcher/phrasepostlist.lo matcher/selectpostlist.lo
 matcher/synonympostlist.lo matcher/valuegepostlist.lo
 matcher/valuerangepostlist.lo matcher/valuestreamdocument.lo
 net/length.lo  net/progclient.lo  net/remoteconnection.lo
 net/remoteserver.lo  net/remotetcpclient.lo  net/remotetcpserver.lo
 net/replicatetcpclient.lo  net/replicatetcpserver.lo  net/serialise.lo
 net/tcpclient.lo  net/tcpserver.lo queryparser/cjk-tokenizer.lo
 queryparser/queryparser.lo queryparser/queryparser_internal.lo
 queryparser/termgenerator.lo  queryparser/termgenerator_internal.lo
 unicode/description_append.lo unicode/unicode-data.lo  unicode/utf8itor.lo
 weight/bb2weight.lo weight/bm25weight.lo  weight/boolweight.lo
 weight/dlhweight.lo weight/dphweight.lo  weight/ifb2weight.lo
 weight/ineb2weight.lo  weight/inl2weight.lo weight/lmweight.lo
 weight/pl2weight.lo  weight/tradweight.lo weight/tfidfweight.lo
 weight/weight.lo  weight/weightinternal.lo -lm  -lm   -lz -lm  -luuid -lm
 -lnsl -lsocket -lm -lm
 libtool: link: /opt/solarisstudio12.4/bin/CC -G -zdefs
 -hlibxapian-1.3.so.3 -o .libs/libxapian-1.3.so.3.0.0
 api/.libs/compactor.o api/.libs/constinfo.o api/.libs/decvalwtsource.o
 api/.libs/documentvaluelist.o api/.libs/editdistance.o
 api/.libs/emptypostlist.o api/.libs/error.o api/.libs/errorhandler.o
 api/.libs/expanddecider.o api/.libs/keymaker.o api/.libs/leafpostlist.o
 api/.libs/matchspy.o api/.libs/omdatabase.o api/.libs/omdocument.o
 api/.libs/omenquire.o api/.libs/positioniterator.o
 api/.libs/postingiterator.o api/.libs/postingsource.o api/.libs/postlist.o
 api/.libs/query.o api/.libs/queryinternal.o api/.libs/registry.o
 api/.libs/replication.o api/.libs/smallvector.o api/.libs/snipper.o
 api/.libs/sortable-serialise.o api/.libs/termiterator.o
 api/.libs/termlist.o api/.libs/valueiterator.o api/.libs/valuerangeproc.o
 api/.libs/valuesetmatchdecider.o api/.libs/vectortermlist.o
 backends/.libs/alltermslist.o backends/.libs/dbcheck.o
 backends/.libs/database.o backends/.libs/databasereplicator.o
 backends/.libs/dbfactory.o backends/.libs/slowvaluelist.o
 backends/.libs/valuelist.o backends/.libs/dbfactory_remote.o
 backends/.libs/contiguousalldocspostlist.o backends/.libs/flint_lock.o
 backends/chert/.libs/chert_alldocsmodifiedpostlist.o
 backends/chert/.libs/chert_alldocspostlist.o
 backends/chert/.libs/chert_alltermslist.o
 backends/chert/.libs/chert_btreebase.o backends/chert/.libs/chert_check.o
 backends/chert/.libs/chert_compact.o backends/chert/.libs/chert_cursor.o
 backends/chert/.libs/chert_database.o
 backends/chert/.libs/chert_databasereplicator.o
 backends/chert/.libs/chert_dbcheck.o backends/chert/.libs/chert_dbstats.o
 backends/chert/.libs/chert_document.o
 backends/chert/.libs/chert_metadata.o
 backends/chert/.libs/chert_modifiedpostlist.o
 backends/chert/.libs/chert_positionlist.o
 backends/chert/.libs/chert_postlist.o backends/chert/.libs/chert_record.o
 backends/chert/.libs/chert_spelling.o
 backends/chert/.libs/chert_spellingwordslist.o
 backends/chert/.libs/chert_synonym.o backends/chert/.libs/chert_table.o
 backends/chert/.libs/chert_termlist.o
 backends/chert/.libs/chert_termlisttable.o
 backends/chert/.libs/chert_valuelist.o backends/chert/.libs/chert_values.o
 backends/chert/.libs/chert_version.o
 backends/glass/.libs/glass_alldocspostlist.o
 backends/glass/.libs/glass_alltermslist.o
 backends/glass/.libs/glass_changes.o backends/glass/.libs/glass_check.o
 backends/glass/.libs/glass_compact.o backends/glass/.libs/glass_cursor.o
 backends/glass/.libs/glass_database.o
 backends/glass/.libs/glass_databasereplicator.o
 backends/glass/.libs/glass_dbcheck.o backends/glass/.libs/glass_dbstats.o
 backends/glass/.libs/glass_document.o
 backends/glass/.libs/glass_freelist.o
 backends/glass/.libs/glass_inverter.o
 backends/glass/.libs/glass_metadata.o
 backends/glass/.libs/glass_positionlist.o
 backends/glass/.libs/glass_postlist.o
 backends/glass/.libs/glass_spelling.o
 backends/glass/.libs/glass_spellingwordslist.o
 backends/glass/.libs/glass_synonym.o backends/glass/.libs/glass_table.o
 backends/glass/.libs/glass_termlist.o
 backends/glass/.libs/glass_termlisttable.o
 backends/glass/.libs/glass_valuelist.o backends/glass/.libs/glass_values.o
 backends/glass/.libs/glass_version.o
 backends/inmemory/.libs/inmemory_alltermslist.o
 backends/inmemory/.libs/inmemory_database.o
 backends/inmemory/.libs/inmemory_document.o
 backends/inmemory/.libs/inmemory_positionlist.o
 backends/multi/.libs/multi_alltermslist.o
 backends/multi/.libs/multi_postlist.o
 backends/multi/.libs/multi_termlist.o
 backends/multi/.libs/multi_valuelist.o backends/remote/.libs/remote-
 document.o backends/remote/.libs/net_postlist.o
 backends/remote/.libs/net_termlist.o backends/remote/.libs/remote-
 database.o common/.libs/bitstream.o common/.libs/closefrom.o
 common/.libs/debuglog.o common/.libs/errno_to_string.o
 common/.libs/fileutils.o common/.libs/io_utils.o common/.libs/keyword.o
 common/.libs/msvc_dirent.o common/.libs/omassert.o
 common/.libs/posixy_wrapper.o common/.libs/replicate_utils.o
 common/.libs/safe.o common/.libs/serialise-double.o
 common/.libs/socket_utils.o common/.libs/str.o common/.libs/stringutils.o
 common/.libs/compression_stream.o expand/.libs/bo1eweight.o
 expand/.libs/esetinternal.o expand/.libs/expandweight.o
 expand/.libs/ortermlist.o expand/.libs/tradeweight.o
 geospatial/.libs/geoencode.o geospatial/.libs/latlongcoord.o
 geospatial/.libs/latlong_distance_keymaker.o
 geospatial/.libs/latlong_metrics.o
 geospatial/.libs/latlong_posting_source.o languages/.libs/armenian.o
 languages/.libs/basque.o languages/.libs/catalan.o
 languages/.libs/danish.o languages/.libs/dutch.o languages/.libs/english.o
 languages/.libs/earlyenglish.o languages/.libs/finnish.o
 languages/.libs/french.o languages/.libs/german2.o
 languages/.libs/german.o languages/.libs/hungarian.o
 languages/.libs/italian.o languages/.libs/kraaij_pohlmann.o
 languages/.libs/lovins.o languages/.libs/norwegian.o
 languages/.libs/porter.o languages/.libs/portuguese.o
 languages/.libs/romanian.o languages/.libs/russian.o
 languages/.libs/spanish.o languages/.libs/swedish.o
 languages/.libs/turkish.o languages/.libs/stem.o
 languages/.libs/steminternal.o matcher/.libs/remotesubmatch.o
 matcher/.libs/andmaybepostlist.o matcher/.libs/andnotpostlist.o
 matcher/.libs/branchpostlist.o matcher/.libs/collapser.o
 matcher/.libs/const_database_wrapper.o matcher/.libs/exactphrasepostlist.o
 matcher/.libs/externalpostlist.o matcher/.libs/localsubmatch.o
 matcher/.libs/maxpostlist.o matcher/.libs/mergepostlist.o
 matcher/.libs/msetcmp.o matcher/.libs/msetpostlist.o
 matcher/.libs/multiandpostlist.o matcher/.libs/multimatch.o
 matcher/.libs/multixorpostlist.o matcher/.libs/nearpostlist.o
 matcher/.libs/orpostlist.o matcher/.libs/phrasepostlist.o
 matcher/.libs/selectpostlist.o matcher/.libs/synonympostlist.o
 matcher/.libs/valuegepostlist.o matcher/.libs/valuerangepostlist.o
 matcher/.libs/valuestreamdocument.o net/.libs/length.o
 net/.libs/progclient.o net/.libs/remoteconnection.o
 net/.libs/remoteserver.o net/.libs/remotetcpclient.o
 net/.libs/remotetcpserver.o net/.libs/replicatetcpclient.o
 net/.libs/replicatetcpserver.o net/.libs/serialise.o net/.libs/tcpclient.o
 net/.libs/tcpserver.o queryparser/.libs/cjk-tokenizer.o
 queryparser/.libs/queryparser.o queryparser/.libs/queryparser_internal.o
 queryparser/.libs/termgenerator.o
 queryparser/.libs/termgenerator_internal.o
 unicode/.libs/description_append.o unicode/.libs/unicode-data.o
 unicode/.libs/utf8itor.o weight/.libs/bb2weight.o
 weight/.libs/bm25weight.o weight/.libs/boolweight.o
 weight/.libs/dlhweight.o weight/.libs/dphweight.o
 weight/.libs/ifb2weight.o weight/.libs/ineb2weight.o
 weight/.libs/inl2weight.o weight/.libs/lmweight.o weight/.libs/pl2weight.o
 weight/.libs/tradweight.o weight/.libs/tfidfweight.o weight/.libs/weight.o
 weight/.libs/weightinternal.o   -lz -luuid -lnsl -lsocket -lm -lc   -g
 Undefined                       first referenced
  symbol                             in file
 std::string::rfind(char,unsigned)const
 api/.libs/compactor.o
 std::string::basic_string (const std::string &)
 api/.libs/compactor.o
 std::filebuf::close() api/.libs/compactor.o
 std::string::_M_mutate(unsigned,unsigned,unsigned)
 api/.libs/compactor.o
 std::ios_base::ios_base()                  api/.libs/compactor.o
 std::ios_base::~ios_base()                  api/.libs/compactor.o
 operator new[](unsigned)
 api/.libs/editdistance.o
 operator new(unsigned)                               api/.libs/compactor.o
 std::string::_Rep::_S_terminal            api/.libs/compactor.o
 [Hint: static member std::string::_Rep::_S_terminal must be defined in the
 program]

 std::ostream::write(const char*,int)
 backends/chert/.libs/chert_check.o
 std::__throw_out_of_range(const char*)       api/.libs/compactor.o
 std::string::find_first_not_of(char,unsigned)const
 net/.libs/progclient.o
 std::ctype<char>::_M_widen_init()const    api/.libs/compactor.o
 std::string::basic_string (unsigned,char,const std::allocator<char>&)
 api/.libs/sortable-serialise.o
 std::string::append(const char*,unsigned)
 api/.libs/compactor.o
 std::string::append(const std::string &)
 api/.libs/compactor.o
 __cxa_allocate_exception            api/.libs/compactor.o
 vtable for std::exception
 backends/chert/.libs/chert_table.o
 [Hint: static member vtable for std::exception must be defined in the
 program]

 std::string::insert(unsigned,const char*,unsigned)
 api/.libs/omdocument.o
 std::string::find(const char*,unsigned,unsigned)const
 api/.libs/replication.o
 vtable for __cxxabiv1::__si_class_type_info api/.libs/compactor.o
 [Hint: static member vtable for __cxxabiv1::__si_class_type_info must be
 defined in the program]

 std::string::swap(std::string &)
 api/.libs/compactor.o
 std::ostream::put(char)                         api/.libs/replication.o
 std::__throw_length_error(const char*)       api/.libs/compactor.o
 vtable for std::streambuf  api/.libs/compactor.o
 std::string::_M_replace_aux(unsigned,unsigned,unsigned,char)
 net/.libs/remoteserver.o
 std::ostream::operator<<(int)
 api/.libs/replication.o
 __cxa_vec_cctor                     backends/glass/.libs/glass_compact.o
 std::string::find(char,unsigned)const
 api/.libs/compactor.o
 vtable for std::bad_alloc
 backends/chert/.libs/chert_table.o
 [Hint: static member vtable for std::bad_alloc must be defined in the
 program]

 std::__throw_logic_error(const char*)
 backends/chert/.libs/chert_postlist.o
 __cxa_end_catch                     api/.libs/compactor.o
 typeinfo for const char*
 backends/chert/.libs/chert_compact.o
 std::filebuf::open(const char*,std::_Ios_Openmode) api/.libs/compactor.o
 std::string::append(unsigned,char)
 api/.libs/compactor.o
 __cxa_begin_catch                   api/.libs/compactor.o
 std::string::basic_string (const std::string &,unsigned,unsigned)
 api/.libs/compactor.o
 std::__throw_bad_cast()             api/.libs/compactor.o
 std::_Rb_tree_increment(std::_Rb_tree_node_base*) api/.libs/matchspy.o
 operator delete[](void*)
 api/.libs/editdistance.o
 operator delete(void*)                              api/.libs/compactor.o
 std::string::_M_leak_hard()               api/.libs/compactor.o
 std::string::append(const std::string &,unsigned,unsigned)
 api/.libs/keymaker.o
 typeinfo for std::length_error                backends/.libs/dbcheck.o
 [Hint: static member typeinfo for std::length_error must be defined in the
 program]

 __cxa_throw                         api/.libs/compactor.o
 std::string::basic_string (const char*,const std::allocator<char>&)
 api/.libs/compactor.o
 vtable for std::filebuf  api/.libs/compactor.o
 __SUNW_ABIG3_cpp_personality        api/.libs/compactor.o
 std::string::_Rep::_S_empty_rep_storage   api/.libs/compactor.o
 [Hint: static member std::string::_Rep::_S_empty_rep_storage must be
 defined in the program]

 std::string::compare(const char*)const
 api/.libs/compactor.o
 __gnu_cxx::__exchange_and_add(volatile int*,int) api/.libs/compactor.o
 std::string::basic_string (const char*,unsigned,const
 std::allocator<char>&)                 api/.libs/matchspy.o
 std::__detail::_List_node_base::_M_unhook()
 queryparser/.libs/queryparser_internal.o
 std::__throw_bad_alloc()            api/.libs/compactor.o
 _Unwind_Resume                      api/.libs/compactor.o
 __cxxabiv1::register_exit_code(void (*)(void)extern"C") api/.libs/query.o
 typeinfo for std::bad_alloc
 backends/chert/.libs/chert_table.o
 [Hint: static member typeinfo for std::bad_alloc must be defined in the
 program]

 std::string::replace(unsigned,unsigned,const char*,unsigned)
 backends/chert/.libs/chert_database.o
 std::ostream::flush()                       api/.libs/replication.o
 std::ostream & std::ostream::_M_insert<unsigned long long>(unsigned long
 long)            backends/chert/.libs/chert_check.o
 std::ostream & std::ostream::_M_insert<bool>(bool)
 backends/chert/.libs/chert_check.o
 std::ostream & std::ostream::_M_insert<unsigned long>(unsigned long)
 backends/chert/.libs/chert_check.o
 std::_Rb_tree_increment(const std::_Rb_tree_node_base*)
 api/.libs/documentvaluelist.o
 std::__basic_file<char>::~__basic_file()          api/.libs/compactor.o
 vtable for __cxxabiv1::__vmi_class_type_info api/.libs/compactor.o
 [Hint: static member vtable for __cxxabiv1::__vmi_class_type_info must be
 defined in the program]

 std::string::reserve(unsigned)                     api/.libs/compactor.o
 std::cerr                           net/.libs/remotetcpserver.o
 [Hint: static member std::cerr must be defined in the program]

 std::cout                           net/.libs/tcpserver.o
 [Hint: static member std::cout must be defined in the program]

 __cxxabiv1::vector_del(void*,unsigned,void (*)(void*))
 backends/glass/.libs/glass_cursor.o
 std::__detail::_List_node_base::swap(std::__detail::_List_node_base&,std::__detail::_List_node_base&)
 queryparser/.libs/queryparser_internal.o
 std::string::_Rep::_S_create(unsigned,unsigned,const
 std::allocator<char>&)      backends/chert/.libs/chert_postlist.o
 std::ios::clear(std::_Ios_Iostate) api/.libs/compactor.o
 std::string::resize(unsigned,char)
 api/.libs/compactor.o
 vtable for __cxxabiv1::__class_type_info api/.libs/compactor.o
 [Hint: static member vtable for __cxxabiv1::__class_type_info must be
 defined in the program]

 std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*,std::_Rb_tree_rebalance_for_erase&)
 api/.libs/omdocument.o
 std::string::_Rep::_M_destroy(const std::allocator<char>&)
 api/.libs/compactor.o
 std::ios_base::Init::~Init()             net/.libs/remotetcpserver.o
 std::ios_base::Init::Init()             net/.libs/remotetcpserver.o
 std::string::assign(const char*,unsigned)
 api/.libs/error.o
 std::string::assign(const std::string &)
 api/.libs/compactor.o
 std::filebuf::basic_filebuf() api/.libs/compactor.o
 std::_Rb_tree_insert_and_rebalance(bool,std::_Rb_tree_node_base*,std::_Rb_tree_node_base,std::_Rb_tree_insert_and_rebalance&)
 api/.libs/matchspy.o
 __cxa_pure_virtual                  api/.libs/errorhandler.o
 std::ostream & std::__ostream_insert<char, std::char_traits<char>
 >(std::ostream &,const char*,int) api/.libs/compactor.o
 std::ios::init(std::streambuf *) api/.libs/compactor.o
 __cxa_rethrow                       api/.libs/compactor.o
 __cxxabiv1::vector_new(void*,unsigned,unsigned,void (*)(void*),void
 (*)(void*)) backends/glass/.libs/glass_cursor.o
 std::istream & std::getline<char, std::char_traits<char>,
 std::allocator<char> >(std::istream &,std::string &,char)
 api/.libs/compactor.o
 std::string::_S_construct(unsigned,char,const std::allocator<char>&)
 common/.libs/str.o
 __cxa_vec_dtor                      backends/.libs/dbcheck.o
 __cxa_vec_ctor                      backends/.libs/dbcheck.o
 std::locale::~locale()                    api/.libs/compactor.o
 typeinfo for std::ios_base                     api/.libs/compactor.o
 [Hint: static member typeinfo for std::ios_base must be defined in the
 program]

 std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)
 api/.libs/queryinternal.o
 std::string::find_first_not_of(const char*,unsigned,unsigned)const
 api/.libs/valuerangeproc.o
 std::_Rb_tree_decrement(std::_Rb_tree_node_base*) api/.libs/matchspy.o
 std::bad_alloc::~bad_alloc()
 backends/chert/.libs/chert_table.o
 ld: fatal: symbol referencing errors
 *** Error code 2
 make: Fatal error: Command failed for target `libxapian-1.3.la'
 Current working directory /home/olly/xapian-core-1.3.2_git1069
 *** Error code 1
 The following command caused the error:
 fail=; \
 if (target_option=k; case ${target_option-} in  ?) ;;  *) echo
 "am__make_running_with_option: internal error: invalid"  "target option
 '${target_option-}' specified" >&2;  exit 1;;  esac;  has_opt=no;
 sane_makeflags=$MAKEFLAGS;  if {  if test -z '1'; then  false;  elif test
 -n ''; then  true;  elif test -n '' && test -n ''; then  true;  else
 false;  fi;  }; then  sane_makeflags=$MFLAGS;  else  case $MAKEFLAGS in
 *\\[\ \      ]*)  bs=\\;  sane_makeflags=`printf '%s\n' "$MAKEFLAGS"  |
 sed "s/$bs$bs[$bs $bs        ]*//g"`;;  esac;  fi;  skip_next=no;
 strip_trailopt ()  {  flg=`printf '%s\n' "$flg" | sed "s/$1.*$//"`;  };
 for flg in $sane_makeflags; do  test $skip_next = yes && { skip_next=no;
 continue; };  case $flg in  *=*|--*) continue;;  -*I) strip_trailopt 'I';
 skip_next=yes;;  -*I?*) strip_trailopt 'I';;  -*O) strip_trailopt 'O';
 skip_next=yes;;  -*O?*) strip_trailopt 'O';;  -*l) strip_trailopt 'l';
 skip_next=yes;;  -*l?*) strip_trailopt 'l';;  -[dEDm]) skip_next=yes;;
 -[JT]) skip_next=yes;;  esac;  case $flg in  *$target_option*)
 has_opt=yes; break;;  esac;  done;  test $has_opt = yes); then \
   failcom='fail=yes'; \
 else \
   failcom='exit 1'; \
 fi; \
 dot_seen=no; \
 target=`echo all-recursive | sed s/-recursive//`; \
 case "all-recursive" in \
   distclean-* | maintainer-clean-*) list='. docs tests' ;; \
   *) list='. docs tests' ;; \
 esac; \
 for subdir in $list; do \
   echo "Making $target in $subdir"; \
   if test "$subdir" = "."; then \
     dot_seen=yes; \
     local_target="$target-am"; \
   else \
     local_target="$target"; \
   fi; \
   (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
   || eval $failcom; \
 done; \
 if test "$dot_seen" = "no"; then \
   make  "$target-am" || exit 1; \
 fi; test -z "$fail"
 make: Fatal error: Command failed for target `all-recursive'
 Current working directory /home/olly/xapian-core-1.3.2_git1069
 *** Error code 1
 make: Fatal error: Command failed for target `all'
 }}}

 ----

 ''Original description:''

 I get a compilation error on Solaris 10 with Oracle Studio 12.3:
 {{{
 libtool: compile:  /opt/solarisstudio12.3/bin/CC -DHAVE_CONFIG_H -I.
 -I./common -I./include -I/opt/csw/include -xO3 -m32 -xarch=sparc
 -L/opt/csw/lib -c api/matchspy.cc -o api/matchspy.o >/dev/null 2>&1
 source='api/omdatabase.cc' object='api/omdatabase.lo' libtool=yes \
 DEPDIR=.deps depmode=none /bin/bash ./depcomp \
 /bin/bash ./libtool  --tag=CXX   --mode=compile
 /opt/solarisstudio12.3/bin/CC  -DHAVE_CONFIG_H -I.  -I./common -I./include
 -I/opt/csw/include  -xO3 -m32 -xarch=sparc -L/opt/csw/lib -c -o
 api/omdatabase.lo api/omdatabase.cc
 libtool: compile:  /opt/solarisstudio12.3/bin/CC -DHAVE_CONFIG_H -I.
 -I./common -I./include -I/opt/csw/include -xO3 -m32 -xarch=sparc
 -L/opt/csw/lib -c api/omdatabase.cc  -KPIC -DPIC -o api/.libs/omdatabase.o
 "api/omdatabase.cc", line 562: Error: Could not find a match for
 std::vector<unsigned>::vector(Xapian::Utf8Iterator, Xapian::Utf8Iterator)
 needed in Xapian::Database::get_spelling_suggestion(const std::string &,
 unsigned) const.
 "api/omdatabase.cc", line 605: Error: Could not find a match for
 std::vector<unsigned>::assign(Xapian::Utf8Iterator, Xapian::Utf8Iterator)
 needed in Xapian::Database::get_spelling_suggestion(const std::string &,
 unsigned) const.
 2 Error(s) detected.
 }}}
 Maybe cast is needed?

--

Comment:

 I've done some test builds with the 12.4 compiler on unstable11s and fixed
 various errors that threw up.

 The current status is that everything in xapian-core compiles cleanly, but
 the link fails, apparently due to failing to link the C++ runtime.  I'm
 not sure how to resolve this - the man page for `CC` says that `-G`
 creates a shared object but doesn't link the standard libraries, but
 `-std=c++11` is incompatible with the various options to specify standard
 libraries to link...

 The original error reported here is no longer present though, so
 repurposing this ticket for getting it to build after the C++11 switch.

--
Ticket URL: <http://trac.xapian.org/ticket/631#comment:4>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list