On Wednesday 04 March 2015 02:40:55 Aleix Pol wrote:
> On Tue, Mar 3, 2015 at 2:55 PM, Sergio Martins <[email protected]> 
wrote:
> > Hi,
> > 
> > 
> > 
> > So that you don't waste time pulling your hair out: plugin loading is
> > broken with gcc 4.9.2
> > 
> > 
> > 
> > There's some clash between global static QFactoryLoader instances.
> > 
> > Reproduced on Archlinux (and on Fedora by jpnurmi).
> 
> I also hit this bug on ArchLinux. I solved it by downgrading from:
> 4.9.2-3 to 4.9.2-2 on these packages: lib32-gcc-libs gcc-libs gcc.

Someone who can reproduce the bug, please file it with GCC.

The test case seems quite simple (two .cpp files with two Q_GLOBAL_STATIC with 
the same name). Just remember to expand the Q_GLOBAL_STATIC macro before 
submitting.

if that doesn't work, you'll need to reduce the testcase. Again, it should be 
quite evident which two .cpp files need to be reduced. In case the problem 
isn't triggered by just those two .cpp files, you can use the attached script, 
which I used to test an LTO issue with QtGui and GCC 5. The file listing should 
be up-to-date for Qt 5.4.

Before you run it, you'll need to update the main linker command-line and the 
error detection logic. I suggest that you run the linker normally, just 
ensuring it ran successfully, then use nm to get the anonymous namespace 
symbols. If the count is wrong (not 8), then mark as error.

You'll probably need to remove the --no-undefined option to allow the linker to 
succeed without the full list of files.

Once you have the minimum set of sources that triggers the error, reduce the 
.cpp to the minimum.

Then reduce the compiler and linker flags.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: test.pl
Description: Perl program

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to