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: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Bracht Laumann Jespersen
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-03-15 08:06 UTC by Agostino Sarubbo
Modified: 2024-04-19 10:28 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.