-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
qutebrowser: enable cross compilation #230171
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if there is more than one qt5 attr and this file is copied then the arg to generateSplicesForMkScope should be changed
Without this, two different copies of qtbase to wind up in the buildInputs for cross compiled builds, leading to this sort of breakage for PyQt: ``` Error: detected mismatched Qt dependencies: /nix/store/8g7xc01pj6y569qfyf5ccfbs5dr87wwq-qtbase-aarch64-unknown-linux-gnu-5.15.9-dev /nix/store/w19n5gzlx4fv63a3dn5965s661nhakv9-qtbase-5.15.9-dev ```
ghost
requested a review
from Artturin
May 5, 2023 19:10
ofborg
bot
added
the
6.topic: cross-compilation
Building packages on a different platform than they will be used on
label
May 5, 2023
Don't use paths in the commit messages, use |
What a king :D. |
This commit adds the `-device` and `-device-option` flags necessary for cross compilation to `configureFlags`. It also adds the (one-entry at the moment) Rosetta Stone for QT-5 as a `let`-defined `qtPlatform` function which takes a nixpkgs platform and returns a QT-5 `mkspecs`-string.
This commit: - sets the `PKG_CONFIG_SYSROOT_DIR` and `PKG_CONFIG_LIBDIR` environment variables when compiling a cross-targeted `qmake`. This is required; if these environment variables are unset, `qmake` won't even try to use `pkg-config`. - writes `LDFLAGS`, `CFLAGS`, and `CXXFLAGS` into `qmake.conf`.
QT's configure script doesn't understand these, so let's not pass them.
Later stages of the build process expect to find $bin/bin/{qmlformat,qmltyperegistrar} however qt's quirky build tooling doesn't feel like it's in the mood to put those files there when doing a cross-compiled build. Instead it puts them in $dev/bin. Let's move them to the right place and add symlinks from whence we moved them (the symlinks can't point the other way due to reference cycles).
QtWebChannel does not produce binaries when it is cross-compiled. Let's omit the `$bin` output in that case.
The expression in its current form attempts to invoke the python2 interpreter for the wrong (i.e. build) architecture. Using python3 explicitly, rather than relying on aliases, fixes this.
When cross-compiling, qmake insists on being able to find a `pkgsHostForTarget`-style `pkg-config` with the name `pkg-config` (no target prefix allowed). To keep `qmake` happy, this commit creates a one-symlink derivation containing a link `pkg-config` which points to `${targetPrefix}pkg-config`. This commit also sets the `PKG_CONFIG` environment variable.
The build logs from PyQT5 are quite verbose; it's nice to trim them down so all you see is the errors. This commit adds an option which does that.
This commit causes pyqtwebengine to build using -j$NIX_BUILD_CORES, and also adds the verbose flag which really means "don't send build errors to /dev/null".
This commit: - adds qtwebchannel to deps - takes sip from buildPackages
This commit successfully cross compiles qutebrowser and all its dependencies (pyqt, qt-5, wayland, etc).
@ofborg build pkgsCross.aarch64-multiplatform.qutebrowser |
ghost
mentioned this pull request
Aug 26, 2023
12 tasks
ghost
marked this pull request as ready for review
August 26, 2023 20:02
ghost
closed this
Oct 22, 2023
ghost
deleted the
pr/qutebrowser/cross
branch
October 22, 2023 05:36
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: cross-compilation
Building packages on a different platform than they will be used on
6.topic: python
6.topic: qt/kde
10.rebuild-darwin: 501-1000
10.rebuild-darwin: 501+
10.rebuild-linux: 501+
10.rebuild-linux: 2501-5000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is is -- the finish line. I cross compiled 100% of the software on my laptop today -- all the way from the reset vector (coreboot) to my preferred web browser (qutebrowser).
Description of changes
This PR successfully builds
pkgsCross.aarch64-multiplatform.qutebrowser
and all of its dependencies (pyqt, qt-5, wayland, etc) from anx86_64-linux
builder.It works, but still needs cleanup -- especially the two
[DONTMERGE]
commits.Things done
x86_64-linux
)