Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 871369

Summary: dev-python/python-axolotl-curve25519-0.4.1_p2-r3 - curve25519module.c: error: incompatible pointer to integer conversion initializ
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: RESOLVED FIXED    
Severity: normal CC: conikost, mgorny, treecleaner
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/tgalal/python-axolotl-curve25519/pull/26
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 870412    
Attachments: emerge-info.txt
dev-python:python-axolotl-curve25519-0.4.1_p2-r2:20220918-113418.log
emerge-history.txt
environment
etc.portage.tar.bz2
temp.tar.bz2

Description Toralf Förster gentoo-dev 2022-09-18 13:16:49 UTC
too long lines were shrinked:

clang -pipe -march=native -fno-diagnostics-color -O2 -D_GLIBCXX_ASSERTIONS -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -Icurve/ed25519/nacl_includes -Icurve/ed25519/additions -Icurve/ed25519 -I/usr/include/python3.10 -c curve/ed25519/sc_muladd.c -o /var/tmp/portage/dev-python/py
clang -pipe -march=native -fno-diagnostics-color -O2 -D_GLIBCXX_ASSERTIONS -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -Icurve/ed25519/nacl_includes -Icurve/ed25519/additions -Icurve/ed25519 -I/usr/include/python3.10 -c curve/ed25519/sc_reduce.c -o /var/tmp/portage/dev-python/py
clang -pipe -march=native -fno-diagnostics-color -O2 -D_GLIBCXX_ASSERTIONS -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -Icurve/ed25519/nacl_includes -Icurve/ed25519/additions -Icurve/ed25519 -I/usr/include/python3.10 -c curve/ed25519/sign.c -o /var/tmp/portage/dev-python/python-
clang -pipe -march=native -fno-diagnostics-color -O2 -D_GLIBCXX_ASSERTIONS -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -Icurve/ed25519/nacl_includes -Icurve/ed25519/additions -Icurve/ed25519 -I/usr/include/python3.10 -c curve25519module.c -o /var/tmp/portage/dev-python/python-ax
curve25519module.c:161:9: error: incompatible pointer to integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of type 'void *' [-Wint-conversion]
        NULL,
        ^~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-j4-20220917-070004

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
clang version 15.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
/usr/lib/llvm/15
15.0.0
Python 3.10.7
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-bin-1.63.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.16.1_p1 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.4.1_p1 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.345_p01 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
GNU Make 4.3

  HEAD of ::gentoo
commit e8176b4c385fc022aa4f3bd9744cd6ec4632c400
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Sep 18 11:16:47 2022 +0000

    2022-09-18 11:16:46 UTC

emerge -qpvO dev-python/python-axolotl-curve25519
[ebuild  N    ] dev-python/python-axolotl-curve25519-0.4.1_p2-r2  PYTHON_TARGETS="python3_10 -python3_8 -python3_9"
Comment 1 Toralf Förster gentoo-dev 2022-09-18 13:16:50 UTC
Created attachment 811228 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-09-18 13:16:51 UTC
Created attachment 811231 [details]
dev-python:python-axolotl-curve25519-0.4.1_p2-r2:20220918-113418.log
Comment 3 Toralf Förster gentoo-dev 2022-09-18 13:16:52 UTC
Created attachment 811234 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2022-09-18 13:16:54 UTC
Created attachment 811237 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-09-18 13:16:55 UTC
Created attachment 811240 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-09-18 13:16:56 UTC
Created attachment 811243 [details]
temp.tar.bz2
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-11-27 16:53:46 UTC
Ping.
Comment 8 Conrad Kostecki gentoo-dev 2022-11-27 21:11:46 UTC
This will have to wait. I am currently very busy and moving to a new home.
Comment 9 Agostino Sarubbo gentoo-dev 2022-12-02 06:53:37 UTC
clang-stricter_tinderbox has reproduced this issue with version 0.4.1_p2-r3 - Updating summary.
Comment 10 Larry the Git Cow gentoo-dev 2022-12-02 10:02:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d93a77c89ebcf55f3673236941668b8f990b337

commit 5d93a77c89ebcf55f3673236941668b8f990b337
Author:     Hanno Böck <hanno@gentoo.org>
AuthorDate: 2022-12-02 10:00:27 +0000
Commit:     Hanno Böck <hanno@gentoo.org>
CommitDate: 2022-12-02 10:02:13 +0000

    dev-python/python-axolotl-curve25519: Fix compilation with clang.
    
    This fixes an invalid type in the python module struct. Also
    sent upstream.
    
    Closes: https://bugs.gentoo.org/871369
    Signed-off-by: Hanno Böck <hanno@gentoo.org>

 .../files/python-axolotl-curve25519-fix-type.patch        | 15 +++++++++++++++
 .../python-axolotl-curve25519-0.4.1_p2-r3.ebuild          |  2 ++
 2 files changed, 17 insertions(+)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 05:32:30 UTC
This is an example of a build-time fix which needs a new revision: https://github.com/gentoo/devmanual/commit/2b94b64306230dc3595150c5bba87ec0763d93a3.
Comment 12 Larry the Git Cow gentoo-dev 2022-12-04 14:34:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a41530c6042720c1f05c9836fbfc0446ea533f6d

commit a41530c6042720c1f05c9836fbfc0446ea533f6d
Author:     Conrad Kostecki <conikost@gentoo.org>
AuthorDate: 2022-12-04 14:25:33 +0000
Commit:     Conrad Kostecki <conikost@gentoo.org>
CommitDate: 2022-12-04 14:25:33 +0000

    dev-python/python-axolotl-curve25519: force revbump
    
    Bug: https://bugs.gentoo.org/871369
    Signed-off-by: Conrad Kostecki <conikost@gentoo.org>

 ...19-0.4.1_p2-r3.ebuild => python-axolotl-curve25519-0.4.1_p2-r4.ebuild} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
Comment 13 Hanno Böck gentoo-dev 2022-12-04 14:45:28 UTC
Not that it matters a whole lot, but does anyone want to explain why a fix like this needs a revbump?

It's a pure compile time issue, 0 and NULL are the same on the binary level.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-05 11:25:12 UTC
It's fine for 0/null, it's not fine for others, but it's a lot easier for bits like this to just revbump and find out immediately if there's some problem caused by it.

That is, you can often have things which are build-time only fixes but if you slip in the patch, you're not going to find out if there's some problem caused by it (like other people for some crazy reason not being able to build because of it).

(But in general, -Wint-conversion does need one, it's just that 0/null is a special case, and it's better to just not overthink it when it's so cheap.)