Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, Jan 04, 2011 at 07:01:14PM +, Caolán McNamara wrote: > Aha, well that makes more sense anyway. C++0x compiler, boost makes some > assumptions that std::forward is available, which it isn't, cause this > is x86 and we're using stlport despite building with c++0x. > > Alright, just go ahead and stick your patch of > > #define MDDS_HASH_CONTAINER_STLPORT 1 > > in. You can remove the MDDS_CPPFLAGS line from the makefile.mk as well > in that case. Its the easiest thing to do. Done. Thanks for the help. :) pgp1symmsJM8l.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, 2011-01-04 at 19:15 +0100, Miklos Vajna wrote: > I'm attaching the new build output where I guess the real error is: > > /usr/include/boost/unordered/detail/hash_table_impl.hpp:197:54: error: > 'forward' is not a member of '_STL' Aha, well that makes more sense anyway. C++0x compiler, boost makes some assumptions that std::forward is available, which it isn't, cause this is x86 and we're using stlport despite building with c++0x. Alright, just go ahead and stick your patch of #define MDDS_HASH_CONTAINER_STLPORT 1 in. You can remove the MDDS_CPPFLAGS line from the makefile.mk as well in that case. Its the easiest thing to do. We can leave the configure test as it is, as its just checking that the header is sane. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, Jan 04, 2011 at 05:39:02PM +, Caolán McNamara wrote: > configure:16032: checking which hash container mdds shall use > configure:16036: result: boost::unordered_map > > So that should mean that > > a) grep MDDS_CPPFLAGS= Linux*.sh > > says > > MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST" > > is that the case ? Right: $ grep MDDS_CPPFLAGS= Linux*.sh MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST" > b) > /home/vmiklos/git/libreoffice/master/clone/calc/sc/source/core/tool/makefile.mk > should have CFLAGSCXX+=$(MDDS_CPPFLAGS) in it, which should ensure that if > you do... > > touch scmatrix.cxx && VERBOSE=true dmake 2>&1 | sed 's/ /\n/g' | grep > MDDS > > you get -DMDDS_HASH_CONTAINER_BOOST, right ? This will be a problem: it turns I got a breakage during 'make', then I sent the output of 'build', but that was an other error, since I forgot to re-source Linux*.sh. Sorry about that. After re-sourcing: $ touch scmatrix.cxx && VERBOSE=true dmake 2>&1 | sed 's/ /\n/g' | grep MDDS -DMDDS_HASH_CONTAINER_BOOST > c) and /usr/include/mdds/hash_container/map.hpp has > > #elif defined (MDDS_HASH_CONTAINER_BOOST) > #include > > *before* > > #else > // c++0x > #include > > right ? That's also right. I'm attaching the new build output where I guess the real error is: /usr/include/boost/unordered/detail/hash_table_impl.hpp:197:54: error: 'forward' is not a member of '_STL' Probably some missing include. :) Thanks. build -- version: 275224 = Building module sc = Entering /home/vmiklos/git/libreoffice/master/sc/inc Entering /home/vmiklos/git/libreoffice/master/sc/sdi Entering /home/vmiklos/git/libreoffice/master/sc/addin Entering /home/vmiklos/git/libreoffice/master/sc/addin/rot13 Entering /home/vmiklos/git/libreoffice/master/sc/addin/datefunc Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/docshell Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/styleui Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/src Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/miscdlgs Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/vba Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/app Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/view Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/optdlg Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/drawfunc Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/undo Entering /home/vmiklos/git/libreoffice/master/sc/source/filter/ftools Entering /home/vmiklos/git/libreoffice/master/sc/source/core/data Entering /home/vmiklos/git/libreoffice/master/sc/source/filter/rtf Entering /home/vmiklos/git/libreoffice/master/sc/source/filter/html Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/Accessibility Entering /home/vmiklos/git/libreoffice/master/sc/addin/util Entering /home/vmiklos/git/libreoffice/master/sc/source/filter/dif Entering /home/vmiklos/git/libreoffice/master/sc/source/filter/qpro Entering /home/vmiklos/git/libreoffice/master/sc/source/ui/attrdlg Entering /home/vmiklos/git/libreoffice/master/sc/source/core/tool Compiling: sc/source/core/tool/scmatrix.cxx In file included from /usr/include/boost/unordered/detail/hash_table.hpp:240:0, from /usr/include/boost/unordered/unordered_map.hpp:18, from /usr/include/boost/unordered_map.hpp:16, from /usr/include/mdds/hash_container/map.hpp:37, from /usr/include/mdds/mixed_type_matrix_flag_storage.hpp:32, from /usr/include/mdds/mixed_type_matrix.hpp:34, from /home/vmiklos/git/libreoffice/master/clone/calc/sc/source/core/tool/scmatrix.cxx:45: /usr/include/boost/unordered/detail/hash_table_impl.hpp: In member function 'void boost::unordered_detail::hash_table_data_equivalent_keys::node_constructor::construct(Args&& ...)': /usr/include/boost/unordered/detail/hash_table_impl.hpp:197:54: error: 'forward' is not a member of '_STL' /usr/include/boost/unordered/detail/hash_table_impl.hpp:197:71: error: expected primary-expression before '>' token /usr/include/boost/unordered/detail/hash_table_impl.hpp: In member function 'boost::unordered_detail::hash_table_equivalent_keys::iterator_base boost::unordered_detail::hash_table_equivalent_keys::insert(Args&& ...)': /usr/include/boost/unordered/detail/hash_table_impl.hpp:1627:29: error: 'forward' is not a member of '_STL' /usr/include/boost/unordered/detail/hash_table_impl.hpp:1627:46: error: expected primary-expression before '>' token /usr/include/boost/unordered/detail/hash_table_impl.hpp: In member function 'boost::unordered_detail::hash_table_equivalent_keys::iterator_base boost::unordered_detail::hash_table_equivalent_keys::insert_hint(boost::unordered_detail::hash_table_equivalent_keys::iterator_base&, Args&& ...)': /usr/include/boost/unordered/detail/hash_table_impl.hpp:1643:29: error: 'forward' is not a member
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, 2011-01-04 at 18:05 +0100, Miklos Vajna wrote: > On Tue, Jan 04, 2011 at 12:39:21PM +, Caolán McNamara > wrote: > > Do you still have this problem. If so can you attach your config.log. At > > the moment in head I think we should be preferring the > > boost::unordered_map as the backend. > > Yeah, sc still fails to build here without the attached patch. I'm > attaching config.log as well. So, this is a little bizarre. Your log says... configure:16032: checking which hash container mdds shall use configure:16036: result: boost::unordered_map So that should mean that a) grep MDDS_CPPFLAGS= Linux*.sh says MDDS_CPPFLAGS="-DMDDS_HASH_CONTAINER_BOOST" is that the case ? b) /home/vmiklos/git/libreoffice/master/clone/calc/sc/source/core/tool/makefile.mk should have CFLAGSCXX+=$(MDDS_CPPFLAGS) in it, which should ensure that if you do... touch scmatrix.cxx && VERBOSE=true dmake 2>&1 | sed 's/ /\n/g' | grep MDDS you get -DMDDS_HASH_CONTAINER_BOOST, right ? c) and /usr/include/mdds/hash_container/map.hpp has #elif defined (MDDS_HASH_CONTAINER_BOOST) #include *before* #else // c++0x #include right ? C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, 2011-01-04 at 04:08 +0100, Miklos Vajna wrote: > Hi, > > Looks like there is something similar in sc as well Do you still have this problem. If so can you attach your config.log. At the moment in head I think we should be preferring the boost::unordered_map as the backend. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, Jan 04, 2011 at 12:16:59AM -0500, Kohei Yoshida wrote: > > using #include "preextstl.h" / #include "postextstl.h" but that does not > > seem to help. Any other idea? :) > > Does setting > > #define MDDS_HASH_CONTAINER_STLPORT 1 > > before > > #include > > help? Yes, it does. :) May I push that change or we need some trick to avoid breaking non-stlport builds? Thanks! pgpHfu49YSxw1.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
Hi, > Does setting > #define MDDS_HASH_CONTAINER_STLPORT 1 > before > #include > > help? > > I also saw someone having a similar issue in the same exact spot, which > I haven't been able to reproduce. Maybe this is related. I had also a problem after having upgraded to mds 0.4.0 with an up to date (25.12.2010) git At the ende, I managed to compile making a hack to 0.4.0 (very dirty...). Since this part was outside of my understanding, I am not able to know if the error was from my side or not... and since you were "on holliday" I kept it if someone also run in trouble. Below more explanation. Since then, I did not recompile the whole stuff... take too long by me.:- ) regards >> I guess this is specific to system-mdds. > Conceptually there should be no difference whether it's system or > internal, since mdds is just a collection of header files with no > libraries to build or link against. From the looks of the log file, it > *may* have some issues with gcc 4.5.x's implementation of unordered_map, > but I'm not sure 100%... I have tried make clean, make distclean I have used ./autogen.sh --with-num-cpus=2 --without-junit --disable-kde --enable-binfilter compiler: gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux) I did not success to compile, until I changed: libo_dev/solver/330/unxlngi6.pro/inc/mdds/hash_container/map.hpp simulating having MDDS_HASH_CONTAINER_STLPORT defined: like this: #else // c++0x #include #define _mdds_unordered_map_type ::std::hash_map //#include //#define _mdds_unordered_map_type ::std::unordered_map #endif Else, I got error like Compiling: sc/source/core/tool/scmatrix.cxx In file included from /usr/include/c++/4.5/bits/stl_algobase.h:63:0, from /usr/include/c++/4.5/unordered_map:41, from /home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/hash_container/map.hpp:41, from /home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/mixed_type_matrix_flag_storage.hpp:32, from /home/pjacquod/LibO_dev/libo_dev/solver/330/unxlngi6.pro/inc/mdds/mixed_type_matrix.hpp:34, from /home/pjacquod/LibO_dev/libo_dev/clone/calc/sc/source/core/tool/scmatrix.cxx:45: /usr/include/c++/4.5/bits/cpp_type_traits.h:78:10: error: redefinition of 'struct _STL::__true_type' ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Tue, 2011-01-04 at 04:08 +0100, Miklos Vajna wrote: > Hi, > > Looks like there is something similar in sc as well, see the attached > log. I tried guarding > > #include > > using #include "preextstl.h" / #include "postextstl.h" but that does not > seem to help. Any other idea? :) Does setting #define MDDS_HASH_CONTAINER_STLPORT 1 before #include help? I also saw someone having a similar issue in the same exact spot, which I haven't been able to reproduce. > I guess this is specific to system-mdds. Conceptually there should be no difference whether it's system or internal, since mdds is just a collection of header files with no libraries to build or link against. From the looks of the log file, it *may* have some issues with gcc 4.5.x's implementation of unordered_map, but I'm not sure 100%... Kohei -- Kohei Yoshida, LibreOffice hacker, Calc ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Mon, Jan 03, 2011 at 02:46:53PM +, Luke Dixon <6b8b4...@gmail.com> wrote: > I'm very sorry the code I was playing with has caused problems. > > I guess I wasn't thinking when adding the first header outside the > guards. > > The assertion_traits struct, I was expecting this to be a problem, but I > didn't know what to do about it, sorry. No problem, that happens[1]. :) [1] http://article.gmane.org/gmane.comp.documentfoundation.libreoffice.devel/1349 pgpIuOHrBBqtO.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
Hello, I'm very sorry the code I was playing with has caused problems. I guess I wasn't thinking when adding the first header outside the guards. The assertion_traits struct, I was expecting this to be a problem, but I didn't know what to do about it, sorry. Apologies, Luke ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Wed, Dec 29, 2010 at 09:28:56PM +, Caolán McNamara wrote: > If you change "std::" in that little section to "ext_std::" i.e. the > attached, does that work ? Yes. :) > If it does, go ahead and commit and push this, if it doesn't then go > ahead an push your own fix instead. Pushed your one. Thanks! pgpnkJKvOVcGU.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Sat, 2010-12-25 at 13:43 +0100, Miklos Vajna wrote: > On Fri, Dec 24, 2010 at 01:41:56PM +, Caolán McNamara > wrote: > > Try now again, there was one cppunit header included outside those > > guard. I've moved it inside the guards now. Does that now work ? > > No, I get the same output. However, using the attached patch everything > is OK. If you change "std::" in that little section to "ext_std::" i.e. the attached, does that work ? If it does, go ahead and commit and push this, if it doesn't then go ahead an push your own fix instead. C. diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 9fa5ec0..687f75b 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -66,9 +66,9 @@ struct assertion_traits return x == y; } -static std::string toString(const String& x) +static ext_std::string toString(const String& x) { -std::string text = ByteString(x, RTL_TEXTENCODING_UTF8).GetBuffer(); +ext_std::string text = ByteString(x, RTL_TEXTENCODING_UTF8).GetBuffer(); OStringStream ost; ost << text; return ost.str(); ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Fri, Dec 24, 2010 at 01:41:56PM +, Caolán McNamara wrote: > Try now again, there was one cppunit header included outside those > guard. I've moved it inside the guards now. Does that now work ? No, I get the same output. However, using the attached patch everything is OK. So looks like classes used by external C++ libraries need those guards as well. OK to push or you have a more elegant idea? :) From af96261cd472e9bb0a496d76ff29e12d6e28a7cd Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sat, 25 Dec 2010 13:40:04 +0100 Subject: [PATCH] guard CppUnit::assertion_traits struct --- starmath/qa/cppunit/test_nodetotextvisitors.cxx |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 9fa5ec0..07f6c89 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -57,6 +57,7 @@ #include #include +#include "preextstl.h" namespace CppUnit { template<> struct assertion_traits @@ -75,6 +76,7 @@ struct assertion_traits } }; } +#include "postextstl.h" SO2_DECL_REF(SmDocShell) SO2_IMPL_REF(SmDocShell) -- 1.7.3.4 pgpgAPhdUyydd.pgp Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] starmath / cppunit breakage in master
On Fri, 2010-12-24 at 03:22 +0100, Miklos Vajna wrote: > Hi, > > Currently I'm getting: > > /usr/include/cppunit/TestAssert.h:101:5: error: no matching function for call > to 'CppUnit::Asserter::failNotEqual(_STL::string, _STL::string, > CppUnit::SourceLine&, const std::string&)' > /usr/include/cppunit/Asserter.h:114:27: note: candidate is: static void > CppUnit::Asserter::failNotEqual(std::string, std::string, const > CppUnit::SourceLine&, const CppUnit::AdditionalMessage&, std::string) > The strange thing is that this is usually handled by the extstl headers, > but preextstl.h and postextstl.h is already included before/after the > cppunit headers in qa/cppunit/test_nodetotextvisitors.cxx. Try now again, there was one cppunit header included outside those guard. I've moved it inside the guards now. Does that now work ? C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] starmath / cppunit breakage in master
Hi, Currently I'm getting: /usr/include/cppunit/TestAssert.h:101:5: error: no matching function for call to 'CppUnit::Asserter::failNotEqual(_STL::string, _STL::string, CppUnit::SourceLine&, const std::string&)' /usr/include/cppunit/Asserter.h:114:27: note: candidate is: static void CppUnit::Asserter::failNotEqual(std::string, std::string, const CppUnit::SourceLine&, const CppUnit::AdditionalMessage&, std::string) in starmath when building master. I'm attaching the full output of 'build' in starmath. I'm using system-cppunit and internal stlport, and I'm almost sure the breakage is somehow related to the std vs _STL differences. The strange thing is that this is usually handled by the extstl headers, but preextstl.h and postextstl.h is already included before/after the cppunit headers in qa/cppunit/test_nodetotextvisitors.cxx. Do you have an idea what can be wrong here? This is with gcc-4.5.2, but IIRC I already had this with 4.5.1 already. I tried removing the preextstl.h / postextstl.h headers from the above file, but that just turned the compile error to a linker one. ;) Thanks. build -- version: 275224 = Building module starmath = Entering /home/vmiklos/git/libreoffice/master/starmath/inc Entering /home/vmiklos/git/libreoffice/master/starmath/sdi Entering /home/vmiklos/git/libreoffice/master/starmath/source Entering /home/vmiklos/git/libreoffice/master/starmath/util Entering /home/vmiklos/git/libreoffice/master/starmath/qa/cppunit Compiling: starmath/qa/cppunit/test_nodetotextvisitors.cxx /home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/test_nodetotextvisitors.cxx: In static member function 'static _STL::string CppUnit::assertion_traits::toString(const String&)': /home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/test_nodetotextvisitors.cxx:73:16: error: cannot bind 'std::basic_ostream' lvalue to 'std::basic_ostream&&' /usr/include/c++/4.5.2/ostream:579:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char, _Traits = std::char_traits, _Tp = _STL::basic_string, _STL::allocator >]' /home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/test_nodetotextvisitors.cxx:74:24: error: conversion from 'std::basic_ostringstream::__string_type' to non-scalar type '_STL::string' requested In file included from /usr/include/cppunit/TestCase.h:6:0, from /home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/test_nodetotextvisitors.cxx:41: /usr/include/cppunit/TestAssert.h: In function 'void CppUnit::assertEquals(const T&, const T&, CppUnit::SourceLine, const std::string&) [with T = String, std::string = std::basic_string]': /home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/test_nodetotextvisitors.cxx:492:5: instantiated from here /usr/include/cppunit/TestAssert.h:101:5: error: no matching function for call to 'CppUnit::Asserter::failNotEqual(_STL::string, _STL::string, CppUnit::SourceLine&, const std::string&)' /usr/include/cppunit/Asserter.h:114:27: note: candidate is: static void CppUnit::Asserter::failNotEqual(std::string, std::string, const CppUnit::SourceLine&, const CppUnit::AdditionalMessage&, std::string) dmake: Error code 1, while making '../../unxlngi6.pro/slo/test_nodetotextvisitors.obj' Forcing regeneration of dependency info -- - start unit test #1 on library -- : && LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}/home/vmiklos/git/libreoffice/master/clone/writer/starmath/unxlngi6.pro/lib:/home/vmiklos/git/libreoffice/master/solver/330/unxlngi6.pro/lib /home/vmiklos/git/libreoffice/master/solver/330/unxlngi6.pro/bin/cppunittester -headless -invisible \ -env:UNO_SERVICES=file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit/services.rdb \ -env:UNO_TYPES="file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit/types.rdb file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit/udkapi.rdb" \ -env:OOO_BASE_DIR="file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit" \ -env:BRAND_BASE_DIR="file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit" \ -env:UNO_USER_PACKAGES_CACHE="file:///home/vmiklos/git/libreoffice/master/clone/writer/starmath/qa/cppunit/../../unxlngi6.pro/misc/qa_cppunit" terminate called after throwing an instance of 'CppUnit::DynamicLibraryManagerException' what(): Failed to load dynamic library: -headless /bin/sh: line 1: 5462 Aborted LD_LI