14 Oct 2024 |
Artturin | In reply to @reckenrode:matrix.org I think depsBuildBuild should work. The new SDK stuff supports it, so I should be able to add the 15.0 SDK there as well. For a depsBuildBuild compiler the libs will be in nativeBuildInputs usually | 02:13:42 |
Randy Eckenrode | Just as long as it gets _FOR_BUILD when doing the roles stuff, so it stays out of the Windows cross. | 02:14:24 |
Artturin | Yup should be like that | 02:15:05 |
Artturin | Just do what you did in dxvk but with the addition of depsBuildBuild compiler | 02:17:34 |
Randy Eckenrode | Thanks. This is going to be a pretty interesting build. Itβs using clang for both the native and cross compiler, and it needs to link against LLVM for Windows as well. | 02:21:48 |
15 Oct 2024 |
| yehowshua removed their profile picture. | 17:19:27 |
17 Oct 2024 |
| Mic92 changed their display name from Mic92 to Mic3000. | 06:51:17 |
| Mic92 changed their display name from Mic3000 to Mic3000 π. | 06:51:46 |
| Mic92 changed their display name from Mic3000 π to Mic92. | 12:22:31 |
18 Oct 2024 |
| greg | 12:52:32 |
| isaac joined the room. | 18:33:57 |
19 Oct 2024 |
jackwilsdon | Trying to fix cross-compilation for countourpy . It stores information about its build environment in a .py file, including the path to the Python executable.
What's the right way to go about making this cross compile properly? The build environment file is generated using the builder Python. The simplest option I can see is just using substituteInPlace in post-build to replace the build Python with the target Python, but it feels a bit hacky.
| 04:03:16 |
Artturin | Look at upstream to see how it's generated and if anythings configurable | 04:05:45 |
Artturin | If not then substiture | 04:06:10 |
Artturin | * If not then substitute | 04:06:17 |
jackwilsdon | We could patch this and do a substitute on the patch before applying it, but not sure if that's really any better: https://github.com/contourpy/contourpy/blob/27160ab9a3f2d32f8d6b1990ae2919475c322283/lib/contourpy/util/meson.build#L23 | 04:13:03 |
Artturin | And check that output doesn't depend on build deps
nix path-info -r ./result look for paths without the target suffic | 04:13:12 |
Artturin | * And check that output doesn't depend on build deps
nix path-info -r ./result look for paths without the target suffix | 04:13:29 |
jackwilsdon | The output currently does depend on the wrong Python which is causing the build failure, will check the other dependencies too | 04:13:35 |
Artturin | * And check that output doesn't depend on build deps
`nix path-info -r ./result` look for paths without the target suffix | 04:13:42 |
jackwilsdon | This is what I'm looking to fix:
error: output '/nix/store/gnk9kd5j28wm94m0pfk21rdbyzyvkypd-python3.12-contourpy-1.2.1-aarch64-unknown-linux-gnu' is not allowed to refer to the following paths:
/nix/store/wfbjq35kxs6x83c3ncpfxdyl5gbhdx4h-python3-3.12.6
The only reference to the wrong Python is in this build info file.
| 04:14:07 |
Artturin | In reply to @jackwilsdon:matrix.org We could patch this and do a substitute on the patch before applying it, but not sure if that's really any better: https://github.com/contourpy/contourpy/blob/27160ab9a3f2d32f8d6b1990ae2919475c322283/lib/contourpy/util/meson.build#L23 Without patch is more sustainable | 04:15:38 |
jackwilsdon | Testing this:
postBuild = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) ''
find . -name __pycache__ -type d -depth -delete
substituteInPlace util/_build_config.py \
--replace-fail ${python.pythonOnBuildForHost.interpreter} ${python.interpreter}
'';
| 04:17:20 |
Artturin | Assuming it's not embedded in binaries | 04:17:26 |
jackwilsdon | It's not, it's just in a plaintext Python file | 04:17:35 |
Artturin | The things upstreams do :/ | 04:20:49 |
jackwilsdon | It looks like I'm going to have to do this in postPatch as a substituteInPlace to modify the input file, as there isn't a good point for me to intercept the built file afterwards (the meson-python library it's using builds into a temporary directory with a random name, then it's bundled into a wheel so I can't modify it there either) | 04:22:34 |
jackwilsdon | I guess I could modify it postInstall | 04:23:00 |
Artturin | Either works | 04:25:35 |
jackwilsdon | $ nix path-info -r ./result | grep -v aarch64-unknown-linux
/nix/store/iv4iygkdy52b8vawy0b5aqxi7lpk7afy-cross-file.conf
seems promising!
| 04:31:29 |