Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt5-mac-devel build fails on OS X 10.6.8 #1

Open
maximumspatium opened this issue Sep 16, 2015 · 38 comments
Open

qt5-mac-devel build fails on OS X 10.6.8 #1

maximumspatium opened this issue Sep 16, 2015 · 38 comments

Comments

@maximumspatium
Copy link

Hello and thank you for working on the additional QT5 ports!

I've just tried to build the qt5-mac-devel port using your portfiles. Unfortunately, it fails on the patching step. It looks like an attempt to apply QT 5.4.2 to 5.3.2 sources. It doesn't work for all files because the sources diverge too much.

The following patches break the build:
https://github.com/RJVB/macstrop/blob/master/aqua/qt5-mac-devel/files/patch-qFatal-no-abort.diff
https://github.com/RJVB/macstrop/blob/master/aqua/qt5-mac-devel/files/patch-improve-fontweight-support5.diff

The first one contains a tiny difference that I just fixed manually. But the second one is much bigger so I don't know how to fix it.

Would you kindly help me to fix that issue? It looks like you've found a possibility to build Qt5 in 10.6.8 without XCode. That's exactly what I'm looking for. I really need QT5 in 10.6.8 because I currently cannot upgrade my OS because I heavily depend on an older software package that isn't available in >= 10.7.

Thank you in advance!
Best regards
Max

@RJVB
Copy link
Owner

RJVB commented Sep 16, 2015

On Tuesday September 15 2015 17:44:27 maximumspatium wrote:

Hello Max,

Hello and thank you for working on the additional QT5 ports!

Thank you! It's good to know that I'm not doing this only for myself!

I've just tried to build the qt5-mac-devel port using your portfiles. Unfortunately, it fails on the patching step. It looks like an attempt to apply QT 5.4.2 to 5.3.2 sources. It doesn't work for all files because the sources diverge too much.
...
Would you kindly help me to fix that issue?

Can you try the latest commit? You're right that I don't always test new patches with the legacy Qt version, my bad. I've done so now, but only up to the patching step. I haven't checked whether the font weight improvement patch introduces regressions (compile-time or otherwise), ditto for the qFatal patch.
So please check back when this turns out to be the case!

It looks like you've found a possibility to build Qt5 in 10.6.8 without XCode.

Yes and no: it doesn't use the compilers from Xcode, but I reckon you still need to have Xcode installed.

That's exactly what I'm looking for. I really need QT5 in 10.6.8 because I currently cannot upgrade my OS because I heavily depend on an older software package that isn't available in >= 10.7.

Note that if you just want to have a recent Qt version regardless of how (or maybe preferably NOT through MacPorts), there is also a trick. Qt 5.4 doesn't build on OS X 10.6, but that's all: it will work just fine and all software I tried built just fine with it.
So if you have the possibility to make a separate (external) boot disk or boot partition and upgrade that to a more recent OS, you can use Qt's official installer to install to wherever you want Qt to live, and then copy that directory to your 10.6 boot disk.

Have you considered setting up a 10.6 ("Server") VM in which you can then run that older software? I've found it works fine even with my PPC versions of Adobe Illustrator and InDesign ...

Cheers,
R.

@maximumspatium
Copy link
Author

Hello René,

thank you very much for looking into the issue. I've just tried the latest commit. Unfortunately, it still doesn't work. Here a small excerpt from the build log:

:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2" && /usr/bin/patch -p0'
:debug:patch Executing command line: cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2" && /usr/bin/patch -p0 < '/opt/local/site-ports/aqua/qt5-mac-devel/files/qt532/patch-improve-fontweight-support8.diff'
:info:patch patching file qtbase/src/gui/text/qfont.h
:info:patch Hunk #1 succeeded at 94 (offset 7 lines).
:info:patch patching file qtbase/src/gui/text/qfontdatabase.cpp
:info:patch patching file qtbase/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
:info:patch patching file qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
:info:patch Reversed (or previously applied) patch detected! Assume -R? [n]
:info:patch Apply anyway? [n]
:info:patch Skipping patch.
:info:patch 5 out of 5 hunks ignored -- saving rejects to file qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm.rej
:info:patch patching file qtbase/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
:info:patch patching file qtbase/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
:info:patch Hunk #1 succeeded at 446 (offset 4 lines).
:info:patch patching file qtbase/src/widgets/dialogs/qfontdialog.cpp
:info:patch patching file qtbase/src/widgets/dialogs/qfontdialog_p.h
:info:patch Command failed: cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2" && /usr/bin/patch -p0 < '/opt/local/site-ports/aqua/qt5-mac-devel/files/qt532/patch-improve-fontweight-support8.diff'
:info:patch Exit code: 1
:error:patch org.macports.patch for port qt5-mac-devel returned: command execution failed

Yes and no: it doesn't use the compilers from Xcode, but I reckon you still need to have Xcode installed.

For what purpose XCode is required then?

Note that if you just want to have a recent Qt version regardless of how (or maybe preferably NOT through MacPorts), there is also a trick. Qt 5.4 doesn't build on OS X 10.6, but that's all: it will work just fine and all software I tried built just fine with it.

If Qt5.4 does work fine on 10.6, it won't use any specific >= 10.7 API. Therefore, it should be possible to get it built under 10.6 too, right?

