Bug 2259172 - perl-Tk-804.036-12.fc40 FTBFS: objGlue.c: In function ‘Tcl_GetByteArrayFromObj’: /usr/lib64/perl5/CORE/sv.h:1952:31: error: passing argument 3 of ‘Perl_SvPV_helper’ from incompatible pointer type
Summary: perl-Tk-804.036-12.fc40 FTBFS: objGlue.c: In function ‘Tcl_GetByteArrayFromOb...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Tk
Version: 40
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F40FTBFS
TreeView+ depends on / blocked
 
Reported: 2024-01-19 09:53 UTC by Petr Pisar
Modified: 2024-03-23 00:28 UTC (History)
4 users (show)

Fixed In Version: perl-Tk-804.036-15.fc41 perl-Tk-804.036-15.fc40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-03-23 00:28:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2024-01-19 09:53:37 UTC
perl-Tk-804.036-12.fc40 fails to build in Fedora 40:

gcc -c  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    objGlue.c
[...]
In file included from /usr/lib64/perl5/CORE/perl.h:4530:
objGlue.c: In function ‘Tcl_GetByteArrayFromObj’:
/usr/lib64/perl5/CORE/sv.h:1952:31: error: passing argument 3 of ‘Perl_SvPV_helper’ from incompatible pointer type [-Wincompatible-pointer-types]
 1952 |    Perl_SvPV_helper(aTHX_ sv, &len, flags, SvPVnormal_type_,                \
/usr/lib64/perl5/CORE/sv.h:1972:37: note: in expansion of macro ‘SvPV_flags’
 1972 | #define SvPV(sv, len)               SvPV_flags(sv, len, SV_GMAGIC)
      |                                     ^~~~~~~~~~
objGlue.c:630:29: note: in expansion of macro ‘SvPV’
  630 |    return (unsigned char *) SvPV(objPtr, *lengthPtr);
      |                             ^~~~

A difference between passing and failing build roots is at <https://koschei.fedoraproject.org/build/17075303>. This failure is probably triggered by upgrading gcc from 13.2.1-6.fc40 to 14.0.1-0.1.fc40.

Comment 1 Neil Hanlon 2024-02-10 21:35:19 UTC
I poked at this for a while -- the error I'm seeing now related to some Xlib issue:

```
In file included from Xlib_f.c:17:
Xlib.t:334:1: warning: ‘XKeycodeToKeysym’ is deprecated [-Wdeprecated-declarations]
  334 | VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
      | ^~~~~
In file included from Xlib_f.c:4:
/usr/include/X11/Xlib.h:1687:15: note: declared here
 1687 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
Xlib.t:334:14: error: initialization of ‘KeySym (*)(Display *, unsigned int,  int)’ {aka ‘long unsigned int (*)(Display *, unsigned int,  int)’} from incompatible pointer type ‘KeySym (*)(Display *, KeyCode,  int)’ {aka ‘long unsigned int (*)(Display *, unsigned char,  int)’} [-Wincompatible-pointer-types]
  334 | VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
      |              ^~~~~~~~~~~~~~~~
Xlib_f.c:15:35: note: in definition of macro ‘VFUNC’
   15 | #define VFUNC(type,name,mem,args) name,
      |                                   ^~~~
Xlib.t:334:14: note: (near initialization for ‘XlibVtable.V_XKeycodeToKeysym’)
  334 | VFUNC(KeySym,XKeycodeToKeysym,V_XKeycodeToKeysym,_ANSI_ARGS_((Display *, unsigned int, int)))
      |              ^~~~~~~~~~~~~~~~
Xlib_f.c:15:35: note: in definition of macro ‘VFUNC’
   15 | #define VFUNC(type,name,mem,args) name,
      |                                   ^~~~
make[1]: *** [Makefile:861: Xlib_f.o] Error 1
```

I did find https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271521 which seems similar, but that patch only reveals other errors for the Fedora build (I think). I also tried changing it to an unsigned char, as it suggests, but this causes issues elsewhere due to that assertion.

Comment 2 Aoife Moloney 2024-02-15 23:10:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 3 Fedora Update System 2024-03-05 13:08:40 UTC
FEDORA-2024-dd6041feab (perl-Tk-804.036-15.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-dd6041feab

Comment 4 Fedora Update System 2024-03-06 02:11:20 UTC
FEDORA-2024-dd6041feab has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-dd6041feab`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-dd6041feab

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2024-03-23 00:28:46 UTC
FEDORA-2024-dd6041feab (perl-Tk-804.036-15.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.