|
János Uray |
|
|
I have a simple question.
Can I use C++11 in LibreOffice development? Or at least some parts of C++11? Thanks Uray M. János _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
Forgot to reply all in this gmail web interface...
On Mon, Jul 16, 2012 at 12:22 PM, Kohei Yoshida <[hidden email]> wrote: > On Mon, Jul 16, 2012 at 12:15 PM, János Uray <[hidden email]> wrote: >> I have a simple question. >> Can I use C++11 in LibreOffice development? Or at least some parts of C++11? > > The short answer is, no, not yet. We still need to support compilers > that don't support C++11 fully. I think that, eventually we'll be > able to start using C++11 features in our code base, but it'll take a > while before we get to that point. > > I hope this answers your question. > > Kohei LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
In reply to this post by János Uray
On Mon, Jul 16, 2012 at 12:35 PM, János Uray <[hidden email]> wrote:
> Thank you. > It's not a happy answer though. > I hoped that there are at least some little features in the intersection of > the C++11-knowledge of the supported compilers. The most problematic ones are the gcc compiler used on Mac OS X (gcc 4.0?), and MSVC 2008 compilers. If you (or someone else equally interested) are willing to research those two compilers to see what subset of C++11 features they support (if at all), then I don't see why we shouldn't use those features. For the record, I'm also eager to start using C++11 too, but since the standard being so new that, we need to be realistic and allow some time for all our major platforms to support it. Kohei _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Bjoern Michaelsen |
|
|
On Mon, Jul 16, 2012 at 12:53:24PM -0400, Kohei Yoshida wrote:
> On Mon, Jul 16, 2012 at 12:35 PM, János Uray <[hidden email]> wrote: > > Thank you. > > It's not a happy answer though. > > I hoped that there are at least some little features in the intersection of > > the C++11-knowledge of the supported compilers. > > The most problematic ones are the gcc compiler used on Mac OS X (gcc > 4.0?), and MSVC 2008 compilers. gcc started implementing C++11 with 4.3, MSVC started relevant partial support with 10.0/11.0. > If you (or someone else equally > interested) are willing to research those two compilers to see what > subset of C++11 features they support (if at all), then I don't see > why we shouldn't use those features. Not even a subset, I fear. Also note the "gcc C++11 ABI is not guaranteed to be C++03 compatible" discussion in the ESC minutes: there are more traps lurking here. Best, Bjoern _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
János Uray |
|
|
In reply to this post by Kohei Yoshida
Thank you again.
Unfortunately gcc starts to support C++11 only in 4.3, and MSVC has very little C++11 in 2008 (2010 has much more). Uray M. János On Mon, Jul 16, 2012 at 6:53 PM, Kohei Yoshida <[hidden email]> wrote:
_______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Stephan Bergmann-2 |
|
|
In reply to this post by Kohei Yoshida
On 07/16/2012 06:53 PM, Kohei Yoshida wrote:
> The most problematic ones are the gcc compiler used on Mac OS X (gcc > 4.0?), and MSVC 2008 compilers. If you (or someone else equally > interested) are willing to research those two compilers to see what > subset of C++11 features they support (if at all), then I don't see > why we shouldn't use those features. <http://wiki.apache.org/stdcxx/C++0xCompilerSupport> is a useful source. Stephan _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Lubos Lunak |
|
|
On Tuesday 17 of July 2012, Stephan Bergmann wrote:
> On 07/16/2012 06:53 PM, Kohei Yoshida wrote: > > The most problematic ones are the gcc compiler used on Mac OS X (gcc > > 4.0?), and MSVC 2008 compilers. If you (or someone else equally > > interested) are willing to research those two compilers to see what > > subset of C++11 features they support (if at all), then I don't see > > why we shouldn't use those features. > > <http://wiki.apache.org/stdcxx/C++0xCompilerSupport> is a useful source. Also http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx . Summary: The first version to have something interesting (lambda expressions, rvalue references, static_assert) is MSVC2010. Range-based for loop is MSVC2012, which has only RC out by now, and requires Window7+. Some stuff, such as variadic templates or delegating ctors, are not there at all. So, as long as we require to build LO with MSVC, we can revisit the question of hard-depending on C++11 in, uhm, let's be optimistic and say 3 years. IOW, we can probably get there faster by ditching backwards ABI compatibility with LO4 and switching to a different compiler for Windows. -- Lubos Lunak [hidden email] _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
On 07/17/2012 05:11 AM, Lubos Lunak wrote:
> So, as long as we require to build LO with MSVC, we can revisit the question > of hard-depending on C++11 in, uhm, let's be optimistic and say 3 years. IOW, > we can probably get there faster by ditching backwards ABI compatibility with > LO4 and switching to a different compiler for Windows. What I'm curious is how the binaries generated from different compilers compare on Windows. If their performances are more or less comparable, then I could care less whether we stick with MSVC or gcc (or clang if it's available on Windows). But if MSVC still produces more optimized binaries, then I would be reluctant to support switching to a different compiler (though my voice is only one head count, easily overruled by the majority votes when it comes down to it). Kohei -- Kohei Yoshida, LibreOffice hacker, Calc _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Philipp Riemer |
|
|
2012/7/17 Kohei Yoshida <[hidden email]>:
> On 07/17/2012 05:11 AM, Lubos Lunak wrote: >> >> So, as long as we require to build LO with MSVC, we can revisit the >> question >> of hard-depending on C++11 in, uhm, let's be optimistic and say 3 years. >> IOW, >> we can probably get there faster by ditching backwards ABI compatibility >> with >> LO4 and switching to a different compiler for Windows. > > > What I'm curious is how the binaries generated from different compilers > compare on Windows. If their performances are more or less comparable, then > I could care less whether we stick with MSVC or gcc (or clang if it's > available on Windows). But if MSVC still produces more optimized binaries, > then I would be reluctant to support switching to a different compiler > (though my voice is only one head count, easily overruled by the majority > votes when it comes down to it). > > Kohei > Clang is not directly available as a binary for windows, however they have a small tutorial how to build it from source at <http://clang.llvm.org/get_started.html#buildWindows>. _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Stahl-2 |
|
|
In reply to this post by Kohei Yoshida
On 17/07/12 21:21, Kohei Yoshida wrote:
> On 07/17/2012 05:11 AM, Lubos Lunak wrote: >> So, as long as we require to build LO with MSVC, we can revisit the question >> of hard-depending on C++11 in, uhm, let's be optimistic and say 3 years. IOW, >> we can probably get there faster by ditching backwards ABI compatibility with >> LO4 and switching to a different compiler for Windows. > > What I'm curious is how the binaries generated from different compilers > compare on Windows. If their performances are more or less comparable, > then I could care less whether we stick with MSVC or gcc (or clang if > it's available on Windows). But if MSVC still produces more optimized > binaries, then I would be reluctant to support switching to a different > compiler (though my voice is only one head count, easily overruled by > the majority votes when it comes down to it). i don't believe an office suite will benefit all that much from sophisticated compiler optimizations; most of the problems we have are due to stupid algorithms/data structures that don't scale. the _real_ question is, how can you debug problems that happen only on Windows, what does MinGW offer there, does it actually work or does gdb crash all the time like it did 5 years ago on Linux. also, how do you run unit tests when cross compiling? but if you really care here's some recent windows benchmarks that look reasonably well done at first glance, and GCC looks very competitive with MSVC, though Intel is faster still: http://www.willus.com/ccomp_benchmark2.shtml _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
On Thu, Jul 19, 2012 at 7:45 AM, Michael Stahl <[hidden email]> wrote:
> i don't believe an office suite will benefit all that much from > sophisticated compiler optimizations; It's certainly your opinion. But I tend think that, any binary generated from a compiler could use the benefit of compiler optimization. I find it hard to believe that somehow an "office suite" category is an exception. But maybe it's just me. Kohei _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Bjoern Michaelsen |
|
|
On Thu, Jul 19, 2012 at 08:59:34AM -0400, Kohei Yoshida wrote:
> On Thu, Jul 19, 2012 at 7:45 AM, Michael Stahl <[hidden email]> wrote: > > > i don't believe an office suite will benefit all that much from > > sophisticated compiler optimizations; > > It's certainly your opinion. But I tend think that, any binary > generated from a compiler could use the benefit of compiler > optimization. I find it hard to believe that somehow an "office suite" > category is an exception. But maybe it's just me. I think Michael was suggesting that our prouct is IO-bound and not that CPU-bound anyway. While that isnt completely the case for the area you work on it is a valid assumption for the product as a whole. Best, Bjoern _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
On 07/19/2012 09:49 AM, Bjoern Michaelsen wrote:
> On Thu, Jul 19, 2012 at 08:59:34AM -0400, Kohei Yoshida wrote: >> On Thu, Jul 19, 2012 at 7:45 AM, Michael Stahl <[hidden email]> wrote: >> >>> i don't believe an office suite will benefit all that much from >>> sophisticated compiler optimizations; >> >> It's certainly your opinion. But I tend think that, any binary >> generated from a compiler could use the benefit of compiler >> optimization. I find it hard to believe that somehow an "office suite" >> category is an exception. But maybe it's just me. > > I think Michael was suggesting that our prouct is IO-bound and not that > CPU-bound anyway. While that isnt completely the case for the area you work on > it is a valid assumption for the product as a whole. Understood. What I was trying to say was that this is not a "either-or" problem. Since compiler optimization is free (free in the sense that all we have to do is turn it on) and can be done in parallel with our effort to improve algorithms, there is no reason why we should focus on one and ignore the other. -- Kohei Yoshida, LibreOffice hacker, Calc _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Stahl-2 |
|
|
In reply to this post by Kohei Yoshida
On 19/07/12 14:59, Kohei Yoshida wrote:
> On Thu, Jul 19, 2012 at 7:45 AM, Michael Stahl <[hidden email]> wrote: > >> i don't believe an office suite will benefit all that much from >> sophisticated compiler optimizations; > > It's certainly your opinion. But I tend think that, any binary > generated from a compiler could use the benefit of compiler > optimization. I find it hard to believe that somehow an "office suite" > category is an exception. But maybe it's just me. sorry for being unclear, i'm not saying that an office suite doesn't benefit from _any_ compiler optimization (that would be nonsense), i'm saying it doesn't benefit from the "sophisticated" optimizations that vendor compilers like SunStudio or Intel do that speed up your BLAS stuff with gigabytes of floating point arrays by X times because office suites don't contain gigabytes of floating point arrays. _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Meeks-2 |
|
|
On Thu, 2012-07-19 at 16:04 +0200, Michael Stahl wrote: > i'm saying it doesn't benefit from the "sophisticated" optimizations that > vendor compilers like SunStudio or Intel do that speed up your BLAS > stuff with gigabytes of floating point arrays by X times because office > suites don't contain gigabytes of floating point arrays. So - Kohei has been working for years to turn Calc spreadsheets into gigabyte arrays of floating point numbers - precisely to take advantage of this sort of optimisation :-) Having said that, I totally agree, our problems are 95% algorithmic, and fiddling with compiler optimiser settings is the last refuge of the desperate man ;-) The thing that concerns me about gcc vs. MSVC++ is not the speed of the generated code, but it's size (which impacts startup performance, I/O load, memory use etc.). If you checkout the tables you linked the binary size column is quite stark: http://www.willus.com/ccomp_benchmark2.shtml?p18+s12 http://www.willus.com/ccomp_benchmark2.shtml?p14+s12 in several cases a 2x growth. So - clearly this would need benchmarking various ways to see what the story is there with -Os etc. IMHO it's well worth looking at a gcc cross-compiled solution for Windows though; if only to use really fast, fully repeatable, Free Software tooling; though it'd be nice to use an enterprise / maintained cross-compiler - where is cygnus when you need them :-) All the best, Michael. -- [hidden email] <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
|
+1 on considering startup performance/memory usage. It looks like
with Office 13 Microsoft has done more work in getting Office to startup faster (no benchmarks, just anecdotal experience). +1 on the ability to do some kind of cross-compiling solution in parallel. +1 on gigabyte spreadsheets of floating point numbers. The competition kind of sucks in this regard... :-) On Thu, Jul 19, 2012 at 10:26 AM, Michael Meeks <[hidden email]> wrote: > > On Thu, 2012-07-19 at 16:04 +0200, Michael Stahl wrote: >> i'm saying it doesn't benefit from the "sophisticated" optimizations that >> vendor compilers like SunStudio or Intel do that speed up your BLAS >> stuff with gigabytes of floating point arrays by X times because office >> suites don't contain gigabytes of floating point arrays. > > So - Kohei has been working for years to turn Calc spreadsheets into > gigabyte arrays of floating point numbers - precisely to take advantage > of this sort of optimisation :-) > > Having said that, I totally agree, our problems are 95% algorithmic, > and fiddling with compiler optimiser settings is the last refuge of the > desperate man ;-) > > The thing that concerns me about gcc vs. MSVC++ is not the speed of the > generated code, but it's size (which impacts startup performance, I/O > load, memory use etc.). If you checkout the tables you linked the binary > size column is quite stark: > > http://www.willus.com/ccomp_benchmark2.shtml?p18+s12 > http://www.willus.com/ccomp_benchmark2.shtml?p14+s12 > > in several cases a 2x growth. So - clearly this would need benchmarking > various ways to see what the story is there with -Os etc. > > IMHO it's well worth looking at a gcc cross-compiled solution for > Windows though; if only to use really fast, fully repeatable, Free > Software tooling; though it'd be nice to use an enterprise / maintained > cross-compiler - where is cygnus when you need them :-) > > All the best, > > Michael. > > -- > [hidden email] <><, Pseudo Engineer, itinerant idiot > > _______________________________________________ > LibreOffice mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/libreoffice LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Meeks-2 |
|
|
Hi there,
On Thu, 2012-07-19 at 11:21 -0500, Yi Ding wrote: > +1 ... > +1 ... > +1 ... Thanks for your encouragement, but this is a developers list :-) which of these do you want to work on ? There is low-hanging fruit everywhere for developers to focus on - which would you like to look into ? Startup performance for example: reducing the configmgr thrash by tweaking that code to allow us to split out settings that are not commonly needed eg. the labels data would give a measureable boost to startup. It requires only a hacker - is it you ? :-) All the best, Michael. -- [hidden email] <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
|
Fair point. :-) Let me see if I can get a build working on Windows
this weekend. I see on the wiki that building with VS 2010 is not yet supported: http://wiki.documentfoundation.org/Development/Windows_Build_Dependencies Is this information still current? On Fri, Jul 20, 2012 at 3:43 AM, Michael Meeks <[hidden email]> wrote: > Hi there, > > On Thu, 2012-07-19 at 11:21 -0500, Yi Ding wrote: >> +1 ... >> +1 ... >> +1 ... > > Thanks for your encouragement, but this is a developers list :-) which > of these do you want to work on ? There is low-hanging fruit everywhere > for developers to focus on - which would you like to look into ? Startup > performance for example: reducing the configmgr thrash by tweaking that > code to allow us to split out settings that are not commonly needed eg. > the labels data would give a measureable boost to startup. It requires > only a hacker - is it you ? :-) > > All the best, > > Michael. > > -- > [hidden email] <><, Pseudo Engineer, itinerant idiot > LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Stahl-2 |
|
|
On 20/07/12 16:31, Yi Ding wrote:
> Fair point. :-) Let me see if I can get a build working on Windows > this weekend. I see on the wiki that building with VS 2010 is not yet > supported: > > http://wiki.documentfoundation.org/Development/Windows_Build_Dependencies > > Is this information still current? yes it is; there is actually a patch for MSVC2010 attached here: https://bugs.freedesktop.org/show_bug.cgi?id=30655 but it is quite outdated and apparently even when it was written there was some CLR thing that didn't work. if you know the MSVC toolchain well then you could try to get that to work, and it would be very useful, but you will probably have to spend some time on it; currently only MSVC 2008 is known to work. _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
|
On Fri, Jul 20, 2012 at 9:37 AM, Michael Stahl <[hidden email]> wrote:
> On 20/07/12 16:31, Yi Ding wrote: >> Fair point. :-) Let me see if I can get a build working on Windows >> this weekend. I see on the wiki that building with VS 2010 is not yet >> supported: >> >> http://wiki.documentfoundation.org/Development/Windows_Build_Dependencies >> >> Is this information still current? > > yes it is; there is actually a patch for MSVC2010 attached here: > https://bugs.freedesktop.org/show_bug.cgi?id=30655 > > but it is quite outdated and apparently even when it was written there > was some CLR thing that didn't work. > > if you know the MSVC toolchain well then you could try to get that to > work, and it would be very useful, but you will probably have to spend > some time on it; currently only MSVC 2008 is known to work. Great, thanks. I'll give it a try, although after reading the Building on Windows thread I might end up giving up and just running the build on a VM. _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
| Powered by Nabble | Edit this page |