So if you have the possibility to make a separate (external) boot disk or boot partition and upgrade that to a more recent OS, you can use Qt's official installer to install to wherever you want Qt to live, and then copy that directory to your 10.6 boot disk.

This is something I could give a try. Does Qt install any symlinks or additional tools to /usr/lib/bin, /usr/bin, /usr/local etc? I need to compile a software package that requires C++11 and Qt 5.3 or above so I need at least the proper header files...

Many thanks once again!
Best regards
Max

@RJVB
Copy link
Owner

RJVB commented Sep 16, 2015 via email

@maximumspatium
Copy link
Author

Can you try once more? I shouldn't maintain multiple patches that touch the same file...

It still fails at the same place:

:info:patch patching file qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
:info:patch Reversed (or previously applied) patch detected! Assume -R? [n]
:info:patch Apply anyway? [n]
:info:patch Skipping patch.
:info:patch 5 out of 5 hunks ignored -- saving rejects to file qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm.rej

I did "git pull" followed by "port clean --all qt5-mac-devel"...

@RJVB
Copy link
Owner

RJVB commented Sep 16, 2015

On Wednesday September 16 2015 14:46:44 maximumspatium wrote:

It still fails at the same place:

Doh, of course it did ... the push hadn't gone through. Should be fine now.

R.

@maximumspatium
Copy link
Author

Patching passes now, thanks a lot! Configure fails with the following error:

:info:configure -no-use-gold-linker: invalid command-line switch
:info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build" && ../qt-everywhere-opensource-src-5.3.2/configure -platform macx-clang -sdk macosx10.6 -prefix /opt/local -archdatadir /opt/local/libexec/qt5-mac -docdir /opt/local/libexec/qt5-mac/doc -headerdir /opt/local/libexec/qt5-mac/include -plugindir /opt/local/libexec/qt5-mac/plugins -importdir /opt/local/libexec/qt5-mac/imports -qmldir /opt/local/libexec/qt5-mac/qml -datadir /opt/local/libexec/qt5-mac -libdir /opt/local/libexec/qt5-mac/lib -bindir /opt/local/libexec/qt5-mac/bin -libexecdir /opt/local/libexec/qt5-mac/libexec -translationdir /opt/local/libexec/qt5-mac/translations -sysconfdir /opt/local/libexec/qt5-mac/etc/xdg -examplesdir /opt/local/libexec/qt5-mac/examples -testsdir /opt/local/libexec/qt5-mac/tests -hostbindir /opt/local/libexec/qt5-mac/bin -hostlibdir /opt/local/libexec/qt5-mac/lib -hostdatadir /opt/local/libexec/qt5-mac -v -release -opensource -confirm-license -shared -force-pkg-config -no-pulseaudio -no-mtdev -no-harfbuzz -openssl-linked -no-xinput2 -no-xcb -no-xcb-xlib -no-libudev -no-egl -make libs -make tools -nomake examples -nomake tests -verbose -nis -cups -iconv -no-evdev -icu -fontconfig -no-pch -dbus-linked -glib -directfb -no-linuxfb -no-kms -no-use-gold-linker -framework -optimized-qmake -system-sqlite -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite2 -no-sql-tds -no-openvg -process
:info:configure Exit code: 1
:error:configure org.macports.configure for port qt5-mac-devel returned: configure failure: command execution failed
:debug:configure Error code: NONE

It looks like -no-use-gold-linker hasn't been recognized...

@RJVB
Copy link
Owner

RJVB commented Sep 17, 2015

On Wednesday September 16 2015 16:18:08 maximumspatium wrote:

Patching passes now, thanks a lot! Configure fails with the following error:

OK, final change/commit for this, I hope : for me it configures now (under 10.9, with the +legacy variant).

Cheers,
Ren�

@maximumspatium
Copy link
Author

Hello René,

thank you for the patches. I've already moved to the next step - Building. This is a good news although the build still fails. This command breaks the build:

:info:build /usr/bin/clang -c -pipe -O2 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_USE_ICU -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/macx-clang -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/include -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore -I../../include -I../../include/QtCore -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore/5.3.2 -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore/5.3.2/QtCore -Iglobal -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/3rdparty/harfbuzz/src -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/3rdparty/md5 -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/3rdparty/md4 -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/3rdparty/sha3 -I.moc -I. /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/tools/qstring_mac.mm -o .obj/qstring_mac.o
:info:build In file included from /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/tools/qtimezoneprivate_mac.mm:43:
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/tools/qtimezoneprivate_p.h:61:10: fatal error: 'unicode/ucal.h' file not found
:info:build #include <unicode/ucal.h>
:info:build ^

It looks like Macport's own ICU @55.1_0 couldn't be found.

Moreover, I noticed that the command above still invokes /usr/bin/clang which is the WRONG ancient compiler by Apple. I have already mp-clang-3.5 with full C++11 support installed and activated.

Below the Qt 5.3.2 configuration extracted from the recent build log:

:info:configure Build parts ............ libs tools
:info:configure Mode ................... release
:info:configure Using C++11 ............ no
:info:configure Using PCH .............. no
:info:configure Target compiler supports:
:info:configure SSE2/SSE3/SSSE3 ...... yes/yes/yes
:info:configure SSE4.1/SSE4.2 ........ yes/yes
:info:configure AVX/AVX2 ............. yes/yes
:info:configure
:info:configure Qt modules and options:
:info:configure Qt D-Bus ............... yes (linked to dbus-1)
:info:configure Qt Concurrent .......... yes
:info:configure Qt GUI ................. yes
:info:configure Qt Widgets ............. yes
:info:configure Large File ............. yes
:info:configure QML debugging .......... yes
:info:configure Use system proxies ..... no
:info:configure
:info:configure Support enabled for:
:info:configure Accessibility .......... yes
:info:configure ALSA ................... no
:info:configure CUPS ................... yes
:info:configure Evdev .................. no
:info:configure FontConfig ............. yes
:info:configure FreeType ............... yes (system library)
:info:configure Glib ................... yes
:info:configure GTK theme .............. no
:info:configure HarfBuzz ............... no
:info:configure Iconv .................. yes
:info:configure ICU .................... yes
:info:configure Image formats:
:info:configure GIF .................. yes (plugin, using bundled copy)
:info:configure JPEG ................. yes (plugin, using system library)
:info:configure PNG .................. yes (in QtGui, using system library)
:info:configure journald ............... no
:info:configure mtdev .................. no
:info:configure Networking:
:info:configure CoreWlan ............. yes
:info:configure getaddrinfo .......... yes
:info:configure getifaddrs ........... yes
:info:configure IPv6 ifname .......... yes
:info:configure OpenSSL .............. yes (linked to the libraries)
:info:configure NIS .................... yes
:info:configure OpenGL / OpenVG:
:info:configure EGL .................. no
:info:configure OpenGL ............... desktop
:info:configure OpenVG ............... no
:info:configure PCRE ................... system
:info:configure pkg-config ............. yes
:info:configure PulseAudio ............. no
:info:configure QPA backends:
:info:configure DirectFB ............. no
:info:configure EGLFS ................ no
:info:configure KMS .................. no
:info:configure LinuxFB .............. no
:info:configure XCB .................. no
:info:configure Session management ..... yes
:info:configure SQL drivers:
:info:configure DB2 .................. no
:info:configure InterBase ............ no
:info:configure MySQL ................ no
:info:configure OCI .................. no
:info:configure ODBC ................. no
:info:configure PostgreSQL ........... no
:info:configure SQLite 2 ............. no
:info:configure SQLite ............... yes (plugin, using system library)
:info:configure TDS .................. no
:info:configure udev ................... no
:info:configure xkbcommon .............. no
:info:configure zlib ................... yes (system library)

It cleanly shows that C++11 has been disabled which is BAD because it indicates that Clang 3.5 from Macports hasn't been recognized. ICU is there but the ancient Apple compiler 3.0 doesn't recognize it for some unknown reason.

What do you think?
Many thanks in advance!
Best regards
Max

@RJVB
Copy link
Owner

RJVB commented Sep 17, 2015

On Thursday September 17 2015 14:10:49 maximumspatium wrote:

Hi Max,

It looks like Macport's own ICU @55.1_0 couldn't be found.

Moreover, I noticed that the command above still invokes /usr/bin/clang which is the WRONG ancient compiler by Apple. I have already mp-clang-3.5 with full C++11 support installed and activated.

Do you have /opt/local/bin/clang and /opt/local/bin/clang++ and if so, where do they point to?

The ucal.h header not found issue rings a bell, but a distant one.

...
It cleanly shows that C++11 has been disabled which is BAD because it indicates that Clang 3.5 from Macports hasn't been recognized. ICU is there but the ancient Apple compiler 3.0 doesn't recognize it for some unknown reason.

What do you think?

Does your build log show anything related to the compiler selection process in the Portfile? I remember it wasn't easy at all to get Qt's build system to accept anything but the system compiler, and it's not impossible that my hack isn't as robust as I thought.
Looks like I'm going to have to fire up my 10.6 VM, but I may not be able to do that for a few more days... I'll see if I can take care of this otherwise tomorrow (force the legacy variant to use a MacPorts compiler).

Cheers,
Ren�

@maximumspatium
Copy link
Author

Do you have /opt/local/bin/clang and /opt/local/bin/clang++ and if so, where do they point to?

/opt/local/bin/clang points to /opt/local/bin/clang-mp-3.5
/opt/local/bin/clang++points to /opt/local/bin/clang++-mp-3.5

/opt/local/bin/clang --version
clang version 3.5.2 (tags/RELEASE_352/final)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

/opt/local/bin/clang++ --version
clang version 3.5.2 (tags/RELEASE_352/final)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

Does your build log show anything related to the compiler selection process in the Portfile?

Yes, the following message will be displayed:

:msg:patch Everything is set up to use the Qt-specific compiler symlink /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/bin/clang++ but the build system will probably resolve the actual compiler to which this link points (/opt/local/bin/clang++-mp-3.5). That is of no consequence; future Qt5 ports will use the Qt compiler in /opt/local/libexec/qt5-mac/bin.

The configure step DOES indeed use the above mentioned compiler (clang 3.5.2). But the build still falls back to the system compiler (Apple Clang 3.0).

What I don't understand is why does C++11 test fail? I've already installed libcxx and libcxxabi and rebased the whole Macports system to libc++ as described here: https://trac.macports.org/wiki/LibcxxOnOlderSystems

