!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 https://github.com/orgs/NixOS/teams/risc-v63 Servers

Load older messages


SenderMessageTime
25 Apr 2025
@outfoxxed:outfoxxed.meoutfoxxedRedacted or Malformed Event00:22:59
@outfoxxed:outfoxxed.meoutfoxxedoh images00:23:07
@outfoxxed:outfoxxed.meoutfoxxed
https://cache.nixos.org/1bdv07g5yrx9z8mx8cpb3mvpram8sr6k.narinfo
https://cache.nixos.org/8349avkx4zyyjbvqdsqfzi2x9bhcknhm.narinfo
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Running phase: unpackPhase
@nix {"action":"setPhase","phase":"unpackPhase"}
unpacking source archive /nix/store/5mpsrh6976i2q6hvqldy5my1xv0i58jb-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/tox.ini"
Running phase: patchPhase
@nix {"action":"setPhase","phase":"patchPhase"}
applying patch /nix/store/zv5lhayid63hj6knl3j23p537gw72b0q-pystemmer-relax-cython.patch
patching file setup.py
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix {"action":"setPhase","phase":"updateAutotoolsGnuConfigScriptsPhase"}
Running phase: configurePhase
@nix {"action":"setPhase","phase":"configurePhase"}
no configure script, doing nothing
Running phase: buildPhase
@nix {"action":"setPhase","phase":"buildPhase"}
Executing setuptoolsBuildPhase
setup.py build flags: ''
/nix/store/3krszmzsfwqg39s43ifs8whs0alx8jqw-python3.12-setuptools-78.1.0/lib/python3.12/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/nix/store/3krszmzsfwqg39s43ifs8whs0alx8jqw-python3.12-setuptools-78.1.0/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: MIT License
        License :: OSI Approved :: BSD License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()
running bdist_wheel
running build
running build_ext
[1/1] Cythonizing src/Stemmer.pyx
/nix/store/5327wj8ca9nb1wzaixvr2mm2936s6qd1-python3.12-cython-3.0.12/lib/python3.12/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /build/source/src/Stemmer.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
building 'Stemmer' extension
creating build/temp.linux-x86_64-cpython-312/src
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/nix/store/xk0hydw631sn8035ymm6ms9rmhdd1qpr-libxcrypt-4.4.38/include -fPIC -I/nix/store/x01lfmldpavvvbhgjb3bsjhidsqn7i0l-python3-3.12.9/include/python3.12 -c src/Stemmer.c -o build/temp.linux-x86_64-cpython-312/src/Stemmer.o
creating build/lib.linux-x86_64-cpython-312
gcc -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.7.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.4.7/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-util-linux-minimal-2.40.4-lib/lib -L/nix/store/xk0hydw631sn8035ymm6ms9rmhdd1qpr-libxcryp>
/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
/nix/store/28kj37kcx5gshdk38adk4383rfcawvhj-binutils-2.44/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
error: command '/nix/store/z752rq9yrcv44ibibfn9j9h2vn8299qc-gcc-wrapper-14.2.1.20250322/bin/gcc' failed with exit code 1
00:23:33
@outfoxxed:outfoxxed.meoutfoxxedas far as I can tell, its attempting to link against x64 libstemmer due to the build machine00:23:51
@outfoxxed:outfoxxed.meoutfoxxedthe package just uses ${libstemmer} directly, and not via a native/target dep how is that suppposed to be handled? 00:24:42
@outfoxxed:outfoxxed.meoutfoxxedhttps://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/pystemmer/default.nix#L5500:24:44
@outfoxxed:outfoxxed.meoutfoxxed* https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/pystemmer/default.nix00:24:47
@outfoxxed:outfoxxed.meoutfoxxedSince this is in the critical chain to even getting a zero package nixos install running I'd assume theres some reason everyone doesn't run into this00:27:55
@alex:tunstall.xyzAlex
In reply to @outfoxxed:outfoxxed.me
the package just uses ${libstemmer} directly, and not via a native/target dep
how is that suppposed to be handled?

Splicing can't work when packages do that.

Use targetPackages.libstemmer instead and it might work.
If you don't want to patch Nixpkgs, you can override { inherit (self.targetPackages) libstemmer; } instead.

00:30:35
@outfoxxed:outfoxxed.meoutfoxxedis this documented anywhere in the "new users creating a package" path?00:31:32
@alex:tunstall.xyzAlex
In reply to @outfoxxed:outfoxxed.me
Since this is in the critical chain to even getting a zero package nixos install running I'd assume theres some reason everyone doesn't run into this
It's possible that this is a new regression.
00:31:56
@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

Show newer messages


Back to Room ListRoom Version: 10