#50440 closed defect (fixed)
qt5-qtbase: libc++ under Lion
Reported by: | ctreleaven (Craig Treleaven) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | Lord-Kamina (Gregorio Litenstein) | |
Port: | qt5-qtbase |
Description
I'm trying to install qt5-qtwebkit on Lion using XCode 4.6.3.
First time around, I got all the pre-requisites installed but qt5-qtwebkit errored out insisting that libc++ was required. It pointed to and I followed the direction to build EVERYTHING with libc++:
https://trac.macports.org/wiki/LibcxxOnOlderSystems
This build errored out at qt5-qtbase with numerous errors like:
:info:build In file included from ../../corelib/tools/qstring_mac.mm:34: :info:build ../../corelib/tools/qstring.h:739:55: error: no type named 'u16string' in namespace 'std' :info:build static inline QString fromStdU16String(const std::u16string &s); :info:build ~~~~~^
I believe this means that there is a problem with the c++ library?
Note that just prior to the failure, the Configuration Report says:
:info:configure Build options: :info:configure Configuration .......... accessibility audio-backend avx avx2 c++11 compile_examples concurrent corewlan cups dbus dbus-linked fontconfig full-config getaddrinfo getifaddrs glib iconv icu ipv6ifname large-config largefile medium-config minimal-config nis opengl openssl-linked png qpa qpa qt_framework reduce_exports release shared small-config sse2 sse3 sse4_1 sse4_2 ssse3 system-freetype system-harfbuzz system-jpeg system-png system-zlib xrender :info:configure Build parts ............ libs tools :info:configure Mode ................... release :info:configure Using sanitizer(s)...... none :info:configure Using C++11 ............ yes ...
I found a similar-looking report on the web but don't see how to implement the solution (second last posting):
https://forum.qt.io/topic/56064/solved-problem-with-qt-5-5/11
Will attach main log.
Attachments (1)
Change History (11)
Changed 9 years ago by ctreleaven (Craig Treleaven)
Attachment: | qt5-qtbase build fail 20116Jan25 main.log added |
---|
comment:1 Changed 9 years ago by Lord-Kamina (Gregorio Litenstein)
comment:3 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
The old version of the patch file added the -stdlib
flag to the QMAKE_CXXFLAGS
and QMAKE_LFLAGS
variables.
There did not seem to be a need to add it to QMAKE_CXXFLAGS_CXX11
and QMAKE_LFLAGS_CXX11
as well.
Apparently, part of qt5-qtbase uses QMAKE_CXXFLAGS_CXX11
and QMAKE_LFLAGS_CXX11
but not QMAKE_CXXFLAGS
and QMAKE_LFLAGS
.
-mmacosx-version-min=10.7
then causes the compiler to use libstdc++, which is the source of the error.
r145151 fixed the problem on my system.
Is the problem fixed on Lion as well?
comment:4 Changed 9 years ago by Lord-Kamina (Gregorio Litenstein)
Fixed for me as well, I believe.
Edit: Yes, build finished successfully.
comment:5 Changed 9 years ago by Lord-Kamina (Gregorio Litenstein)
However... it appears the same problem is affecting the rest of the qt5 ports; after successfully installing qt5-base, I got the same error on qt5-qtconnectivity.
comment:6 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Status: | new → assigned |
---|
Hopefully, r145157 fixes the new problem.
comment:7 Changed 9 years ago by ctreleaven (Craig Treleaven)
I haven't updated to the last revision but I'm having a different result. qt5-qtbase built successfully. I've kicked off an install of qt5-qtwebkit and so far qt5-qtxmlpatterns, qt5-qtdeclarative, qt5-qtquickcontrols, and qt5-qtlocation have installed successfully. qt5-qtmultimedia is presently building.
I'll update tomorrow.
comment:9 Changed 9 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:10 Changed 9 years ago by ctreleaven (Craig Treleaven)
I confirm that after r145157, qt5-qtwebkit (eventually) built successfully on my Lion machine under XCode 4.6.3. Thanks for the fix and for all the work on Qt5. Outstanding!
I am trying to build qt5 on El Capitan (with latest XCode) and libc++ but targetting 10.7 and seeing an identical error. Also found that thread and attempted the solution via modifying the portfile and configure.env but nothing changed.