[Bug 271165] databases/py-postgresql: Fails to build so lib on 14-CURRENT
Date: Mon, 01 May 2023 09:26:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271165
Bug ID: 271165
Summary: databases/py-postgresql: Fails to build so lib on
14-CURRENT
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: rhurlin@FreeBSD.org
CC: arcade@b1t.name
Flags: maintainer-feedback?(arcade@b1t.name)
CC: arcade@b1t.name
Created attachment 241900
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=241900&action=edit
Fix build of .so lib
On CURRENT the installation process of databases/py-postgresql is broken:
-------------------------
===> Registering installation for py39-postgresql-1.3.0
pkg-static: Unable to access file
/usr/ports/databases/py-postgresql/work-py39/stage/usr/local/lib/python3.9/site-packages/postgresql/port/optimized.cpython-39.so:No
such file or directory
*** Error code 1
-------------------------
The package builders also complain about this breakage on main:
https://portsfallout.com/port/2965/
This happens because optimized.cpython-39.so was not built due to a compiler
error:
-------------------------
In file included from postgresql/port/_optimized/module.c:43:
postgresql/port/_optimized/buffer.c:590:2: error: incompatible pointer to
integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of
type 'void *' [-Wint-conversion]
NULL,
/* tp_print */
^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
In file included from postgresql/port/_optimized/module.c:44:
postgresql/port/_optimized/wirestate.c:251:2: error: incompatible pointer to
integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of
type 'void *' [-Wint-conversion]
NULL,
/* tp_print */
^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
-------------------------
Probably due to the stricter checks of newer compilers like clang15 on CURRENT
errors like this occur if the CFLAG '-Wint-conversion' was not set. The
attached patch tries to solve the problem by setting the value of NULL to 0 for
the argument tp_print. Some small tests on my side with the patched version of
databases/py-postgresql seem to work as expected.
Please check if this works for your use cases as well. If it is not a
regression, you should also consider submitting the patch upstream as PR.
Thanks in advance for any feedback.
--
You are receiving this mail because:
You are the assignee for the bug.