Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927058 - dev-python/tlsh-4.8.2 fails to compile: tlshmodule.cpp:330:1: error: cannot convert std::nullptr_t to Py_ssize_t {aka long int} in initialization
Summary: dev-python/tlsh-4.8.2 fails to compile: tlshmodule.cpp:330:1: error: cannot c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Thomas Bracht Laumann Jespersen
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-03-15 08:06 UTC by Agostino Sarubbo
Modified: 2024-06-02 00:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,52.67 KB, text/plain)
2024-03-15 08:06 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-03-15 08:06:08 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/tlsh-4.8.2 fails to compile.
Discovered on: amd64 (internal ref: tinderbox_musl)
System: MUSL-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#MUSL)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-03-15 08:06:09 UTC
Created attachment 887668 [details]
build.log

build log and emerge --info
Comment 2 Thomas Bracht Laumann Jespersen 2024-04-19 05:16:44 UTC
gcc 13 produces a warning that looks like the same issue:

gcc -fno-strict-overflow -Wsign-compare -O2 -march=x86-64 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -UNDEBUG -I/usr/include/python3.12 -c tlshmodule.cpp -o tlshmodule.o

tlshmodule.cpp:353:1: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
  353 | };
      | ^

I tried to figure out which fields in the PyTypeObject struct need to be set to 0, but the ones I could identify appear to be set properly already. I'm unsure which field is causing the issue.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-19 05:19:23 UTC
Check out https://github.com/breezy-team/patiencediff/pull/14 as an example and the docs I link to there.

Note that C++ doesn't have designated initialisers (or didn't until C++20, rather) so it's a bit annoying there.
Comment 4 Larry the Git Cow gentoo-dev 2024-06-02 00:41:38 UTC
The bug has been closed via the following commit(s):

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

commit 0831a84172d0ee0499070a8c1212ef9780197b1f
Author:     Thomas Bracht Laumann Jespersen <t@laumann.xyz>
AuthorDate: 2024-04-19 10:18:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-02 00:38:30 +0000

    dev-python/tlsh: fix build for python 3.12 + musl
    
    Closes: https://bugs.gentoo.org/927058
    Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
    Closes: https://github.com/gentoo/gentoo/pull/36321
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/tlsh/Manifest                        |  1 +
 dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch | 25 +++++++++++++++++++++
 dev-python/tlsh/tlsh-4.8.2-r1.ebuild            | 30 +++++++++++++++++++++++++
 3 files changed, 56 insertions(+)