The Qt build log clearly shows that libc++ couldn't be found:

:info:configure /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/bin/clang++ -c -pipe -O2 -isysroot /Developer/SDKs/MacOSX10.6.sdk -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -Wall -W -fPIE -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/macx-clang -I/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/config.tests/common/c++11 -I. -o c++11.o /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/config.tests/common/c++11/c++11.cpp
:info:configure /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -o c++11 c++11.o
:info:configure ld: library not found for -lc++
:info:configure clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:configure Makefile:124: recipe for target 'c++11' failed
:info:configure gmake: *** [c++11] Error 1
:info:configure C++11 disabled.

Does it all mean that I end up having a broken Clang 3.5.2 installation?

Thank you a lot for all the patience with my old system!
Best regards
Max

@maximumspatium
Copy link
Author

I've just conducted two simple tests:

  1. tried to compile C++11 test (c++11.cpp) manually using the following two commands:

clang++ -std=c++11 -stdlib=libc++ c++11.cpp -o c++11.o <----- passed without issues

The next one (linking) doesn't work:

clang++ -v -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -stdlib=libc++ -o c++11 c++11.o

clang version 3.5.2 (tags/RELEASE_352/final)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
"/opt/local/libexec/llvm-3.5/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.6.0 -o c++11 -lcrt1.10.6.o -syslibroot /Developer/SDKs/MacOSX10.6.sdk c++11.o -lc++ -lSystem /opt/local/libexec/llvm-3.5/bin/../lib/clang/3.5.2/lib/darwin/libclang_rt.osx.a
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  1. I've tried to build the same source with Clang 3.4 but it doesn't work either showing the same error.
    The reason for this failure is opaque to me.

Could you kindly help? Is it my fault? Everything looks like a broken Clang installation, does it?

Thousands thanks in advance and sorry for being off-topic!
Max

@RJVB
Copy link
Owner

RJVB commented Sep 17, 2015

On Thursday September 17 2015 15:50:21 maximumspatium wrote:

Hi,

clang++ -v -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -stdlib=libc++ -o c++11 c++11.o
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have no experience at all with using libc++ on OS X 10.6.8 but there are a few things you have to know:

  • specifying an SDK may change the header and library search paths, which can lead to unexpected effects when linking libraries that are not in one of the official system locations. That should be less the case (or not at all) when using the 10.6 SDK on OS X 10.6.
  • I think that if you followed the MacPorts guidelines for setting up libc++ on 10.6 (did you), your libc++.dylib lives under /opt/local/lib . That is not a standard path that the linker searches, so a priori the error message is correct.

Try the link with -L/opt/local/lib, and check if there is a difference when you leave out the -Wl,-syslibroot arguments.

R.

@maximumspatium
Copy link
Author

I think that if you followed the MacPorts guidelines for setting up libc++ on 10.6 (did you), your libc++.dylib lives under /opt/local/lib

libc++.dylib has been installed to /usr/lib - the same location where libstdc++ lives. The latter works fine while the former doesn't. I think I'll file a bug ticket for the clang port...

Best regards
Max

@RJVB
Copy link
Owner

RJVB commented Sep 18, 2015

On Friday September 18 2015 06:18:13 maximumspatium wrote:

libc++-dylib has been installed to /usr/lib - the same location where libstdc++ lives. The latter works fine while the former doesn't. I think I'll file a bug ticket for the clang port...

Did you try without the sysroot SDK argument? If you did and still get the not found error it looks like you ran into a clang bug indeed. It might be useful to include a link to this exchange when you file a ticket.
BTW, is clang 3.6 available for OS X 10.6 ?

I'm still looking at the build failure and trying to get the compiler selection "just right".

R.

@maximumspatium
Copy link
Author

Did you try without the sysroot SDK argument? If you did and still get the not found error it looks like you ran into a clang bug indeed.

Yes, I've tried without sysroot/SDK argument with -L/usr/libadded. It works indeed. Awesome, thank you!

I'm still looking at the build failure and trying to get the compiler selection "just right".

Great! Thanks a lot!

@RJVB
Copy link
Owner

RJVB commented Sep 18, 2015

On Friday September 18 2015 11:49:40 maximumspatium wrote:

Did you try without the sysroot SDK argument? If you did and still get the not found error it looks like you ran into a clang bug indeed.

Yes, I've tried without sysroot/SDK argument with -L/usr/libadded. It works indeed. Awesome, thank you!

Erm, you shouldn't have to add -L/usr/lib ...

I'm still looking at the build failure and trying to get the compiler selection "just right".
Great! Thanks a lot!

I think I'm making progress. I'm working with qt5-mac-devel-x11 (which in facts builds all of qtbase, but doesn't even extract all the rest of Qt so is much leaner for testing). It appears to be building now, using my links to the selected clang compilers in /opt/local/bin . Your mileage may still vary though because I'm using clang-mp-3.6 and doing this under 10.9.5 .

This shouldn't take much more than 30min, after which I'll push the new port to git.

R.

@maximumspatium
Copy link
Author

Erm, you shouldn't have to add -L/usr/lib ...

You're right - it's not required indeed :))

@RJVB
Copy link
Owner

RJVB commented Sep 18, 2015

On Friday September 18 2015 12:04:30 maximumspatium wrote:

