Boost.Wave compilation taking forever

I recently downloaded the source for Boost 1.33.0 and tried to compile and install it, but I hit a problem when compiling Boost.Wave: the compilation time for the file $BOOST_ROOT/libs/wave/src/instantiate_cpp_literalgrs.cpp seems to take forever (after 4 days, the compiler was still running hard, no output). Is that normal? It is mentioned in the documentation that without separate compilation, compiling a program using Boost.Wave can take up to an hour (depending on your system configuration), so I guess compiling the library could take a long time as well, but days!?! For reference, here is my compilation command: cd $BOOST_ROOT bjam --prefix=$SOMEWHERE --builddir=build --with-python-root=/usr \ "-sTOOLS=gcc" "-sBUILD=release <optimization>speed \ <runtime-link>dynamic <threading>multi" \ "-sPYTHON_VERSION=2.3" install The platform is x86_64 running GNU/Linux, kernel 2.6.10-1.771_FC2 (from Fedora Core 2). Compiler version is g++ (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7). -- Francois

Hi, I'm trying to use the boost::multi_index_container to index a struct based on a enum and a std::string. While I can retrive data from the container by search on the string any attempts to such on the enum results in a compliation error. Anyone got any ideas as to what I need todo to get this to work :) The compiler is MSVC++7.1 Any Help would be appricated :) Relivaent code and errors follow: : namespace mi = boost::multi_index; struct FilterCreatorDetails { FilterCreatorDetails(FileTypes id, std::string key, filtercreator creator) : id_(id), key_(key), creator_(creator) { } FilterCreatorDetails(FilterCreatorDetails const &lhs) : id_(lhs.id_), key_(lhs.key_), creator_(lhs.creator_) { } std::string key_; FileTypes id_; filtercreator creator_; bool operator<(FilterCreatorDetails const &lhs) const { return id_ < lhs.id_; }; }; struct key{}; struct id{}; typedef mi::multi_index_container< FilterCreatorDetails, mi::indexed_by< mi::ordered_unique< mi::tag<id> , mi::identity<FilterCreatorDetails> >, // orders by operator < mi::ordered_non_unique <mi::tag<key> , mi::member<FilterCreatorDetails,std::string, &FilterCreatorDetails::key_> > > > texmap_t; // code below doesnt work, causes errors on compile when i try to use the 'find' function filtercreator FilterRegister::getCreator(FileTypes val) { typedef texmap_t::index<id>::type tex_by_id; tex_by_id::iterator it = texturefilters->get<id>().find(val); return (*it).creator_; return filtercreator(); } // this function works however... filtercreator FilterRegister::getCreator(std::string const &val) { typedef texmap_t::index<key>::type tex_by_name; tex_by_name::iterator it = texturefilters->get<key>().find(val); /*texmap_t::const_iterator val = texturefilters->find(key);*/ return (*it).creator_; } // The short errors : g:\Boost\include\boost-1_33\boost\multi_index\detail\ord_index_ops.hpp(72): error C2664: 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' : cannot convert parameter 1 from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type &' with [ _Ty=boost::multi_index::detail::non_const_identity_base<GameTextureLoader::FilterCreatorDetails>::result_type ] and [ Type=GameTextureLoader::FilterCreatorDetails ] g:\Boost\include\boost-1_33\boost\multi_index\detail\ord_index_ops.hpp(65): error C2664: 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' : cannot convert parameter 2 from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type &' with [ _Ty=boost::multi_index::detail::non_const_identity_base<GameTextureLoader::FilterCreatorDetails>::result_type ] and [ Type=GameTextureLoader::FilterCreatorDetails ] // the long rambling build log errors ------ Build started: Project: Game Texture Loader, Configuration: Debug Win32 ------ Compiling... GTL_internal.cpp g:\Boost\include\boost-1_33\boost\multi_index\detail\ord_index_ops.hpp(65) : error C2664: 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' : cannot convert parameter 2 from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type &' with [ _Ty=boost::multi_index::detail::non_const_identity_base<GameTextureLoader::FilterCreatorDetails>::result_type ] and [ Type=GameTextureLoader::FilterCreatorDetails ] Reason: cannot convert from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type' with [ Type=GameTextureLoader::FilterCreatorDetails ] No constructor could take the source type, or constructor overload resolution was ambiguous g:\Boost\include\boost-1_33\boost\multi_index\ordered_index.hpp(383) : see reference to function template instantiation 'Node *boost::multi_index::detail::ordered_index_find<boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>::node_type,boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>::key_from_value,CompatibleKey,boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>::key_compare>(Node *,const KeyFromValue &,const CompatibleKey &,const CompatibleCompare &)' being compiled with [ Node=boost::multi_index::detail::ordered_index<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::key_from_value_type,boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::compare_type,boost::multi_index::detail::nth_layer<1,GameTextureLoader::FilterCreatorDetails,boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_non_unique<boost::multi_index::tag<GameTextureLoader::key>,boost::multi_index::member<GameTextureLoader::FilterCreatorDetails,std::string,pointer-to-member(0x0)>>>,std::allocator<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::tag_list_type,boost::multi_index::detail::ordered_unique_tag>::node_type, KeyFromValue=boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::key_from_value_type, Compare=boost::multi_index::ordered_unique<boost::multi_index::tag<Ga meTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::compare_type, SuperMeta=boost::multi_index::detail::nth_layer<1,GameTextureLoader::FilterCreatorDetails,boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_non_unique<boost::multi_index::tag<GameTextureLoader::key>,boost::multi_index::member<GameTextureLoader::FilterCreatorDetails,std::string,pointer-to-member(0x0)>>>,std::allocator<GameTextureLoader::FilterCreatorDetails>>, TagList=boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::tag_list_type, Category=boost::multi_index::detail::ordered_unique_tag, CompatibleKey=GameTextureLoader::FileTypes, CompatibleCompare=boost::multi_index::detail::ordered_index<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::key_from_value_type,boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::compare_type,boost::multi_index::detail::nth_layer<1,GameTextureLoader::FilterCreatorDetails,boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_non_unique<boost::multi_index::tag<GameTextureLoader::key>,boost::multi_index::member<GameTextureLoader::FilterCreatorDetails,std::string,pointer-to-member(0x0)>>>,std::allocator<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::tag_list_ty pe,boost::multi_index::detail::ordered_unique_tag>::key_compare ] d:\My Documents\Visual Studio Projects\Game Texture Loader\GTL_internal.cpp(46) : see reference to function template instantiation 'boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>::iterator boost::multi_index::detail::ordered_index<KeyFromValue,Compare,SuperMeta,TagList,Category>::find<GameTextureLoader::FileTypes>(const CompatibleKey &) const' being compiled with [ KeyFromValue=boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::key_from_value_type, Compare=boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::compare_type, SuperMeta=boost::multi_index::detail::nth_layer<1,GameTextureLoader::FilterCreatorDetails,boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>,boost::multi_index::ordered_non_unique<boost::multi_index::tag<GameTextureLoader::key>,boost::multi_index::member<GameTextureLoader::FilterCreatorDetails,std::string,pointer-to-member(0x0)>>>,std::allocator<GameTextureLoader::FilterCreatorDetails>>, TagList=boost::multi_index::ordered_unique<boost::multi_index::tag<GameTextureLoader::id>,boost::multi_index::identity<GameTextureLoader::FilterCreatorDetails>>::tag_list_type, Category=boost::multi_index::detail::ordered_unique_tag, CompatibleKey=GameTextureLoader::FileTypes ] g:\Boost\include\boost-1_33\boost\multi_index\detail\ord_index_ops.hpp(72) : error C2664: 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' : cannot convert parameter 1 from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type &' with [ _Ty=boost::multi_index::detail::non_const_identity_base<GameTextureLoader::FilterCreatorDetails>::result_type ] and [ Type=GameTextureLoader::FilterCreatorDetails ] Reason: cannot convert from 'const GameTextureLoader::FileTypes' to 'const boost::multi_index::detail::non_const_identity_base<Type>::result_type' with [ Type=GameTextureLoader::FilterCreatorDetails ] No constructor could take the source type, or constructor overload resolution was ambiguous Build Time 0:07 Build log was saved at "file://d:\My Documents\Visual Studio Projects\Game Texture Loader\Debug\BuildLog.htm" Game Texture Loader - 2 error(s), 0 warning(s) ------ Build started: Project: GTLTester, Configuration: Debug Win32 ------ GTLTester - up-to-date. Build Time 0:00 ---------------------- Done ---------------------- Build: 1 succeeded, 1 failed, 0 skipped

