!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

208 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux 62 Servers

Load older messages


SenderMessageTime
25 Apr 2025
@alex:tunstall.xyzAlexIt's likely mentioned in the "writing packages for cross" section of the manual.00:33:30
@outfoxxed:outfoxxed.meoutfoxxeddoesn't look like a new regression, at least not to this package, which is the root of the linking issue00:35:24
@senk0:element.senk0.com@senk0:element.senk0.com left the room.00:35:40
@alex:tunstall.xyzAlex

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:outfoxxed.meoutfoxxedprobably, but it looks far easier to just fix it00:38:32
@alex:tunstall.xyzAlexIt's a Python package, so see the "overriding Python packages" section of the Nixpkgs manual.00:39:26
@outfoxxed:outfoxxed.meoutfoxxeddoesn't seem to02:48:02
@outfoxxed:outfoxxed.meoutfoxxed
libstemmer = builtins.trace "${targetPackages.libstemmer} ${buildPackages.libstemmer} ${pkgs.libstemmer}" targetPackages.libstemmer;
02:48:35
@outfoxxed:outfoxxed.meoutfoxxed

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:outfoxxed.meoutfoxxedwhichever pass sets env vars is not that one02:49:12
@outfoxxed:outfoxxed.meoutfoxxed*postConfigure at least02:50:53
@outfoxxed:outfoxxed.meoutfoxxed
{
  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:outfoxxed.meoutfoxxed

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:outfoxxed.meoutfoxxedwhile it fails during build if i try to build the whole system03:05:30
@outfoxxed:outfoxxed.meoutfoxxed
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:outfoxxed.meoutfoxxedpkgsHostHost 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:outfoxxed.meoutfoxxedso pkgsHostTarget is identical but maybe more correct?03:35:24
@dramforever:matrix.orgdramforeverthat should be the build = x86_64, host = riscv64 libstemmer03:39:59
@dramforever:matrix.orgdramforeverif it doesn't work something else went wrong03:40:08
@dramforever:matrix.orgdramforeverwait no03:41:36
@dramforever:matrix.orgdramforeverare you even sure you need to cross this to riscv64?03:41:46
@outfoxxed:outfoxxed.meoutfoxxed

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:matrix.orgdramforeverthis is probably a build dependency of something03:41:56
@dramforever:matrix.orgdramforever iiuc this should be for host = x86_64 03:42:10
@dramforever:matrix.orgdramforeverit's a dependency of sphinx03:42:15
@dramforever:matrix.orgdramforeverthe docs generator03:42:18
@dramforever:matrix.orgdramforeverit's possible someone just broke it on x86_64 recently or something...?03:42:33
@outfoxxed:outfoxxed.meoutfoxxedRedacted or Malformed Event03:43:09
@outfoxxed:outfoxxed.meoutfoxxedlooks like not just sphinx but mostly sphinx03:43:23
@outfoxxed:outfoxxed.meoutfoxxed
┣━ 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

Show newer messages


Back to Room ListRoom Version: 10