4.3.x linux packages and collada support (also affects master with gcc 4.6)

Jan-Marek Glogowski glogow at fbihome.de
Mon Sep 29 04:36:06 PDT 2014


Just to document my findings:

Am 29.09.2014 10:41, schrieb Jan-Marek Glogowski:
> 
> 1. It doesn't find unordered_map for whatever reason, but calls g++ with
> -std=gnu++0x

GLTF/GLTFProfile.h uses std::unordered_map

if we define

namespace compat = std::tr;

and use it, this can be resolved.

> 2. It tries to use the std::tr1 namespace

As allready mentioned in the other branch of the thread, the code uses a
lot of std::shared_ptr in headers.

A few places in the opencollada headers include <memory>, which gets us
std::shared_ptr, even without using it.

In the tr1 case we're also including <tr1/memory>, which results in the
ambiguity and no easy namespace mapping will resolve it.

Then there is COLLADABaseUtils/include/COLLADABUhash_map.h, which - I
guess - also gets me the std::shared_ptr version.

At least dropping <memory.h> isn't sufficient to get rid of the ambiguity.

And there seems to be no easy way, like the current macros, to decide to
using tr1, as it was mentioned in #gcc, that "gcc 4.6 doesn't set the
__cplusplus macro proprely, it's always set to 1 for c++98 and c++11"

Should we just drop all the TR1 support from collada2gltf at least for
LO 4.4?

Jan-Marek


More information about the LibreOffice mailing list