qutebrowser: enable cross compilation#230171
Closed
Conversation
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
```
Member
|
Don't use paths in the commit messages, use |
Member
What a king :D. |
added 16 commits
May 6, 2023 02:31
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.
added 5 commits
May 6, 2023 02:32
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).
Author
@ofborg build pkgsCross.aarch64-multiplatform.qutebrowser |
12 tasks
This pull request was closed.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.qutebrowserand all of its dependencies (pyqt, qt-5, wayland, etc) from anx86_64-linuxbuilder.It works, but still needs cleanup -- especially the two
[DONTMERGE]commits.Things done
x86_64-linux)