Erm, you shouldn't have to add -L/usr/lib ...

You're right - it's not required indeed :))

OK, so there's no bug in macports-clang. Remember how I said that an SDK selection can do funny things? You just witnessed one; libc++ isn't part of the 10.6 SDK, so even if you install it into the system you still cannot access it through the official 10.6 SDK. Think of it as a way to make sure that you target only official, stock libraries.

I've push a new commit, please try it and let me know how it goes.

R.

@maximumspatium
Copy link
Author

I've push a new commit, please try it and let me know how it goes.

I got the same error regarding ICU. The configure step uses Macports' clang whereas the buld step persistently switches to system clang (/usr/bin/clang).
Is it possible that something hasn't been patched correctly?

I'm sorry to take up so much of your time fighting with a legacy configuration. Should we give up or try once again?

P.S.: I could try some things out if you'd give me some pointers...

@RJVB
Copy link
Owner

RJVB commented Sep 18, 2015

On Friday September 18 2015 13:50:28 maximumspatium wrote:

I've push a new commit, please try it and let me know how it goes.

I got the same error regarding ICU. The configure step uses Macports' clang whereas the buld step persistently switches to system clang (/usr/bin/clang).

From the very first file that is built?

Is it possible that something hasn't been patched correctly?

I saw that there is an ICU patch; can you confirm that it has been applied?

I'm sorry to take up so much of your time fighting with a legacy configuration. Should we give up or try once again?

I can try to reproduce your issue in my 10.6 VM, but as I said I won't be able to do that the next few days.
Meanwhile, you can try this

%> port clean qt5-mac-devel
%> port configure qt5-mac-devel
%> fgrep /usr/bin/clang -R port work qt5-mac-devel/qt-everywhere-opensource-src-5.3.2
%> fgrep /usr/bin/clang -R port work qt5-mac-devel/build

both commands should not return any hits, so let me know what you find. If you get no results, you can still try this:

%> fgrep clang -R port work qt5-mac-devel/qt-everywhere-opensource-src-5.3.2 | fgrep -v bin/clang
%> fgrep clang -R port work qt5-mac-devel/build | fgrep -v bin/clang

(those search in a convoluted way for clang references that are not in a bin directory, a priori that should be "clang" without any path info at all in your case.)

R.

@maximumspatium
Copy link
Author

both commands should not return any hits...

I did everything exactly as you said (clean followed by configure followed by fgrep). The search has revealed several hardcoded _/usr/bin/clang_.

%> fgrep /usr/bin/clang -R port work qt5-mac-devel/qt-everywhere-opensource-src-5.3.2

