Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 May 2023 09:26:42 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 271165] databases/py-postgresql: Fails to build so lib on 14-CURRENT
Message-ID:  <bug-271165-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271165

            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=3D241900&action=
=3Dedit
Fix build of .so lib

On CURRENT the installation process of databases/py-postgresql is broken:

-------------------------
=3D=3D=3D>   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 expressio=
n of
type 'void *' [-Wint-conversion]
        NULL,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
/* 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 expressio=
n of
type 'void *' [-Wint-conversion]
        NULL,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
                /* 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 CURR=
ENT
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271165-7788>