Date: Tue, 30 Jun 2026 22:17:04 +0000 From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 9cd647b6045b - main - databases/py-leveldb: Fix build with Python 3.12+ Message-ID: <6a444060.3b273.4f2f3c55@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=9cd647b6045bfbe3e75f222ebd7182efd9e312b4 commit 9cd647b6045bfbe3e75f222ebd7182efd9e312b4 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2026-06-30 22:13:28 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2026-06-30 22:13:28 +0000 databases/py-leveldb: Fix build with Python 3.12+ cc -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -I/usr/local/include/python3.12 -c leveldb_object.cc -o build/temp.freebsd-15.0-RELEASE-p10-amd64-cpython-312/leveldb_object.o -I/usr/local/include -I. -fno-builtin-memcmp -O2 -fPIC -pthread -Wall -DOS_FREEBSD -DLEVELDB_PLATFORM_POSIX leveldb_object.cc:795:19: error: use of undeclared identifier 'PyUnicode_AS_UNICODE' 795 | Py_UNICODE* c = PyUnicode_AS_UNICODE(p); | ^ 1 error generated. error: command '/usr/bin/cc' failed with exit code 1 ERROR Backend subprocess exited when trying to invoke build_wheel *** Error code 1 Reference: https://pkg-status.freebsd.org/beefy23/data/150amd64-default/a1fb4afca079/logs/py312-leveldb-0.201_1.log --- databases/py-leveldb/files/patch-leveldb_object.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/databases/py-leveldb/files/patch-leveldb_object.cc b/databases/py-leveldb/files/patch-leveldb_object.cc index c76a6414b76a..70e34ef69459 100644 --- a/databases/py-leveldb/files/patch-leveldb_object.cc +++ b/databases/py-leveldb/files/patch-leveldb_object.cc @@ -1,5 +1,14 @@ --- leveldb_object.cc.orig 2016-12-27 23:03:15 UTC +++ leveldb_object.cc +@@ -792,7 +792,7 @@ static int pyleveldb_str_eq(PyObject* p, const char* s + // unicode string + if (PyUnicode_Check(p)) { + size_t i = 0; +- Py_UNICODE* c = PyUnicode_AS_UNICODE(p); ++ const char* c = PyUnicode_AsUTF8(p); + + while (s[i] && c[i] && (int)s[i] == (int)c[i]) + i++; @@ -901,9 +901,8 @@ static int PyLevelDB_init(PyLevelDB* sel int block_size = 4096; int max_open_files = 1000;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a444060.3b273.4f2f3c55>
