In the context of the pkgsrc project (packaging software to compile it with source) there recently was a bulk build using clang++ as a compiler rather than g++.
This showed a few problems that g++ never complained about, but I'm supposing for now that clang++ is correct in complaining. First, where to look for log files: http://ftp.netbsd.org/pub/pkgsrc/misc/joerg/20131216.1249/pan-0.139nb12/build.log linked from http://ftp.netbsd.org/pub/pkgsrc/misc/joerg/20131216.1249/meta/report.html The first error is this one: In file included from file-util.cc:38: In file included from ./log.h:26: /usr/include/c++/deque:912:49: error: invalid application of 'sizeof' to an incomplete type 'value_type' (aka 'pan::Log::Entry') static const difference_type __block_size = sizeof(value_type) < 256 ? 4096 / sizeof(value_type) : 16; ^~~~~~~~~~~~~~~~~~ /usr/include/c++/deque:1183:15: note: in instantiation of template class 'std::__1::__deque_base<pan::Log::Entry, std::__1::allocator<pan::Log::Entry> >' requested here : private __deque_base<_Tp, _Allocator> ^ ./log.h:52:27: note: in instantiation of template class 'std::__1::deque<pan::Log::Entry, std::__1::allocator<pan::Log::Entry> >' requested here std::deque<Entry> messages; ^ ./log.h:49:14: note: definition of 'pan::Log::Entry' is not complete until the closing '}' struct Entry { ^ Corresponding source in general/log.h looks like 44 /** 45 * A log message specifying the message's text, severity, and time. 46 * @see Log 47 * @ingroup general 48 */ 49 struct Entry { 50 time_t date; 51 Severity severity; 52 std::deque<Entry> messages; 53 std::string message; 54 bool is_child; 55 Entry() : is_child(false) { } 56 }; It seems to me (I've never used clang myself) that the complaint is about the std::deque<Entry> which is inside the struct Entry. And the size of struct Entry isn't known until line 56. I'm not sure what the C++ standard says about using incomplete types in containers such as std::deque<> but I can imaging it is indeed not allowed. And an Entry containing a deque of itself smells fishy anyway. Now the big question is: what to do about it? (and smaller question: how about the next errors in the log file? I haven't checked if they are followup errors, or similar ones, or what) -Olaf. -- ___ Olaf 'Rhialto' Seibert -- The Doctor: No, 'eureka' is Greek for \X/ rhialto/at/xs4all.nl -- 'this bath is too hot.'
pgplzVlFTPDKT.pgp
Description: PGP signature
_______________________________________________ Pan-users mailing list Pan-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/pan-users