guix build fails on RISC-V due to python-py-cpuinfo test failure #33873

issue laanwj openend this issue on November 14, 2025
  1. laanwj commented at 4:16 pm on November 14, 2025: member

    i’m trying to do a guix build (of the master branch) on RISC-V hardware. The device is a Scaleway EM-RV1-C4M16S128-A server from Scaleway. It has a four core T-HEAD C910 CPU:

    0Architecture:          riscv64
    1  Byte Order:          Little Endian
    2CPU(s):                4
    3  On-line CPU(s) list: 0-3
    
     0processor       : 0
     1hart            : 0
     2isa             : rv64imafdcsu
     3mmu             : sv39
     4cpu-freq        : 1.848Ghz
     5cpu-icache      : 64KB
     6cpu-dcache      : 64KB
     7cpu-l2cache     : 1MB
     8cpu-tlb         : 1024 4-ways
     9cpu-cacheline   : 64Bytes
    10⋮ (4 times)
    

    However, it fails in the tests of python-py-cpuinfo (a dependency of LIEF).

    0building /gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv...
    1/ 'check' phasenote: keeping build directory `/tmp/guix-build-python-py-cpuinfo-8.0.0-1.4d6987e.drv-3'
    2builder for `/gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv' failed with exit code 1
    3build of /gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv failed
    4View build log at '/var/log/guix/drvs/gs/9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv.gz'.
    5cannot build derivation `/gnu/store/wmcihcrlgln588v5xbk89zh05rvr2hdi-python-fastjsonschema-2.15.1.drv': 1 dependencies couldn't be built
    6building /gnu/store/gqr2b58a66m4gwblgprqbmp3yfnfq41c-python-pycparser-2.21.drv...
    7cannot build derivation `/gnu/store/vllqd95n44lpzfpj08v5wgp61gg23dr2-python-pydantic-2.5.3.drv': 1 dependencies couldn't be built
    8note: keeping build directory `/tmp/guix-build-python-pycparser-2.21.drv-3'
    9cannot build derivation `/gnu/store/a0a1wwiwdgk9mxlspkl6p5mddfsdhrkh-python-lief-0.16.6.drv': 1 dependencies couldn't be built
    

    Detailed failure:

     0======================================================================
     1FAIL: test_all (test_actual.TestActual)
     2----------------------------------------------------------------------
     3Traceback (most recent call last):
     4  File "/tmp/guix-build-python-py-cpuinfo-8.0.0-1.4d6987e.drv-0/source/tests/test_actual.py", line 74, in test_all
     5    self.assertTrue(len(cpuinfo._get_cpu_info_from_proc_cpuinfo()) > 0)
     6AssertionError: False is not true
     7
     8----------------------------------------------------------------------
     9Ran 152 tests in 17.371s
    10
    11FAILED (failures=1, skipped=1)
    12Test failed: <unittest.runner.TextTestResult run=152 errors=0 failures=1>
    13error: Test failed: <unittest.runner.TextTestResult run=152 errors=0 failures=1>
    14error: in phase 'check': uncaught exception:
    15%exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 1 term-signal: #f stop-signal: #f> 
    16phase `check' failed after 19.5 seconds
    17command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
    18build process 6 exited with status 256
    
  2. laanwj added the label Build system on Nov 14, 2025
  3. hebasto commented at 4:27 pm on November 14, 2025: member

    Which OS?

    I’ve found Debian to be more suitable for RISC-V.

    (somewhat related: https://codeberg.org/guix/guix/issues/3852)

  4. laanwj commented at 5:07 pm on November 14, 2025: member

    It’s debian (Debian GNU/Linux forky/sid). Intentially chose that because i assumed it would be least hassle 😄

    Looks like the package is defined in

    0/home/guix-build/.cache/guix/checkouts/lmgz3ewobtxzz4rsyp72z7woeuxeghzyukvmmnxlwpobu76yyi5a/gnu/packages/python-xyz.scm
    

    Would it be possible to patch it to disable the tests, like with openssl?

  5. laanwj commented at 5:51 pm on November 14, 2025: member

    i patched all versions of python-xyz.scm on the system (not sure how to determine which exactly i need to) with this:

     0diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
     1index cba99cce62..7d91059365 100644
     2--- a/gnu/packages/python-xyz.scm
     3+++ b/gnu/packages/python-xyz.scm
     4@@ -31650,6 +31650,7 @@ (define-public python-py-cpuinfo
     5           (base32
     6            "0h5wi1bfcqqr1x3j1pa7dmkx7siprsyksbsy80fl2sdrrgpji0b0"))))
     7       (build-system python-build-system)
     8+      (arguments (list #:tests? #false))
     9       (home-page "https://github.com/workhorsy/py-cpuinfo")
    10       (synopsis "Get CPU info with Python")
    11       (description
    

    This seems to have worked to get past it.

  6. maflcko added the label Upstream on Nov 17, 2025
  7. maflcko commented at 1:41 pm on November 17, 2025: member

    I presume the same fails upstream, without guix: https://github.com/workhorsy/py-cpuinfo/blame/f3f0fec58335b9699b9b294267c15f516045b1fe/tests/test_actual.py#L74

    Though, upsteam is unmaintained, so i am not sure what can be done here.

  8. laanwj commented at 2:34 pm on November 17, 2025: member

    Right! i could take a look at fixing this upstream.

    From a high level perspective, i don’t quite understand why a cpuinfo module would be needed for deterministic cross-compiling in the first place. Nor why it’d run tests that depend on local CPU configuration. But i guess it’s some deeper nested dependency that gets pulled in unconditionally (through LIEF in this case?). GUIX sadly has more of those, basically same complaint as in #30042.

  9. maflcko commented at 2:43 pm on November 17, 2025: member
    Yeah, if it is pulled in through LIEF, it could make sense to strip the unmaintained dependency from LIEF upstream.
  10. hebasto commented at 4:58 pm on November 17, 2025: member

    Yeah, if it is pulled in through LIEF, it could make sense to strip the unmaintained dependency from LIEF upstream.

    FWIW:

    0# guix graph --path python-lief python-py-cpuinfo
    1python-lief@0.17.1
    2python-pydantic@2.10.4
    3python-pytest-benchmark@5.1.0
    4python-py-cpuinfo@9.0.0
    

    (guix checked out at a different commit though)

  11. hebasto commented at 5:51 pm on November 17, 2025: member

    i’m trying to do a guix build (of the master branch) on RISC-V hardware. The device is a Scaleway EM-RV1-C4M16S128-A server from Scaleway.

    It builds fine for me on an instance from the same provider:

    0# guix describe
    1Generation 3	Nov 17 2025 17:45:37	(current)
    2  guix 5cb84f2
    3    repository URL: https://git.guix.gnu.org/guix.git
    4    commit: 5cb84f2013c5b1e48a7d0e617032266f1e6059e2
    5# guix build python-py-cpuinfo
    6/gnu/store/v09j8kcdxci3nbrjrqz7gik0sf5rm3dx-python-py-cpuinfo-8.0.0-1.4d6987e
    

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-17 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me