/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm: } elsif (-x "**/usr/bin/clang**") {
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm: $gccLocation = "**/usr/bin/clang**
";
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/preprocessor.pm: } elsif (-x "**/usr/bin/clang**") {
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/preprocessor.pm: $preprocessor = "**/usr/bin/clang**
";
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/ChangeLog-2013-04-24: "clang: warning: not using the clang compiler for C++ inputs" due to hard-coding of **/usr/bin/clang**_ in WebCore.gyp

%> fgrep /usr/bin/clang -R port work qt5-mac-devel/build

/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/config.status: LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Os' CXXFLAGS='-Os' CFLAGS='-Os' CXX='**/usr/bin/clang++_' CC='/usr/bin/clang**' /opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/configure -platform macx-clang -sdk macosx10.6 -prefix /opt/local -archdatadir /opt/local/libexec/qt5-mac -docdir /opt/local/libexec/qt5-mac/doc -headerdir /opt/local/libexec/qt5-mac/include -plugindir /opt/local/libexec/qt5-mac/plugins -importdir /opt/local/libexec/qt5-mac/imports -qmldir /opt/local/libexec/qt5-mac/qml -datadir /opt/local/libexec/qt5-mac -libdir /opt/local/libexec/qt5-mac/lib -bindir /opt/local/libexec/qt5-mac/bin -libexecdir /opt/local/libexec/qt5-mac/libexec -translationdir /opt/local/libexec/qt5-mac/translations -sysconfdir /opt/local/libexec/qt5-mac/etc/xdg -examplesdir /opt/local/libexec/qt5-mac/examples -testsdir /opt/local/libexec/qt5-mac/tests -hostbindir /opt/local/libexec/qt5-mac/bin -hostlibdir /opt/local/libexec/qt5-mac/lib -hostdatadir /opt/local/libexec/qt5-mac -release -opensource -confirm-license -shared -force-pkg-config -no-pulseaudio -no-mtdev -no-harfbuzz -openssl-linked -no-xinput2 -no-xcb -no-xcb-xlib -no-libudev -no-egl -make libs -make tools -nomake examples -nomake tests -verbose -nis -cups -iconv -no-evdev -icu -fontconfig -no-pch -dbus-linked -glib -directfb -no-linuxfb -no-kms -framework -optimized-qmake -system-sqlite -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite2 -no-sql-tds -no-openvg -process "$@"
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/config.status: LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Os' CXXFLAGS='-Os' CFLAGS='-Os' CXX='**/usr/bin/clang++**
' CC='_/usr/bin/clang' /opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/configure -platform macx-clang -sdk macosx10.6 -prefix /opt/local -archdatadir /opt/local/libexec/qt5-mac -docdir /opt/local/libexec/qt5-mac/doc -headerdir /opt/local/libexec/qt5-mac/include -plugindir /opt/local/libexec/qt5-mac/plugins -importdir /opt/local/libexec/qt5-mac/imports -qmldir /opt/local/libexec/qt5-mac/qml -datadir /opt/local/libexec/qt5-mac -libdir /opt/local/libexec/qt5-mac/lib -bindir /opt/local/libexec/qt5-mac/bin -libexecdir /opt/local/libexec/qt5-mac/libexec -translationdir /opt/local/libexec/qt5-mac/translations -sysconfdir /opt/local/libexec/qt5-mac/etc/xdg -examplesdir /opt/local/libexec/qt5-mac/examples -testsdir /opt/local/libexec/qt5-mac/tests -hostbindir /opt/local/libexec/qt5-mac/bin -hostlibdir /opt/local/libexec/qt5-mac/lib -hostdatadir /opt/local/libexec/qt5-mac -release -opensource -confirm-license -shared -force-pkg-config -no-pulseaudio -no-mtdev -no-harfbuzz -openssl-linked -no-xinput2 -no-xcb -no-xcb-xlib -no-libudev -no-egl -make libs -make tools -nomake examples -nomake tests -verbose -nis -cups -iconv -no-evdev -icu -fontconfig -no-pch -dbus-linked -glib -directfb -no-linuxfb -no-kms -framework -optimized-qmake -system-sqlite -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite2 -no-sql-tds -no-openvg -process
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/config.summary:qmake vars .......... QMAKE_CC = **/usr/bin/clang**
QMAKE_CXX = **
/usr/bin/clang++_ QMAKE_CFLAGS = -Os QMAKE_CXXFLAGS = -Os QMAKE_LFLAGS = -L/opt/local/lib -Wl,-headerpad_max_install_names -Os styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_LIBS_DBUS = -L/opt/local/lib -ldbus-1 QT_CFLAGS_DBUS = -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include QT_HOST_CFLAGS_DBUS = -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include QT_CFLAGS_GLIB = -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include QT_LIBS_GLIB = -L/opt/local/lib -lgthread-2.0 -lglib-2.0 -lintl QMAKE_CFLAGS_FONTCONFIG = -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 QMAKE_LIBS_FONTCONFIG = -L/opt/local/lib -lfontconfig -lfreetype DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_EVDEV sql-drivers = sql-plugins = sqlite qmake switches ......... -d
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/config.tests/.qmake.cache:QMAKE_CC = **/usr/bin/clang
_
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/config.tests/.qmake.cache:QMAKE_CXX = **/usr/bin/clang++_
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/mkspecs/qmodule.pri:QMAKE_CC = **/usr/bin/clang
_
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/build/qtbase/mkspecs/qmodule.pri:QMAKE_CXX = **/usr/bin/clang++**_

@maximumspatium
Copy link
Author

I saw that there is an ICU patch; can you confirm that it has been applied?

Everything looks good in first sight. I didn't verify whether it has been patched correctly. It just passes. Here the appropriate excerpt:

:info:patch ---> Applying patch-icutest.pro.diff
:debug:patch Environment:
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2" && /usr/bin/patch -Np0'
:debug:patch Executing command line: cd "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2" && /usr/bin/patch -Np0 < '/opt/local/site-ports/aqua/qt5-mac-devel/files/qt532/patch-icutest.pro.diff'
:info:patch patching file qtbase/config.tests/unix/icu/icu.pro

@RJVB
Copy link
Owner

RJVB commented Sep 19, 2015

On Friday September 18 2015 14:31:49 maximumspatium wrote:

I did everything exactly as you said (clean followed by configure followed by fgrep). The search has revealed several hardcoded _/usr/bin/clang_.

See, this helped. Turns out that MacPorts has a habit of resetting certain things to what it thinks should be the correct value, and of course that doesn't become apparent if you're working per phase like I usually do.
I've made some changes that should reset those things back to what I think is correct.

%> fgrep /usr/bin/clang -R port work qt5-mac-devel/qt-everywhere-opensource-src-5.3.2

/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm: } elsif (-x "**/usr/bin/clang**") {
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm: $gccLocation = "**/usr/bin/clang**
";
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/preprocessor.pm: } elsif (-x "**/usr/bin/clang**") {
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/bindings/scripts/preprocessor.pm: $preprocessor = "**/usr/bin/clang**
";
/opt/local/var/macports/build/opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtwebkit/Source/WebCore/ChangeLog-2013-04-24: "clang: warning: not using the clang compiler for C++ inputs" due to hard-coding of **/usr/bin/clang**_ in WebCore.gyp

This is something I've missed; I'll take a look at that next.

R.

@maximumspatium
Copy link
Author

Hello René,

congratulations! We've made a huge progress with Qt 5.3.2! It builds now just well although the build doesn't succeed for the time being. But first the good news:

  • the right compiler is being used
  • several CLI tools (moc, qlalr, qmake, rcc, uic, qdoc) have been built sucessfully so far

The build currently chokes on /qtbase/src/widgets/dialogs/qfontdialog.cpp. It looks like something went wrong with patching because the source file contains forbidden characters:

:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:333:1: error: invalid argument type 'QStringList' to unary expression
:info:build + // RJVB 20150916
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:650:58: error: use of undeclared identifier 'mediumStyles'; did you mean 'mediumStr'?
:info:build || (qstringCompareToList(cstyle, mediumStyles, compareExact) && qstringCompareToList(istyle, mediumStyles, compareExact))
:info:build ^~~~~~~~~~~~
:info:build mediumStr
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:622:13: note: 'mediumStr' declared here
:info:build mediumStr = QCoreApplication::translate("QFontDatabase", "Medium");
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:650:29: error: no matching function for call to 'qstringCompareToList'
:info:build || (qstringCompareToList(cstyle, mediumStyles, compareExact) && qstringCompareToList(istyle, mediumStyles, compareExact))
:info:build ^~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:582:20: note: candidate function not viable: no known conversion from 'QString' to 'QStringList &' for 2nd argument
:info:build static inline bool qstringCompareToList(QString &style, QStringList &checkList, bool exact, Qt::CaseSensitivity mode = Qt::CaseInsensitive)
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:650:118: error: use of undeclared identifier 'mediumStyles'; did you mean 'mediumStr'?
:info:build || (qstringCompareToList(cstyle, mediumStyles, compareExact) && qstringCompareToList(istyle, mediumStyles, compareExact))
:info:build ^~~~~~~~~~~~
:info:build mediumStr
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:622:13: note: 'mediumStr' declared here
:info:build mediumStr = QCoreApplication::translate("QFontDatabase", "Medium");
:info:build ^
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:650:89: error: no matching function for call to 'qstringCompareToList'
:info:build || (qstringCompareToList(cstyle, mediumStyles, compareExact) && qstringCompareToList(istyle, mediumStyles, compareExact))
:info:build ^~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets/dialogs/qfontdialog.cpp:582:20: note: candidate function not viable: no known conversion from 'QString' to 'QStringList &' for 2nd argument
:info:build static inline bool qstringCompareToList(QString &style, QStringList &checkList, bool exact, Qt::CaseSensitivity mode = Qt::CaseInsensitive)
:info:build ^

Could you kindly look into this? I could send you the mispatched file if you want, so please just say me a word...

Thank you for the awesome job!
Best regards
Max

@RJVB
Copy link
Owner

RJVB commented Sep 19, 2015

On Saturday September 19 2015 09:30:57 maximumspatium wrote:

congratulations! We've made a huge progress with Qt 5.3.2! It builds now just well although the build doesn't succeed for the time being. But first the good news:

  • the right compiler is being used

Ahhh, good!

Could you kindly look into this? I could send you the mispatched file if you want, so please just say me a word...

AAargh :) No need to send me the file, I get the same patch errors. I was half expecting some errors with the font patch, but not stupid ones like a stray +. Oh well...

