| 25 Apr 2025 |
Alex | It's likely mentioned in the "writing packages for cross" section of the manual. | 00:33:30 |
outfoxxed | doesn't look like a new regression, at least not to this package, which is the root of the linking issue | 00:35:24 |
| @senk0:element.senk0.com left the room. | 00:35:40 |
Alex | Have you looked at why it's in the build time closure?
Changes to other packages may have resulted in it being required where it wasn't before.
I suspect that one of the dependants in the chain can be overridden to not require it. | 00:38:02 |
outfoxxed | probably, but it looks far easier to just fix it | 00:38:32 |
Alex | It's a Python package, so see the "overriding Python packages" section of the Nixpkgs manual. | 00:39:26 |
outfoxxed | doesn't seem to | 02:48:02 |
outfoxxed | libstemmer = builtins.trace "${targetPackages.libstemmer} ${buildPackages.libstemmer} ${pkgs.libstemmer}" targetPackages.libstemmer;
| 02:48:35 |
outfoxxed | prints 3x and only in one of them is targetPackages set correctly
trace: /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0 /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0 /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0
trace: /nix/store/bdsm3nvxjczzyki4057bmj941wr7gjqs-libstemmer-riscv64-unknown-linux-gnu-2.2.0 /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0 /nix/store/rxys7b8xsdm6zk710f4vdmsib1gsi9zv-libstemmer-2.2.0
trace: /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0 /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0 /nix/store/4fca7idn7b9hy41ch7kbbwi2dn96zfyq-libstemmer-2.2.0
| 02:49:02 |
outfoxxed | whichever pass sets env vars is not that one | 02:49:12 |
outfoxxed | *postConfigure at least | 02:50:53 |
outfoxxed | {
lib,
python,
fetchFromGitHub,
fetchpatch2,
buildPythonPackage,
cython,
setuptools,
targetPackages,
buildPackages,
pkgsCross,
pkgs,
}: let
#inherit (targetPackages) libstemmer;
libstemmer = builtins.trace "${targetPackages.libstemmer} ${buildPackages.libstemmer} ${pkgs.libstemmer}" targetPackages.libstemmer;#targetPackages.libstemmer;
in buildPythonPackage rec {
pname = "pystemmer";
version = "2.2.0.1-fix";
src = fetchFromGitHub {
owner = "snowballstem";
repo = "pystemmer";
tag = "v${version}";
hash = "sha256-ngPx95ybgJmndpNPBwCa3BCNsozRg+dlEw+nhlIwI58=";
};
patches = [
(fetchpatch2 {
# relax cython constraint
name = "pystemmer-relax-cython.patch";
url = "https://github.com/snowballstem/pystemmer/commit/d3d423dc877b4f49e0ab1776f7edaff37feb6799.patch";
hash = "sha256-9K6gy/cLFPfW82XYHVVPXUbQhf8XyB4NUi4YqNtyWcw=";
})
];
build-system = [
cython
setuptools
];
postConfigure = let a = ''
export PYSTEMMER_SYSTEM_LIBSTEMMER="${lib.getDev libstemmer}/include"
''; in builtins.trace a a;
env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getDev libstemmer}/include" ];
NIX_CFLAGS_LINK = [ "-L${libstemmer}/lib" ];
pythonImportsCheck = [ "Stemmer" ];
checkPhase = ''
runHook preCheck
${python.interpreter} runtests.py
runHook postCheck
'';
meta = with lib; {
description = "Snowball stemming algorithms, for information retrieval";
downloadPage = "https://github.com/snowballstem/pystemmer";
homepage = "http://snowball.tartarus.org/";
license = with licenses; [
bsd3
mit
];
platforms = platforms.unix;
};
}
| 02:53:30 |
outfoxxed | just doesn't build at all if i try to build it directly
nix-repl> :b nixosConfigurations.jupiter.pkgs.python312Packages.pystemmer
error:
… while evaluating the attribute 'drvPath'
at /nix/store/isfbldda5j8j6x3nbv1zim0c0dpf90v8-source/lib/customisation.nix:418:7:
417| // {
418| drvPath =
| ^
419| assert condition;
… while evaluating the attribute 'drvPath'
at /nix/store/isfbldda5j8j6x3nbv1zim0c0dpf90v8-source/lib/customisation.nix:418:7:
417| // {
418| drvPath =
| ^
419| assert condition;
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'libstemmer' missing
at /nix/store/070hcnb78yzmrh3xg95hn6pjkyb31r21-source/pystemmer.nix:15:34:
14| #inherit (targetPackages) libstemmer;
15| libstemmer = builtins.trace "${targetPackages.libstemmer} ${buildPackages.libstemmer} ${pkgs.libstemmer}" targetPackages.libstemmer;#targetPackages.libstemmer;
| ^
16| in buildPythonPackage rec {
| 03:05:06 |
outfoxxed | while it fails during build if i try to build the whole system | 03:05:30 |
outfoxxed | nix-repl> :p nixosConfigurations.jupiter.pkgs.targetPackages
{
__raw = true;
recurseForDerivations = false;
stdenv = {
cc = «derivation /nix/store/r1mr2kx550g5n8ayc0rxlm09ijq4pbn7-gcc-wrapper-14.2.1.20250322.drv»;
};
}
that's certainly unhelpful
| 03:06:26 |
outfoxxed | pkgsHostHost appears to work, but I'm not sure if thats the best one
I'm reading it as pkgs[runs(is linked) on host][doesn't codegen so irrelevant?] | 03:35:11 |
outfoxxed | so pkgsHostTarget is identical but maybe more correct? | 03:35:24 |
dramforever | that should be the build = x86_64, host = riscv64 libstemmer | 03:39:59 |
dramforever | if it doesn't work something else went wrong | 03:40:08 |
dramforever | wait no | 03:41:36 |
dramforever | are you even sure you need to cross this to riscv64? | 03:41:46 |
outfoxxed | I'm getting linker errors that look like this
> /nix/store/28kj37kcx5gshdk38adk4383rfcawvhj-binutils-2.44/bin/ld: /nix/store/rxys7b8xsdm6zk710f4vdmsib1gsi9zv-libstemmer-2.2.0/lib/libstemmer.a(libstemmer.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
| 03:41:54 |
dramforever | this is probably a build dependency of something | 03:41:56 |
dramforever | iiuc this should be for host = x86_64 | 03:42:10 |
dramforever | it's a dependency of sphinx | 03:42:15 |
dramforever | the docs generator | 03:42:18 |
dramforever | it's possible someone just broke it on x86_64 recently or something...? | 03:42:33 |
outfoxxed | Redacted or Malformed Event | 03:43:09 |
outfoxxed | looks like not just sphinx but mostly sphinx | 03:43:23 |
outfoxxed | ┣━ Dependency Graph:
┃ ┌─ ⚠ python3.12-pystemmer-2.2.0.1-fix failed with exit code 1 after ⏱ 2s in buildPhase
┃ ┌─ ⏸ python3.12-snowballstemmer-2.2.0
┃ ┌─ ⏸ python3.12-sphinx-8.2.3
┃ ┌─ ⏸ libtiff-4.7.0
┃ ┌─ ⏸ gdk-pixbuf-2.42.12
┃ ┌─ ⏸ libavif-1.2.1
┃ ┌─ ⏸ gd-2.3.3
┃ ┌─ ⏸ graphviz-12.2.1
┃ ┌─ ⏸ libnl-riscv64-unknown-linux-gnu-3.11.0
┃ ┌─ ⏸ libpcap-riscv64-unknown-linux-gnu-1.10.5
┃ ┌─ ⏸ iptables-riscv64-unknown-linux-gnu-1.8.11
┃ ┌─ ⏸ systemd-riscv64-unknown-linux-gnu-257.3
┃ │ ┌─ ⚠ python3.12-pystemmer-2.2.0.1-fix failed with exit code 1 after ⏱ 5s in buildPhase
┃ │ ┌─ ⏸ python3.12-snowballstemmer-2.2.0
┃ │ ┌─ ⏸ python3.12-sphinx-8.2.3
┃ │ ┌─ ⏸ python3.12-readthedocs-sphinx-ext-2.2.5
┃ │ ┌─ ⏸ python3.12-sphinx-rtd-theme-3.0.2
┃ │ ├─ ⚠ python3.12-pystemmer-2.2.0.1-fix failed with exit code 1 after ⏱ 1s in buildPhase
┃ │ ┌─ ⏸ python3-3.12.9-env
┃ ├─ ⏸ btrfs-progs-riscv64-unknown-linux-gnu-6.14
┃ ┌─ ⏸ nixos-generate-config
┃ ┌─ ⏸ system-path
┃ ┌─ ⏸ dbus-1
┃ ┌─ ⏸ etc
┃ ├─ ⏵ linux-riscv64-unknown-linux-gnu-6.14.2 (configurePhase) ⏱ 23s
┃ ⏸ nixos-system-jupiter-25.05.20250417.b024ced
┣━━━ Builds
┗━ ∑ ⏵ 0 │ ✔ 0 │ ⏸ 352 │ ⏱ 32s^C
| 03:43:27 |