Bug 114435 - [Qt][Mac] Linking fails with Qt 5.1
Summary: [Qt][Mac] Linking fails with Qt 5.1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andras Becsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 05:23 PDT by Andras Becsi
Modified: 2013-09-16 12:14 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.52 KB, patch)
2013-04-11 05:24 PDT, Andras Becsi
no flags Details | Formatted Diff | Diff
Patch (1.43 KB, patch)
2013-04-11 07:24 PDT, Andras Becsi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Becsi 2013-04-11 05:23:56 PDT
[Qt][Mac] Linking fails with Qt 5.1
Comment 1 Andras Becsi 2013-04-11 05:24:58 PDT
Created attachment 197578 [details]
Patch
Comment 2 Simon Hausmann 2013-04-11 06:02:07 PDT
Comment on attachment 197578 [details]
Patch

r=me but I'd prefer if the QMAKE_LFLAGS/CXXFLAGS setting could be replaced with CONFIG -= c++11 if it works. (mkspecs/features/c++11.prf adds those in the first place, and that should be processed after this .pri file)
Comment 3 Tor Arne Vestbø 2013-04-11 06:07:15 PDT
Comment on attachment 197578 [details]
Patch

I agree with Simon, try CONFIG -= c++11 first.
Comment 4 Andras Becsi 2013-04-11 06:32:33 PDT
Using CONFIG -= c++11 does not fix the issue for me. The build still fails because the linking command line still includes -stdlib=libc++.
Comment 5 Andras Becsi 2013-04-11 06:46:10 PDT
In ANGLE.pri CONFIG does not even contain c++11 yet, and because QT_CONFIG does it is still added to CONFIG in mkspecs/features/qt_common.prf, which apparently happens after processing this pri file.
Comment 6 Tor Arne Vestbø 2013-04-11 06:48:31 PDT
(In reply to comment #5)
> In ANGLE.pri CONFIG does not even contain c++11 yet, and because QT_CONFIG does it is still added to CONFIG in mkspecs/features/qt_common.prf, which apparently happens after processing this pri file.

Not sure why c++11 is handled that way, but QT_CONFIG -= c++11 should work around it.
Comment 7 Andras Becsi 2013-04-11 07:05:29 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > In ANGLE.pri CONFIG does not even contain c++11 yet, and because QT_CONFIG does it is still added to CONFIG in mkspecs/features/qt_common.prf, which apparently happens after processing this pri file.
> 
> Not sure why c++11 is handled that way, but QT_CONFIG -= c++11 should work around it.

Ok, I though changing QT_CONFIG would not be an option.
Comment 8 Tor Arne Vestbø 2013-04-11 07:06:31 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > In ANGLE.pri CONFIG does not even contain c++11 yet, and because QT_CONFIG does it is still added to CONFIG in mkspecs/features/qt_common.prf, which apparently happens after processing this pri file.
> > 
> > Not sure why c++11 is handled that way, but QT_CONFIG -= c++11 should work around it.
> 
> Ok, I though changing QT_CONFIG would not be an option.

It's a bit hackish, but less so than changing the QMAKE_LFLAGS_CXX11
Comment 9 Andras Becsi 2013-04-11 07:24:49 PDT
Created attachment 197586 [details]
Patch
Comment 10 Andras Becsi 2013-04-11 08:08:28 PDT
Comment on attachment 197586 [details]
Patch

Clearing flags on attachment: 197586

Committed r148204: <http://trac.webkit.org/changeset/148204>
Comment 11 Andras Becsi 2013-04-11 08:08:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Allan Sandfeld Jensen 2013-09-16 09:49:34 PDT
How is this supposed to work. If you build ANGLE with libstdc++ includes, the symbols are just going to be missing in the final binary. 

This is the result of merging this now:
http://testresults.qt-project.org/ci/QtWebKit_dev_Integration/build_00098/macx-clang_developer-build_OSX_10.8/log.txt.gz

ANGLE referencing libstdc++ specific stuff, which is never linked in.
Comment 13 Andras Becsi 2013-09-16 12:02:43 PDT
(In reply to comment #12)
> How is this supposed to work. If you build ANGLE with libstdc++ includes, the symbols are just going to be missing in the final binary. 
> 
> This is the result of merging this now:
> http://testresults.qt-project.org/ci/QtWebKit_dev_Integration/build_00098/macx-clang_developer-build_OSX_10.8/log.txt.gz
> 
> ANGLE referencing libstdc++ specific stuff, which is never linked in.

ANGLE should not be build with c++11 support, and it wasn't when this got committed, since then the configuration in Qt might have changed, so this might not have an effect any more.
Comment 14 Allan Sandfeld Jensen 2013-09-16 12:14:00 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > How is this supposed to work. If you build ANGLE with libstdc++ includes, the symbols are just going to be missing in the final binary. 
> > 
> > This is the result of merging this now:
> > http://testresults.qt-project.org/ci/QtWebKit_dev_Integration/build_00098/macx-clang_developer-build_OSX_10.8/log.txt.gz
> > 
> > ANGLE referencing libstdc++ specific stuff, which is never linked in.
> 
> ANGLE should not be build with c++11 support, and it wasn't when this got committed, since then the configuration in Qt might have changed, so this might not have an effect any more.

It isn't but that means it will by default be build with libstdc++, where the final QtWebKit module is linked with libc++. This means we end up with the wrong symbols.