Thank you for the awesome job!

Awesome would have been if it built without this whole trial-and-error process!

Cheers,
Ren�

@RJVB
Copy link
Owner

RJVB commented Sep 19, 2015 via email

@maximumspatium
Copy link
Author

René,

building the Qt 5.3.2 with the latest patches (rev ae2f83b) succeed. So we moved a step further. Great news, isn't?

Installation chokes on the "Staging into destroot" step with the following error:

:info:destroot ---> Patching qt5: s|${developer_dir}|/Developer|g
:debug:destroot Executing reinplace: /usr/bin/sed {s|${developer_dir}|/Developer|g} < /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/etc/select/qt/qt5 >@ file10 2>@stderr
:debug:destroot Executing proc-post-org.macports.destroot-destroot-1
:error:destroot org.macports.destroot for port qt5-mac-devel returned: can't read "qt_cmake_module_dir": no such variable
:debug:destroot Error code: NONE
:debug:destroot Backtrace: can't read "qt_cmake_module_dir": no such variable

@RJVB
Copy link
Owner

RJVB commented Sep 19, 2015 via email

@maximumspatium
Copy link
Author

To save you time: use port's -o argument (e.g. sudo port -o install qt5-mac-devel): this will save you from having to do the whole build all over again. But do this before:
%> sudo rm -rf port work qt5-mac-devel/destroot

Executed as you said: first sudo rm... and then sudo port -o install. Macports restarts with the "Staging into destroot" and fails soon with can't read "qt_cmake_module_dir": no such variable. It seems I have to delete the whole installation and start over again. Argggh...

@RJVB
Copy link
Owner

RJVB commented Sep 19, 2015 via email

@maximumspatium
Copy link
Author

can't read "qt_cmake_module_dir": no such variable is gone. Now I'm getting another one:

:info:destroot ---> Patching libQtXmlPatterns.prl: /QMAKE_PRL_BUILD_DIR/d
:debug:destroot Executing reinplace: /usr/bin/sed /QMAKE_PRL_BUILD_DIR/d < /opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/libexec/qt5-mac/lib/libQtXmlPatterns.prl >@ file10 2>@stderr
:error:destroot org.macports.destroot for port qt5-mac-devel returned: error renaming "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/libexec/qt5-mac/lib/pkgconfig/Enginio.pc" to "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/libexec/qt5-mac/lib/pkgconfig/Enginio.pc": file already exists
:debug:destroot Error code: NONE
:debug:destroot Backtrace: error renaming "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/libexec/qt5-mac/lib/pkgconfig/Enginio.pc" to "/opt/local/var/macports/build/_opt_local_site-ports_aqua_qt5-mac-devel/qt5-mac-devel/work/destroot/opt/local/libexec/qt5-mac/lib/pkgconfig/Enginio.pc": file already exists

