Bug#1148010: pandas: FTBFS on powerpc - skiprows callable always receives 0
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Wed Sep 16 08:58:50 BST 2026
Hi Trupti,
On Wed, 2026-09-16 at 13:01 +0530, Trupti wrote:
> Suggested Fix:
>
> Use "L" (long long, 64-bit) with explicit cast:
>
> --- a/pandas/_libs/src/parser/tokenizer.c
> +++ b/pandas/_libs/src/parser/tokenizer.c
> @@ -647,7 +647,7 @@ static int skip_this_line(parser_t *self, int64_t
> rownum) {
> if (self->skipfunc != NULL) {
> PyGILState_STATE state = PyGILState_Ensure();
> - PyObject *result = PyObject_CallFunction(self->skipfunc, "i",
> rownum);
> + PyObject *result = PyObject_CallFunction(self->skipfunc, "L", (long
> long)rownum);
>
>
> Verification:
>
>
> After applying this patch pandas built successfully on debian powerpc
> with sbuild on ppc64 machine.
> powerpc: 8 failures -> 0 failures with patch
>
>
> Adrian, is this the correct approach? Do you have any suggestions before
> I move forward?
What about explicitly declaring "rownum" as long long in order to avoid
the cast?
int64_t rownum;
PyObject *result = PyObject_CallFunction(self->skipfunc, "L", rownum);
Either way, I suggest you send the pull request upstream and see what
they prefer.
Thanks a lot for fixing this!
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the debian-science-maintainers
mailing list