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
qt59.qtbase: fix darwin build so qtdeclarative can build #29812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot test on macOS, so I should not approve this request, but neither does anything look wrong.
@@ -80,7 +80,7 @@ stdenv.mkDerivation { | |||
|
|||
patches = | |||
copyPathsToStore (lib.readPathsFromFile ./. ./series) | |||
++ stdenv.lib.optional stdenv.isDarwin ./darwin-cf.patch; | |||
++ stdenv.lib.optional stdenv.isDarwin (lib.readPathsFromFile ./. ./darwin-series); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work correctly. I don't really get why it's done like that for the other patches either, what's the advantage over just a list of paths?
applying patch /nix/store/bz3c8wjkkippnb60hcqydklkpx6jngrm-git-export/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch
/nix/store/wh1ck71iabaw743xnf1j3aj9y8wh9jv3-stdenv-darwin/setup: line 740: /nix/store/bz3c8wjkkippnb60hcqydklkpx6jngrm-git-export/pkgs/development/libraries/qt-5/5.9/qtbase/mkspecs-common-mac.patch: No such file or directory
builder for ‘/nix/store/wbpddvjbjm993ffmcl5h2v7z3bfkhbm4-qtbase-5.9.1.drv’ failed with exit code 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really get why it's done like that for the other patches either, what's the advantage over just a list of paths?
I can point quilt
at that list of patches and work with them on top of the unpacked sources (almost) as if it was Git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just follow the current way of qt* modules. They are using a list of patches even for just one patch. Like https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/libraries/qt-5/5.9/qtdeclarative
@LnL7 are you sure you pulled in all the changes? Looks like the patch file is not in your test env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, that must be it. The hydra builds would have the same problem.
@@ -45,7 +45,7 @@ stdenv.mkDerivation { | |||
libjpeg libpng libtiff | |||
] | |||
|
|||
++ lib.optional mesaSupported mesa | |||
++ lib.optional (mesaSupported && !stdenv.isDarwin) mesa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already defaults to false on darwin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Darwin, the mesaSupported is passed in as true instead of using default value (false). That's the reason why qtdeclarative cannot build. If you look at output of qtbase configuration, the current result shows OpenVG is yes due to mesaSupported value as true.
substituteInPlace ./mkspecs/common/mac.conf \ | ||
--replace "/System/Library/Frameworks/OpenGL.framework/" "${darwin.apple_sdk.frameworks.OpenGL}/Library/Frameworks/OpenGL.framework/" | ||
substituteInPlace ./mkspecs/common/mac.conf \ | ||
--replace "/System/Library/Frameworks/AGL.framework/" "${darwin.apple_sdk.frameworks.AGL}/Library/Frameworks/AGL.framework/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not part of the patch file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we know the actual ${darwin.apple_sdk.frameworks.AGL} path within patch file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think so, but I think replacing paths like this preferable since it doesn't break as easily as a patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanks for clarifying this. I missed the ${darwin...}
substitutions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw. these two lines will probably enable qt5.qtwebkit
, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can build qt5.qtwebkit locally
Updated new version. Let me know if anything need to change |
All of the remaining failures are caused by a chmod now, including a dependency of qtdeclarative.
|
@LnL7 I'm having trouble to reproduce the error you saw. Can you let me know how to reproduce it? |
@j-hao Hmm, maybe the minimal sandbox is only used when build user separation is enabled. Are you using the nix-daemon? It's probably trying to make a setuid binary, that's not allowed in a build sandbox. |
@LnL7 the problem occurred if I use nix-daemon. I have switched to nix-daemon and tested the build. It can now build qt5.full for me. Please check |
@j-hao Nice, everything builds now except for qtwebengine. |
Motivation for this change
All changes are for Darwin: move sed command to patch files; disable mesa; fix OpenGL and AGL header files path. qtdeclarative and qtwebkit can be built
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)