@RJVB
Copy link
Owner

RJVB commented Sep 20, 2015

On Saturday September 19 2015 15:13:48 maximumspatium wrote:

can't read "qt_cmake_module_dir": no such variable is gone. Now I'm getting another one:

Oh shoot, of course. I'll look into the differences (in the "post-destroot" stage) between mine and mcalhoun's way of installing things (locations). I probably should never have allowed the 5.3.2 version to install any other way than mine, but in reality this whole difference in install layout arose long after I had developed, tested and put to rest the 5.3.2 build.
Bear with me, I may not have the time to get to the bottom of this today.

Of course you can decide to install my qt5-mac-devel-kde port (after doing yet another pull), if you don't mind the additional patches and are OK with not having all of qt5 under its own prefix under /opt/local/libexec (and rebuilding). If the Qt5 apps you need come from Linux and support Freedesktop stuff (including sharing with, say, GTk/gnome based apps) you may even find that qt5-mac-devel-kde works better. I too started out with all of Qt in its own prefix when I started making coinstallable Qt4 and Qt5 ports. But quickly ran into issues (with Qt4 in its own prefix, can't remember exactly what) that made me rethink and modify the original Qt4 install schema as little as possible to make it coinstallable.

Cheers,
Ren�

@maximumspatium
Copy link
Author

I did git pull followed by portindex followed by rm -rf destroot followed by port -o install. The error still persists. Should it work with port -o install or should I rebuild everything from scratch?

@RJVB
Copy link
Owner

RJVB commented Sep 20, 2015

On Sunday September 20 2015 02:59:40 maximumspatium wrote:

I did git pull followed by portindex followed by rm -rf destroot followed by port -o install. The error still persists. Should it work with port -o install or should I rebuild everything from scratch?

Oops, that's a misunderstanding . I only pushed a small change that should allow you to install qt5-mac-devel-kde, not qt5-mac-devel. That is in fact a different port, so it means you'll have to build it from scratch. If disk space is not an issue you can simply leave the build directory for qt5-mac-devel untouched, and finish building it when I manage to get the errors out of the Portfile.
I mentioned this possibility in case you're getting fed up with being a guinea pig and also have no preference for the exact details of how Qt is installed.

To recap:
qt5-mac-devel : when installed without previous installation present it uses (once corrected...) the "official"/upstream/mcalhoun install layout where all of Qt5 is installed under /opt/local/libexec/qt5-mac .
qt5-mac-devel-kde : an alternative port that has a few patches intended to improve the experience with KF5. When installed without previous installation present it uses my install layout: the Qt-specific binaries under /opt/local/libexec/qt5 and the shared things incl. the plugins under /opt/local/share/qt5. I strongly believe that this layout is more suitable for MacPorts; it is based on the tried qt4-mac install layout.

My install layout was developed and tested months before mcalhoun remembered he was the main qt5-mac maintainer and decided to ignore all my efforts.
qt5-mac-devel and qt5-mac-devel-kde can both be installed but not each be active at the same time, and sadly it is not currently possible to run applications built against the qt5-mac-devel when qt5-mac-devel-kde is active or vice-versa.

Cheers,
R.

@maximumspatium
Copy link
Author

Ok, I've started building qt5-mac-devel-kde port. It will take a while because it depends on clang 3.7 that must be installed first. Hope, everything goes well...

@RJVB
Copy link
Owner

RJVB commented Sep 20, 2015

On Sunday September 20 2015 03:46:41 maximumspatium wrote:

Ok, I've started building qt5-mac-devel-kde port. It will take a while because it depends on clang 3.7...

Eh? And it's building clang 3.7 from source I guess? Aie, that shouldn't happen either, it should have accepted your existing clang 3.5 (or 3.6?) just like the main port did ...

R.


Reply to this email directly or view it on GitHub:
#1 (comment)

@RJVB
Copy link
Owner

RJVB commented Sep 20, 2015

On Sunday September 20 2015 03:46:41 maximumspatium wrote:

Ok, I've started building qt5-mac-devel-kde port. It will take a while because it depends on clang 3.7...

This may actually be a side-effect (undesired...) of MacPort's compiler whitelisting feature. I'd advise to kill the process and do a sudo clean clang-3.7 llvm-3.7 unless you're actually interested in experimenting with a compiler version that may not even be released yet (and have issues on OS X 10.6). I'm taking a priority look at getting qt5-mac-devel-kde to accept clang-3.5 or clang-3.6 if they're installed.

BTW: let's take this to private email: rjvbertin AT gmail dot com .

R.

@RJVB
Copy link
Owner

RJVB commented Sep 20, 2015 via email

RJVB added a commit to mkae/macstrop that referenced this issue Nov 16, 2016
Strips everything that isn't related to Qt5 or at least indirectly to
KDE. For now I've left in both KDE4 and KF5; those could be moved to a
branch if they get in the way and interfere with a clear overview.

Note the 2 previous commits which upgrade mlt and qgit.

Committed from host : Portia.local
Committing to working copy : macstrop-mkae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants