[develop] quickbook compile failure
hi all, trying to compile quickbook with apple's clang gives me the following error:
tim@moka-mac:~/dev/boost/tools/quickbook$ ../../b2 Performing configuration checks
- symlinks supported : yes - hardlinks supported : yes ...patience... ...patience... ...found 3129 targets... ...updating 6 targets... common.mkdir ../../dist common.mkdir ../../dist/bin darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/files.o src/files.cpp:129:47: error: implicit instantiation of undefined template 'std::pair<boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::__1::pair<const boost::filesystem::path, boost::intrusive_ptr<quickbook::file> > > >, bool>' boost::tie(pos, inserted) = files.emplace( ^ ../../boost/detail/container_fwd.hpp:145:42: note: template is declared here template <class T1, class T2> struct pair; ^ src/files.cpp:257:14: error: too few template arguments for class template 'vector' std::vector<mapped_file_section> mapped_sections; ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:287:18: error: too few template arguments for class template 'vector' std::vector<mapped_file_section>::const_iterator section, ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:348:14: error: too few template arguments for class template 'vector' std::vector<mapped_file_section>::const_iterator find_section( ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:269:39: error: cannot initialize object parameter of type 'const quickbook::file' with an expression of type 'quickbook::mapped_file' original_pos, source().size(), ^~~~~~ src/files.cpp:276:51: error: cannot initialize object parameter of type 'const quickbook::file' with an expression of type 'quickbook::mapped_file' pos - original->source().begin(), source().size())); ^~~~~~ src/files.cpp:282:51: error: cannot initialize object parameter of type 'const quickbook::file' with an expression of type 'quickbook::mapped_file' pos - original->source().begin(), source().size(), ^~~~~~ src/files.cpp:351:18: error: too few template arguments for class template 'vector' std::vector<mapped_file_section>::const_iterator section = ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:375:14: error: too few template arguments for class template 'list' std::list<mapped_file> mapped_files; ^ ../../boost/detail/container_fwd.hpp:134:47: note: template is declared here template <class T, class Allocator> class list; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:401:18: error: no viable conversion from 'intrusive_ptr<struct quickbook::mapped_file>' to 'intrusive_ptr<struct quickbook::file>' file_ptr r = data->new_file; ^ ~~~~~~~~~~~~~~ ../../boost/smart_ptr/intrusive_ptr.hpp:66:5: note: candidate constructor not viable: no known conversion from 'boost::intrusive_ptr<mapped_file>' to 'quickbook::file *' for 1st argument intrusive_ptr( T * p, bool add_ref = true ): px( p ) ^ ../../boost/smart_ptr/intrusive_ptr.hpp:90:5: note: candidate constructor not viable: no known conversion from 'boost::intrusive_ptr<mapped_file>' to 'const boost::intrusive_ptr<quickbook::file> &' for 1st argument intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) ^ ../../boost/smart_ptr/intrusive_ptr.hpp:76:5: note: candidate template ignored: substitution failure [with U = quickbook::mapped_file]: no type named 'type' in 'boost::detail::sp_enable_if_convertible<quickbook::mapped_file, quickbook::file>' intrusive_ptr( intrusive_ptr<U> const & rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty() ) ^ ~~~~ ../../boost/smart_ptr/detail/operator_bool.hpp:52:5: note: candidate function operator unspecified_bool_type() const BOOST_NOEXCEPT ^ src/files.cpp:413:16: error: cannot initialize object parameter of type 'const quickbook::file' with an expression of type 'quickbook::mapped_file' return data->new_file->source().empty(); ^~~~~~~~~~~~~~ src/files.cpp:418:16: error: cannot initialize object parameter of type 'const quickbook::file' with an expression of type 'quickbook::mapped_file' return data->new_file->source().size(); ^~~~~~~~~~~~~~ src/files.cpp:447:18: error: too few template arguments for class template 'vector' std::vector<mapped_file_section>::const_iterator start = ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/files.cpp:457:20: error: reference to non-static member function must be called for (++start; start != x.data->new_file->mapped_sections.end() && ^~~~~ src/files.cpp:458:21: error: reference to non-static member function must be called start->our_pos < end; ++start) ^~~~~ src/files.cpp:458:45: error: reference to non-static member function must be called start->our_pos < end; ++start) ^~~~~ src/files.cpp:461:21: error: reference to non-static member function must be called start->original_pos, start->our_pos - begin + size, ^~~~~ In file included from src/files.cpp:12: In file included from ../../boost/unordered_map.hpp:17: ../../boost/unordered/unordered_map.hpp:295:35: error: implicit instantiation of undefined template 'std::pair<boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::__1::pair<const boost::filesystem::path, boost::intrusive_ptr<quickbook::file> > > >, bool>' std::pair<iterator, bool> emplace( ^ src/files.cpp:129:47: note: in instantiation of function template specialization 'boost::unordered::unordered_map<boost::filesystem::path, boost::intrusive_ptr<quickbook::file>, boost::hash<boost::filesystem::path>, std::__1::equal_to<boost::filesystem::path>, std::__1::allocator<std::__1::pair<const boost::filesystem::path, boost::intrusive_ptr<quickbook::file> > > >::emplace<boost::filesystem::path, quickbook::file *>' requested here boost::tie(pos, inserted) = files.emplace( ^ ../../boost/detail/container_fwd.hpp:145:42: note: template is declared here template <class T1, class T2> struct pair; ^ In file included from src/files.cpp:12: In file included from ../../boost/unordered_map.hpp:17: ../../boost/unordered/unordered_map.hpp:299:20: error: no viable conversion from 'emplace_return' (aka 'pair<iterator, bool>') to 'std::pair<iterator, bool>' return table_.emplace( ^~~~~~~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.
"g++" -ftemplate-depth-300 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -g0 -DBOOST_ALL_NO_LIB=1 -DBOOST_DETAIL_CONTAINER_FWD -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"../.." -c -o "../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/files.o" "src/files.cpp"
...failed darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/files.o... darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/id_generation.o src/id_generation.cpp:29:18: error: too few template arguments for class template 'vector' typedef std::vector<id_placeholder const*> placeholder_index; ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:33:13: error: expected a class or namespace placeholder_index::iterator, placeholder_index::iterator, ^ src/id_generation.cpp:33:42: error: expected a class or namespace placeholder_index::iterator, placeholder_index::iterator, ^ src/id_generation.cpp:34:18: error: too few template arguments for class template 'vector' std::vector<std::string>& generated_ids); ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:36:10: error: too few template arguments for class template 'vector' std::vector<std::string> generate_ids(document_state_impl const& state, boost::string_ref xml) ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:38:14: error: too few template arguments for class template 'vector' std::vector<std::string> generated_ids(state.placeholders.size()); ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:44:22: error: too few template arguments for class template 'vector' typedef std::vector<id_placeholder const*>::iterator iterator; ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:45:35: error: member reference base type 'placeholder_index' (aka 'int') is not a structure or union iterator it = placeholders.begin(), end = placeholders.end(); ~~~~~~~~~~~~^~~~~~ src/id_generation.cpp:45:63: error: member reference base type 'placeholder_index' (aka 'int') is not a structure or union iterator it = placeholders.begin(), end = placeholders.end(); ~~~~~~~~~~~~^~~~ src/id_generation.cpp:55:41: error: indirection requires pointer operand ('iterator' (aka 'int') invalid) while (group_end != end && (*group_end)->num_dots == (*it)->num_dots) ^~~~~~~~~~ src/id_generation.cpp:55:67: error: indirection requires pointer operand ('iterator' (aka 'int') invalid) while (group_end != end && (*group_end)->num_dots == (*it)->num_dots) ^~~ src/id_generation.cpp:74:14: error: too few template arguments for class template 'vector' std::vector<unsigned>& order; ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:76:34: error: too few template arguments for class template 'vector' placeholder_compare(std::vector<unsigned>& order) : order(order) {} ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:95:14: error: too few template arguments for class template 'vector' std::vector<unsigned>& order; ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:99:22: error: too few template arguments for class template 'vector' std::vector<unsigned>& order) ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:124:14: error: too few template arguments for class template 'vector' std::vector<unsigned> order(state.placeholders.size()); ^ ../../boost/detail/container_fwd.hpp:135:47: note: template is declared here template <class T, class Allocator> class vector; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/id_generation.cpp:128:30: error: non-const lvalue reference to type 'quickbook::xml_processor::callback' cannot bind to a value of unrelated type 'quickbook::get_placeholder_order_callback' processor.parse(xml, callback); ^~~~~~~~ src/document_state_impl.hpp:143:48: note: passing argument to parameter here void parse(boost::string_ref, callback&); ^ src/id_generation.cpp:131:28: error: member reference base type 'placeholder_index' (aka 'int') is not a structure or union sorted_placeholders.reserve(state.placeholders.size()); ~~~~~~~~~~~~~~~~~~~^~~~~~~~ src/id_generation.cpp:133:52: error: member reference base type 'placeholder_index' (aka 'int') is not a structure or union if (order[p.index]) sorted_placeholders.push_back(&p); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.
"g++" -ftemplate-depth-300 -O3 -finline-functions -Wno-inline -Wall -gdwarf-2 -fexceptions -g0 -DBOOST_ALL_NO_LIB=1 -DBOOST_DETAIL_CONTAINER_FWD -DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG -I"../.." -c -o "../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/id_generation.o" "src/id_generation.cpp"
...failed darwin.compile.c++ ../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static/id_generation.o... ...skipped <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>quickbook for lack of <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>files.o... ...skipped <p../../dist/bin>quickbook for lack of <p../../bin.v2/tools/quickbook/src/darwin-4.2.1/release/link-static>quickbook... ...failed updating 2 targets... ...skipped 2 targets... ...updated 2 targets...
compiler:
tim@moka-mac:~/dev/boost/tools/quickbook$ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
is this a known issue? thanks, tim
On 5 January 2014 12:10, Tim Blechmann <tim@klingt.org> wrote:
compiler:
tim@moka-mac:~/dev/boost/tools/quickbook$ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
is this a known issue?
Try with the quickbook develop branch (cd tools/quickbook; git checkout develop), I just checked in a possible fix. It seems the standard library has different default settings under the clang emulation, and they aren't compatible with how I was building quickbook, so I changed the build settings.
tim@moka-mac:~/dev/boost/tools/quickbook$ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
is this a known issue?
Try with the quickbook develop branch (cd tools/quickbook; git checkout develop), I just checked in a possible fix. It seems the standard library has different default settings under the clang emulation, and they aren't compatible with how I was building quickbook, so I changed the build settings.
great, compiles now ... just one warning:
src/id_generation.cpp:218:25: warning: comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare] if (child_start == std::string::npos) { ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ 1 warning generated.
thnx for the quick fix, tim
Daniel James wrote:
Try with the quickbook develop branch (cd tools/quickbook; git checkout develop), I just checked in a possible fix.
I know nothing about container_fwd.hpp or quickbook, but this doesn't seem right to me. files.cpp uses pair and vector and should just include <utility> and <vector>.
-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Tim Blechmann Sent: Sunday, January 05, 2014 12:10 PM To: boost@lists.boost.org Subject: [boost] [develop] quickbook compile failure
trying to compile quickbook with apple's clang gives me the following error:
<snip>
...failed updating 2 targets... ...skipped 2 targets... ...updated 2 targets...
compiler:
tim@moka-mac:~/dev/boost/tools/quickbook$ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0 Thread model: posix
is this a known issue?
For what little its worth, I have built Quickbook using MSVC 2010 post-GIT. Paul --- Paul A. Bristow, Prizet Farmhouse, Kendal LA8 8AB UK +44 1539 561830 07714330204 pbristow@hetp.u-net.com
Tim Blechmann wrote:
src/files.cpp:129:47: error: implicit instantiation of undefined template 'std::pair<boost::unordered::iterator_detail::iterator<boost::unordered::detail::ptr_node<std::__1::pair<const boost::filesystem::path, boost::intrusive_ptr<quickbook::file> > > >, bool>' boost::tie(pos, inserted) = files.emplace( ^ ... src/files.cpp:257:14: error: too few template arguments for class template 'vector' std::vector<mapped_file_section> mapped_sections; ^
Neither <vector> nor <utility> are included, so that's not surprising, is it? In fact, boost::tie's header isn't included either, whatever it is. :-)
participants (4)
-
Daniel James
-
Paul A. Bristow
-
Peter Dimov
-
Tim Blechmann