Hello, ----- Mensaje original ----- De: Phantom <r...@phantom-web.co.uk> Fecha: Lunes, Agosto 29, 2005 7:59 pm Asunto: [Boost-users] Boost::multiIndex container problems
Hi,
I'm trying to use the boost::multi_index_container to index a struct based on a enum and a std::string. While I can retrive data from the container by search on the string any attempts to such on the enum results in a compliation error. Anyone got any ideas as to what I need todo to get this to work :)
I haven't compiled your code, but I think the problem lies in that you define the id index as mi::ordered_unique< mi::tag<id> , mi::identity<FilterCreatorDetails> > that is, the key for this index is the *whole* FilterCreatorDetails object; yet, you later try to use it passing a FileTypes value. Try defining your index as: mi::ordered_unique< mi::tag<id> , mi::member< FilterCreatorDetails,FileTypes, &FilterCreatorDetails::id_> > and I think everything should work. Please come back here if it doesn't. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Thanks for the reply :) You're inital code caused an internal compiler error (see build log after this email), however I took another look at the example and changed it to the following and it worked fine : mi::ordered_unique< mi::tag<id>, BOOST_MULTI_INDEX_MEMBER(FilterCreatorDetails, FileTypes, id_) so thanks for the pointer :) ----- Build log for overload follows ----- ------ Build started: Project: Game Texture Loader, Configuration: Debug Win32 ------ Compiling... GTL_internal.cpp g:\Boost\include\boost-1_33\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(48) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Generating Code... Compiling... GameTextureLoader.cpp Generating Code... Build Time 0:13 Build log was saved at "file://d:\My Documents\Visual Studio Projects\Game Texture Loader\Debug\BuildLog.htm" Game Texture Loader - 1 error(s), 0 warning(s) ------ Build started: Project: GTLTester, Configuration: Debug Win32 ------ GTLTester - up-to-date. Build Time 0:00 ---------------------- Done ---------------------- Build: 1 succeeded, 1 failed, 0 skipped ----- Original Message ----- From: "Joaquín Mª López Muñoz" <joaquin@tid.es> To: <boost-users@lists.boost.org> Sent: Tuesday, August 30, 2005 6:43 AM Subject: Re: [Boost-users] Boost::multiIndex container problems Hello, ----- Mensaje original ----- De: Phantom <r...@phantom-web.co.uk> Fecha: Lunes, Agosto 29, 2005 7:59 pm Asunto: [Boost-users] Boost::multiIndex container problems
Hi,
I'm trying to use the boost::multi_index_container to index a struct based on a enum and a std::string. While I can retrive data from the container by search on the string any attempts to such on the enum results in a compliation error. Anyone got any ideas as to what I need todo to get this to work :)
I haven't compiled your code, but I think the problem lies in that you define the id index as mi::ordered_unique< mi::tag<id> , mi::identity<FilterCreatorDetails> > that is, the key for this index is the *whole* FilterCreatorDetails object; yet, you later try to use it passing a FileTypes value. Try defining your index as: mi::ordered_unique< mi::tag<id> , mi::member< FilterCreatorDetails,FileTypes, &FilterCreatorDetails::id_> > and I think everything should work. Please come back here if it doesn't. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

François Duranleau wrote: [snip]
$BOOST_ROOT/libs/wave/src/instantiate_cpp_literalgrs.cpp seems to take forever (after 4 days, the compiler was still running hard, no output). Is that normal? [snip] The platform is x86_64 running GNU/Linux, kernel 2.6.10-1.771_FC2 (from Fedora Core 2). Compiler version is g++ (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
FWIW, I faintly remember having encountered such a compiles-forever issue with GCC3.3.3 too (on Windows, with a small test program that did not use wave). I then tried with GCC3.4.2 and the problem went away... HTH, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
participants (4)
-
Andreas Huber
-
François Duranleau
-
Joaquín Mª López Muñoz
-
Phantom