* bug#75786: python-fastbencode does not build the C extensions
@ 2025-01-23 15:00 Dariqq
2025-01-24 7:51 ` bug#75786: [PATCH] gnu: python-fastbencode: Use python-cython-3 Dariqq
2025-01-24 12:51 ` bug#75786: python-fastbencode does not build the C extensions Sharlatan Hellseher
0 siblings, 2 replies; 3+ messages in thread
From: Dariqq @ 2025-01-23 15:00 UTC (permalink / raw)
To: 75786
Hello,
while troubleshooting some python things i got the following warning
UserWarning: failed to load compiled extension: No module named
'fastbencode._bencode_pyx'
Reason seems to be that something goes wrong during building:
Snippet of build log at 4241a5a4688e8a118b2f66423abd3ef8baae98fc
running build_ext
cythoning fastbencode/_bencode_pyx.pyx to fastbencode/_bencode_pyx.c
Error compiling Cython file:
------------------------------------------------------------
...
from cpython.mem cimport (
PyMem_Free,
PyMem_Malloc,
PyMem_Realloc,
)
from cpython.unicode cimport (
^
------------------------------------------------------------
fastbencode/_bencode_pyx.pyx:49:0:
'cpython/unicode/PyUnicode_FromStringAndSize.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
raise ValueError('string size below zero: %d' % n)
if self._bytestring_encoding == NULL:
result = PyBytes_FromStringAndSize(self.tail, n)
elif self._bytestring_encoding == b'utf-8':
result = PyUnicode_FromStringAndSize(self.tail, n)
^
------------------------------------------------------------
fastbencode/_bencode_pyx.pyx:201:21: 'PyUnicode_FromStringAndSize' is
not a constant, variable or function identifier
building 'fastbencode._bencode_pyx' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/fastbencode
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall
-fno-semantic-interposition -fPIC -Ifastbencode
-I/gnu/store/kayi1a27qjbizw1870vgpwd6mzcdggql-python-3.10.7/include/python3.10
-c fastbencode/_bencode_pyx.c -o
build/temp.linux-x86_64-cpython-310/fastbencode/_bencode_pyx.o
fastbencode/_bencode_pyx.c:1:2: error: #error Do not use this file, it
is the result of a failed Cython compilation.
1 | #error Do not use this file, it is the result of a failed
Cython compilation.
| ^~~~~
warning: old_build_ext: building extension "fastbencode._bencode_pyx"
failed: command
'/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/bin/gcc' failed
with exit code 1
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#75786: [PATCH] gnu: python-fastbencode: Use python-cython-3
2025-01-23 15:00 bug#75786: python-fastbencode does not build the C extensions Dariqq
@ 2025-01-24 7:51 ` Dariqq
2025-01-24 12:51 ` bug#75786: python-fastbencode does not build the C extensions Sharlatan Hellseher
1 sibling, 0 replies; 3+ messages in thread
From: Dariqq @ 2025-01-24 7:51 UTC (permalink / raw)
To: 75786
Cc: Dariqq, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
Sharlatan Hellseher, Tanguy Le Carrour, jgart
The c extension does not build with regular python-cython.
* gnu/packages/python-xyz.scm (python-fastbencode)[native-inputs]: Replace
python-cython with with python-cython-3.
Change-Id: I9ecfdcfe1ff9fe8b3e5977d452f655b842e4d52d
---
gnu/packages/python-xyz.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9e5fa9a26c..2435ca8e98 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18345,7 +18345,7 @@ (define-public python-fastbencode
(sha256
(base32 "15x1in22gwam7wwga5lbj1pd8hc9jk741pia3pv1m29n2xywpq2z"))))
(build-system python-build-system)
- (native-inputs (list python-cython))
+ (native-inputs (list python-cython-3))
(home-page "https://github.com/breezy-team/fastbencode")
(synopsis "Python Bencode (de)serializer with optional fast C extensions")
(description
base-commit: 4241a5a4688e8a118b2f66423abd3ef8baae98fc
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#75786: python-fastbencode does not build the C extensions
2025-01-23 15:00 bug#75786: python-fastbencode does not build the C extensions Dariqq
2025-01-24 7:51 ` bug#75786: [PATCH] gnu: python-fastbencode: Use python-cython-3 Dariqq
@ 2025-01-24 12:51 ` Sharlatan Hellseher
1 sibling, 0 replies; 3+ messages in thread
From: Sharlatan Hellseher @ 2025-01-24 12:51 UTC (permalink / raw)
To: 75786-done
[-- Attachment #1: Type: text/plain, Size: 498 bytes --]
Hi,
It's built just fine now, thanks.
--8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix build -P 1 python-fastbencode
guix build: computing dependents of package python-fastbencode@0.3.1...
/gnu/store/krw4kw3hx4gv01p8i2n11iwcfy9gc3ig-python-fastbencode-0.3.1
/gnu/store/c8w87k9vpq6idl572146lnv8d7is2nn9-breezy-3.2.2
--8<---------------cut here---------------end--------------->8---
Pushed as:
origin/master 4dacc7856152278563011d8c00af645407ac8835
--
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-24 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23 15:00 bug#75786: python-fastbencode does not build the C extensions Dariqq
2025-01-24 7:51 ` bug#75786: [PATCH] gnu: python-fastbencode: Use python-cython-3 Dariqq
2025-01-24 12:51 ` bug#75786: python-fastbencode does not build the C extensions Sharlatan Hellseher
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).