LibreOffice is free of STLport

classic Classic list List threaded Threaded
7 messages Options
Fridrich Strba-2 Fridrich Strba-2
Reply | Threaded
Open this post in threaded view
|

LibreOffice is free of STLport

Hello, good people,

First of all, apologies to those that had to fix the breakages in the
build due to me being in FOSDEM and not being able to push patches as
fast as would be necessary while removing the old good friend from our
source tree.

The situation is now following:

LibreOffice does not use STLport anymore and uses the toolchain's STL
implementation. We build the stlport module for the platforms where it
was used before and we deliver it into solver and package it for the
compatibility reasons, but we don't link with it at all.

We removed and worked around any remaining stlportims from the code. The
templates from stlport's functional header that are not part of the C++
standard are to be found in o3tl/compat_functional.hxx header and are
placed in o3tl:: namespace. That header also includes o3tl::iota that is
strictly not belonging there, but we did not want to add a
compat_functional.hxx for one simple template only.

The hash_map, hash_multimap, hash_set and hash_multiset are remplaced by
boost::unordered_map, boost::unordered_multimap, boost::unordered_set
and boost::unordered_multiset. As well, the std::hash is replaced by
boost::hash. So, if your code contains any of them, please adapt it.
Note that the data_type member from the hash_* containers should be
replaced by mapped_type member from the boost types.

In case you find breakages in the hash containers, check whether the
code is not trying to delete an entry on the one-beyond-last position.
This was somehow handled graciously in stlport, but it crashes in the
boost containers. And for sure it is wrong thing to try to do.

Good people, I am almost sure I broke your exotic platforms, so I would
beg you to help me to debug them and fix them. I am available on IRC
when I am not sleeping, so just ping "Fridrich" or "TrainedMonkey".

Don't hesitate to ask questions.

Cheers

Fridrich


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Bjoern Michaelsen Bjoern Michaelsen
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport

Hi Fridrich,

On Thu, 10 Feb 2011 08:44:25 +0100
Fridrich Strba <[hidden email]>
wrote:

> LibreOffice does not use STLport anymore and uses the toolchain's STL
> implementation. We build the stlport module for the platforms where it
> was used before and we deliver it into solver and package it for the
> compatibility reasons, but we don't link with it at all.

... and there was much rejoicing!

Best Regards,

Bjoern


--
https://launchpad.net/~bjoern-michaelsen


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Meeks Michael Meeks
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport

In reply to this post by Fridrich Strba-2
Hi Fridrich,

On Thu, 2011-02-10 at 08:44 +0100, Fridrich Strba wrote:
> The hash_map, hash_multimap, hash_set and hash_multiset are remplaced by
> boost::unordered_map, boost::unordered_multimap, boost::unordered_set
> and boost::unordered_multiset. As well, the std::hash is replaced by
> boost::hash. So, if your code contains any of them, please adapt it.
> Note that the data_type member from the hash_* containers should be
> replaced by mapped_type member from the boost types.

        Great; now we just need to run a few times under memprof to see if we
have accidentally introduced some unexpected staggering memory wasteage
such as stlport was at least known to produce in some corner cases, and
(no doubt) boost could do in other ways.

        Having said that - the stlport implementation of eg. hash map iterators
was incredibly sad: re-hashing the majority of entries in the map as you
iterated [ amazing but true ], hopefully boost is less uber-lame and
(thus) faster at least to iterate; I'm just a tad concerned about its
memory usage [ pwrt. cross platform differences there ].

        Anyhow - overall a positive move no doubt.

        Thanks,

                Michael.

--
 [hidden email]  <><, Pseudo Engineer, itinerant idiot


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Caolán McNamara Caolán McNamara
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport

On Thu, 2011-02-10 at 09:28 +0000, Michael Meeks wrote:
> Anyhow - overall a positive move no doubt.

The biggest win, for me anyway, is that the beginning-to-become unwieldy
"magic header to mix stlport c++ and system c++ libraries" hack goes
away, so native c++ libraries can be linked to the ix86 Linux without
the previous monstrous effort.

C.

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
vuhung vuhung
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport

In reply to this post by Fridrich Strba-2
On Thu, Feb 10, 2011 at 2:44 PM, Fridrich Strba
<[hidden email]> wrote:
> LibreOffice does not use STLport anymore and uses the toolchain's STL
> implementation
The reason for dropping stlport is its license, isn't it?

http://www.stlport.org/product.html
Free Commercial Use:
There are absolutely no restrictions on STLport use in commercial
projects, and no royalties are involved. There is no GPL. Please read
your free license for details.


--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype: vuhung16plus
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Meeks Michael Meeks
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport


On Thu, 2011-02-10 at 22:26 +0700, Nguyen Vu Hung wrote:
> The reason for dropping stlport is its license, isn't it?

        Nope; stlport is Free Software albeit not copy-left. We'll continue to
distribute it for a bit, as old extensions may require it.

        HTH,

                Michael.

--
 [hidden email]  <><, Pseudo Engineer, itinerant idiot


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Caolán McNamara Caolán McNamara
Reply | Threaded
Open this post in threaded view
|

Re: LibreOffice is free of STLport

In reply to this post by Caolán McNamara
On Thu, 2011-02-10 at 10:15 +0000, Caolán McNamara wrote:
> On Thu, 2011-02-10 at 09:28 +0000, Michael Meeks wrote:
> > Anyhow - overall a positive move no doubt.
>
> The biggest win, for me anyway, is that the beginning-to-become unwieldy
> "magic header to mix stlport c++ and system c++ libraries" hack goes
> away

*slaps head*. And of course this also means that (for gcc > 4.5.X) that
the strict-aliasing unsafe stlport headers are gone, so Linux x86 gets
the same strict-aliasing extra optimization that x86_64 gets.

C.

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice