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

qt514.qtbase build broken on darwin #95199

Closed
vcunat opened this issue Aug 11, 2020 · 11 comments
Closed

qt514.qtbase build broken on darwin #95199

vcunat opened this issue Aug 11, 2020 · 11 comments
Labels
0.kind: bug 6.topic: darwin Running or building packages on Darwin 6.topic: qt/kde

Comments

@vcunat
Copy link
Member

vcunat commented Aug 11, 2020

Example log: https://hydra.nixos.org/build/125099625

ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.

On master this started to fail in the moment of update: #84232 – but it was merged at once with other staging changes, so I'm not 100% sure that MR was what triggered the failure. This blocks the nixpkgs-unstable channel.

@vcunat vcunat added 0.kind: bug 6.topic: darwin Running or building packages on Darwin 6.topic: qt/kde 0.kind: regression Something that worked before working no longer 1.severity: channel blocker Blocks a channel labels Aug 11, 2020
@vcunat vcunat mentioned this issue Aug 11, 2020
37 tasks
@acowley
Copy link
Contributor

acowley commented Aug 11, 2020

The few lines before that seem informative:

> /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/mkspecs/features/mac/toolchain.prf:3: Cannot find feature sdk
> Info: creating stash file /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/config.tests/.qmake.stash
> /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/mkspecs/features/mac/default_post.prf:5: 'xcodeSDKInfo' is not a recognized replace function.
> Project WARNING: Qt requires at least version 10.14 of the platform SDK, you're building against version . Please upgrade.
+ cd /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/config.tests/verifyspec && MAKEFLAGS= /nix/store/k3b37yadbn54kbc4yyhf621bxc234zw4-gnumake-4.3/bin/make
> Makefile:69: /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/mkspecs/features/mac/sdk.mk: No such file or directory
> make: *** No rule to make target '/private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/mkspecs/features/mac/sdk.mk'.  Stop.

The requires at least version 10.14 of the platform SDK, you're building against version part is concerning because our darwin.apple_sdk.sdk.version is 10.12.

@vcunat
Copy link
Member Author

vcunat commented Aug 12, 2020

I expect we could keep darwin default at 5.12 for now. We even still have an outdated comment about an earlier case

  # TODO bump to 5.12 on darwin once it's not broken

@sikmir
Copy link
Member

sikmir commented Aug 12, 2020

The requires at least version 10.14 of the platform SDK, you're building against version part is concerning because our darwin.apple_sdk.sdk.version is 10.12.

#86299 (comment)

@acowley
Copy link
Contributor

acowley commented Aug 12, 2020

@matthewbauer is the only person who's been steering the Apple SDK in nixpkgs ship for a while now, so I think it would be good to let him weigh in on whether or not we hold Qt back on darwin or push to update the SDK. I do not understand how the darwin bootstrapping works well enough to help with an SDK update.

@matthewmazzanti
Copy link
Contributor

I've done some digging here to see if I can help get the channel unblocked. Unfortunately I don't have a Darwin system available, so I cant write/test a patch for this.

First thing to note is that it looks like you can define the platform SDK version you want to build against according to the docs here. This may allow us to set the platform SDK version without breaking a bunch of other builds by trying to upgrade the platform SDK version.

Digging through the logs, right before erroring out it seems that there are two things that blow up:

> /private/tmp/nix-build-qtbase-5.14.2.drv-0/qtbase-everywhere-src-5.14.2/mkspecs/features/mac/default_post.prf:5: 'xcodeSDKInfo' is not a recognized replace function.
> Project WARNING: Qt requires at least version 10.14 of the platform SDK, you're building against version . Please upgrade.

Specifically, the xcodeSDKInfo function is not defined, and from what I can tell is entirely removed as a part of this patch:

diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
deleted file mode 100644
index 3a9c2778bb..0000000000
--- a/mkspecs/features/mac/sdk.prf
+++ /dev/null

Where its defined here. I don't know the history here, so this may be a non-issue, but something to look at.

The other thing of note in the logs is the line version 10.14 of the platform SDK, you're building against version . The empty variable for the current version might indicate that qt is not able to find the platform SDK version. Again, I don't know the full history here so this may be a red herring.

vcunat added a commit that referenced this issue Aug 14, 2020
... until issue #95199 is fixed.
@vcunat vcunat changed the title qtbase build broken on darwin qt514.qtbase build broken on darwin Aug 14, 2020
@vcunat vcunat removed 1.severity: channel blocker Blocks a channel 0.kind: regression Something that worked before working no longer labels Aug 14, 2020
wchresta pushed a commit to wchresta/nixpkgs that referenced this issue Aug 17, 2020
@eqyiel
Copy link
Contributor

eqyiel commented Aug 23, 2020

I had a go at fixing this, but they actually use SDKs that were added in 10.13.

For example:

rhi/qrhimetal.mm:220:47: error: no type or protocol named 'MTLCaptureScope'
    API_AVAILABLE(macos(10.13), ios(11.0)) id<MTLCaptureScope> captureScope = nil;
                                              ^
rhi/qrhimetal.mm:383:26: error: use of undeclared identifier 'MTLCaptureManager'
        d->captureMgr = [MTLCaptureManager sharedCaptureManager];
                         ^
rhi/qrhimetal.mm:389:25: error: property 'label' not found on object of type 'id'
        d->captureScope.label = label.toNSString();
                        ^
rhi/qrhimetal.mm:1197:25: warning: instance method '-pushDebugGroup:' not found (return type defaults to 'id') [-Wobjc-method-access]
            [cbD->d->cb pushDebugGroup: str];
                        ^~~~~~~~~~~~~~
rhi/qrhimetal.mm:1211:25: warning: instance method '-popDebugGroup' not found (return type defaults to 'id') [-Wobjc-method-access]
            [cbD->d->cb popDebugGroup];
                        ^~~~~~~~~~~~~
rhi/qrhimetal.mm:1264:26: warning: instance method '-beginScope' not found (return type defaults to 'id') [-Wobjc-method-access]
        [d->captureScope beginScope];
                         ^~~~~~~~~~
rhi/qrhimetal.mm:1318:26: warning: instance method '-endScope' not found (return type defaults to 'id') [-Wobjc-method-access]
        [d->captureScope endScope];
                         ^~~~~~~~
rhi/qrhimetal.mm:2941:20: error: use of undeclared identifier 'MTLVertexFormatUCharNormalized'
            return MTLVertexFormatUCharNormalized;
                   ^
rhi/qrhimetal.mm:3643:22: error: property 'displaySyncEnabled' not found on object of type 'CAMetalLayer *'
            d->layer.displaySyncEnabled = NO;
                     ^

http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.13/Metal.html

For the curious eqyiel@50c2b5f

@siraben
Copy link
Member

siraben commented Oct 9, 2020

I ran into this issue today when trying to compile pkgs.python3.pkgs.pyqt5

@prusnak
Copy link
Member

prusnak commented Dec 23, 2020

For reference:

prusnak added a commit to prusnak/nixpkgs that referenced this issue Jun 3, 2021
This fixes Qt 5.14 and Qt 5.15 builds NixOS#95199
@prusnak prusnak linked a pull request Jun 3, 2021 that will close this issue
9 tasks
@prusnak prusnak removed a link to a pull request Jun 3, 2021
9 tasks
@siraben
Copy link
Member

siraben commented Jun 8, 2021

@prusnak any updates on this?

@prusnak
Copy link
Member

prusnak commented Jun 8, 2021

@prusnak any updates on this?

We need to update macOS SDK to 10.14+ first.

@veprbl
Copy link
Member

veprbl commented Jul 22, 2021

@siraben siraben closed this as completed Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 6.topic: darwin Running or building packages on Darwin 6.topic: qt/kde
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants