RJVB / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection, including a set of KF5 ports.
20 stars 9 forks source link

qt5-kde-devel fails to build #72

Closed Tatsh closed 4 years ago

Tatsh commented 4 years ago

This is on:

macOS 10.15.1 Catalina Xcode 11.1 MacPorts 2.6.2

Log file: main.log.gz

All my packages are up-to-date but qt5-kde-devel is being asked to be rebuilt during a rev-upgrade. qt5-webkit is also affected.

RJVB commented 4 years ago

I'm a little swamped with life ATM, which is why I haven't even thought of test-building qt5-kde* after the MacPorts "base" upgrade... Can I ask you to have a look at the following macports-ports commits and see if they contain anything that addresses your problems (as they might judging from the commit msgs)? caabc11130b8430cfc733e0c5ac3be42b31ad553 f2d5d27cd92a0a3af8d72483ef09be88d0300826 468c4fc4f2df01e3d7961bfa648293e0559d306a c2da3726f6afd06bb0bf8bb3c48765a267a0261a 2d9b484997f8b81966c50a9ca0bd861b2f51016b

Note to self: also check 429e9d077ab34f58a5026941ab0f2164b5404485 34135577eb642796660d1e4ba1e679af3c8b38a0 8cf9b206c3c2fcca0e0f6ee2a46f47bc828a3cb7

RJVB commented 4 years ago

I synced some changes from the mainstream ports, check again please?

Tatsh commented 4 years ago

Kind of the same problem with the keyword optional in some file.

main.log.gz

RJVB commented 4 years ago

Looks like there are issues building qtconnectivity and qtlocation that are possibly related to an inappropriate C++ dialect being selected. I've synced another detail from port:qt59 that sets a C++11 requirement, hopefully that addresses the remaining issues

Do you have any of MacPorts's clang ports installed with which you could try to build? I know clang 5 and clang 6 work ... for me.

RJVB commented 4 years ago

oh, and there is a remaining issue with qt5-webkit due to the ICU upgrade, which I'll have to address.

Tatsh commented 4 years ago

Because this was after an OS upgrade and I'm getting some weird messages, I'm doing the migration process so I start from a clean install.

RJVB commented 4 years ago

Because this was after an OS upgrade and I'm getting some weird messages, I'm doing the migration process so I start from a clean install.

Never jump the lines where OS upgrades are concerned ;)

Weird messages at runtime, what about?

How far in the install process are you, IOW, how cumbersome would it be for you to check if port:qt59-qtlocation and port:qt59-qtconnectivity (and their dependencies) install for you?

Tatsh commented 4 years ago

I'm always getting this warning despite definitely having the SDK installed.

Warning: The macOS 10.15 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

I ran the command there too.

From what I can tell, in order to install something like kf5-kate, I need to build qt5-kde-devel first if that is the qt5 package I want to use, correct?

RJVB commented 4 years ago

Warning: The macOS 10.15 SDK does not appear to be installed. Ports may not build correctly.

Even in ports that have the new magic "use_xcode yes" incantation?

From what I can tell, in order to install something like kf5-kate, I need to build qt5-kde-devel first if that is the qt5 package I want to use, correct?

That's the suggested approach if you want to enjoy the full functionality. But I've done nothing to prevent the KF5 ports from being built against port:qt5 and family (use +kdeonly for port:kf5-osx-integration-devel). It's just largely untested.

I do know I'd have to upgrade qt5-kde and family, but for that I'd need to find almost a week during which I can work on rebasing my patches without all the distraction I'm getting currently ... and even then I can't test the changes to Mac code until I've also upgraded my OS (which would take me even longer). Catch-22....

Tatsh commented 4 years ago

From a completely clean install, I tried to build other packages like mpv with your source enabled and the patch plus the setting [own_portgroups_first]. This led to some weird errors without any explanation except when -d was passed. Basically, the dependency tree for mpv could not be resolved so it stopped building about half way.

For now, for non-macstrop packages, I really have to disable this source (and my own) until I have other packages from the main source installed.

Tatsh commented 4 years ago

I made sure to update my fork and I ran port install --unrequested qt5-kde-devel and I am still getting the SDK warning. I am building qt5-kde-devel at the moment.

Tatsh commented 4 years ago

Also it would appear the source URL changed. Your Portfile distfile URL resolves to using https://download.qt.io/official_releases/qt/5/5.9.8/single/ but now the ${branch} variable has to be 5.9.

http://download.qt.io/official_releases/qt/5/5.9.8/single/ 404

http://download.qt.io/official_releases/qt/5.9/5.9.8/single/

Tatsh commented 4 years ago

Got the same error again. So it wasn't to do with my environment or upgrading OS without doing the migration.

qt5-kde-devel-main.log.gz

RJVB commented 4 years ago

Didn't you rebuilt after upgrading to 10.15?

Either way, your OS version must have something to do with it, now that I compensated for the changes in "base" (= the ports build again for me on 10.9).

What I'll try to do over the coming days is to adapt my QStandardPaths patch and whatever other patch is really necessary for a decent KDE experience to the mainstream port:qt5 (shadowing it in MacStrop).

Tatsh commented 4 years ago

I rebuilt everything. I started from a completely clean install of MacPorts (I deleted /opt/local entirely).

Tatsh commented 4 years ago

The error in the log seems to be something minor with some 3rd party code that Qt uses and I don't know the cause but this is the only issue. The build would otherwise finish linking as shown in the log.

RJVB commented 4 years ago

I haven't yet looked at your latest log, the previous ones also showed errors in qtconnectivity (but I don't know if they'd cause an overall build failure). I was already planning to disable the mapbox-gl build.

Tatsh commented 4 years ago

I modified the libexec/macports/lib/port1.0/portutil.tc to display what it's looking for:

3382             ui_warn "expecting '[file tail [option configure.sdkroot]]'.sdk"
3383             if {${os.major} >= 18 && [file tail [option configure.sdkroot]] ne "MacOSX[option configure.
     sdk_version].sdk"} {
3384                 ui_warn "The macOS [option configure.sdk_version] SDK does not appear to be installed.
     Ports may not build correctly."

This outputs expecting ''.sdk so configure.sdkroot is blank. Do you know why this might be happening? This only happens AFAIK with port install qt5-kde-devel.

RJVB commented 4 years ago

This outputs expecting ''.sdk so configure.sdkroot is blank. Do you know why this might be happening? This only happens AFAIK with port install qt5-kde-devel.

In the Portfile you'll find

    # Qt builds part of the system using environment provided by MacPorts.
    # It builds the rest using its own internal environment.
    # For consistency, clear MacPorts environment.

above a block where a whole bunch of settings including sdkroot are reset. The mainstream Qt5 ports have retained this (old) bit of code. What surprise me is that I'm not seeing the warning on 10.9. May have something to do with the fact Apple have started to hide the SDK for some reason?

EDIT: at what moment exactly do you get the warning?

RJVB commented 4 years ago

BTW, did you notice I pushed a fix that excludes the mapbox-gl 3rd party plugin and should hopefully solve your build issue?

Tatsh commented 4 years ago

Yeah but that didn't fix it. Had some other things fail. I can get you a log later. I feel like these errors could be caused by the empty variable mentioned above, but I don't know the cause of that.

Sent from my iPhone

On Nov 18, 2019, at 11:48, René Bertin notifications@github.com wrote:

BTW, did you notice I pushed a fix that excludes the mapbox-gl 3rd party plugin and should hopefully solve your build issue? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

RJVB commented 4 years ago

On Monday November 18 2019 08:52:05 Tatsh wrote:

Yeah but that didn't fix it. Had some other things fail. I can get you a log later. I feel like these errors could be caused by the empty variable mentioned above, but I don't know the cause of that.

You could find the line in the Portfile that just has configure.sdkroot and comment it out to test that idea. My hunch is that you'll get other errors because that reset is there for a reason. Anyway there should be magic in the port that uses Qt's configure mechanism to select the same SDK as MacPorts choses by default, i.e. the one for the current OS version.

Maybe you should also try to download and install the official Qt 5.9.8 packages, with the examples, and then build a couple of examples against that (or github:RJVB/qstyle-demo.git). Just to be certain Qt 5.9 still actually works on 10.15 ...

Tatsh commented 4 years ago

I built just about everything again with port -s upgrade --force wireshark3, forcing everything to build from source. I did this without Macstrop enabled and Qt 5 built okay. Wireshark3 runs fine (once I unset QT_QPA_PLATFORMTHEME, otherwise it segfaults).

RJVB commented 4 years ago

Qt 5 built okay.

I presume you got Qt 5.13.x though?

I'm making slow progress with a minimally modified port:qt5 (minimal in terms of patches, I did opt to make it provide 5.12.6 to limit the maintenance burden).

Tatsh commented 4 years ago

I presume you got Qt 5.13.x though?

Yes.

Here's the latest log for qt5-kde-devel after getting the last update.

main.log.gz

RJVB commented 4 years ago

Something that goes wrong in (implicit?) conversion to bool, do you have any means to determine what and why?

Alternatively, can you please try the build with clang port that's more conservative than whatever clang version is provided by your Xcode? I still use clang 5 for most jobs if I'm not using the older (and significantly faster!) clang from my own Xcode.

Tatsh commented 4 years ago

The fix for that is to replace those simple boolean checks with explicit nullptr checks. There's a patch here https://bugreports.qt.io/browse/QTBUG-76847

Tatsh commented 4 years ago

I tried with that patch and it seemed to fix those issues, but patching out mapboxgl will cause other issues.

:info:build Project ERROR: Could not find feature geoservices_mapboxgl.

Patched patch: patch-76847.diff.gz

Last log: main.log.gz

Tatsh commented 4 years ago

There are more of the same boolean checks to patch plus I think you missed removing the qtConfig() portion in project (pro) file: https://github.com/qt/qtlocation/search?q=geoservices_mapbox&unscoped_q=geoservices_mapbox

The 5.9.8 version has the same block for mapbox-gl. I think it can be removed.

Tatsh commented 4 years ago

Let me know if you want me to keep patching (might be very close) or if you want to keep working on 5.13. I'd much rather have a more up-to-date Qt version.

RJVB commented 4 years ago

:info:build Project ERROR: Could not find feature geoservices_mapboxgl.

yes, stupidly enough I didn't test that patch :(

The 5.9.8 version has the same block for mapbox-gl.

?

There are more of the same boolean checks to patch Let me know if you want me to keep patching (might be very close)

I'd appreciate that, of if you can at least give me the list of files to patch or attach the logfile or output of

> (cd `port work qt5-kde-devel`/build/qtlocation ; make -wk)

I'm getting close with a tweaked port:qt5 family. A lot of work because the way the distfile information is stored in the Portfile - and I can only test on my much slower Linux rig. Can you get me a list of the components you actually need so I can at least update the checksums for those to 5.12.6?

Tatsh commented 4 years ago

I'd appreciate that, of if you can at least give me the list of files to patch or attach the logfile or output of

The boolean check fixes look like they are all fixed in version 5.12 based on that bug report.

Can you get me a list of the components you actually need so I can at least update the checksums for those to 5.12.6?

Based on my Gentoo installation on my other system which runs KF5, these are the components:

designer
linguist-tools
qdbus
qtbluetooth
qtchooser
qtconcurrent
qtcore
qtdbus
qtdeclarative
qtgraphicaleffects
qtgui
qtimageformats
qtlockedfile
qtmultimedia
qtnetwork
qtopengl
qtpaths
qtpositioning
qtprintsupport
qtquickcontrols
qtquickcontrols2
qtscript
qtsensors
qtsingleapplication
qtspeech
qtsql with sqlite support
qtsvg
qttest
qtvirtualkeyboard
qtwayland
qtwebchannel
qtwebengine
qtwebkit
qtwidgets
qtx11extras (probably avoid this on macOS)
qtxml
qtxmlpatterns

Qt Location isn't on this list and it isn't necessary for me.

RJVB commented 4 years ago

So I just pushed a version of the qtconnectivity/ambiguous conversion patch that was completed with all the error locations from your latest build log. Could you please try to build qt5-kde-devel again?

Tatsh commented 4 years ago

It worked. Maybe you want to tag that commit as qt598-catalina-working or something similar.

Tatsh commented 4 years ago

Attempting to build Quassel (to connect to my core elsewhere) and I get this error:

$ port install quassel +kde -qtwebkit
Error: Unable to open port: invalid command name "langselect_qm_dir"
RJVB commented 4 years ago

$ port install quassel +kde -qtwebkit Error: Unable to open port: invalid command name "langselect_qm_dir"

Should be fixed.

Tatsh commented 4 years ago

Yes it is.