Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

804.036 + master (f0bb386b): build fails #98

Open
kloczek opened this issue Feb 7, 2024 · 6 comments
Open

804.036 + master (f0bb386b): build fails #98

kloczek opened this issue Feb 7, 2024 · 6 comments

Comments

@kloczek
Copy link

kloczek commented Feb 7, 2024

gcc 14 glibc snapshot from Fedora rawhide.All build with -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS in $CFLAGS (this changes some warnings to eerors)

Build fails with
[tkloczko@pers-jacek Tk-804.036]$ make -k
cd pTk && make DEFINE="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="" PREFIX="/usr" PASTHRU_DEFINE=' ' PASTHRU_INC=' -I/usr/include/freetype2 '
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pTk'
/usr/bin/gcc -c -I/usr/include/freetype2  -I..  -I/usr/include/freetype2 -I. -Ibitmaps  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    tkEvent.c
tkEvent.c: In function ‘TkCurrentTime’:
tkEvent.c:1154:1: error: type of ‘fallbackCurrent’ defaults to ‘int’ [-Wimplicit-int]
 1154 | TkCurrentTime(dispPtr, fallbackCurrent)
      | ^~~~~~~~~~~~~
tkEvent.c: In function ‘Tk_QueueWindowEvent’:
tkEvent.c:1326:91: warning: pointer targets in passing argument 9 of ‘XQueryPointer’ differ in signedness [-Wpointer-sign]
 1326 |       if (!XQueryPointer(eventPtr->xany.display, root, &root, &child, &rx, &ry, &wx, &wy, &mask) || child == None)
      |                                                                                           ^~~~~
      |                                                                                           |
      |                                                                                           int *
In file included from tkUnixPort.h:91,
                 from tkPort.h:48,
                 from tkEvent.c:17:
/usr/include/X11/Xlib.h:3006:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
 3006 |     unsigned int*       /* mask_return */
      |     ^~~~~~~~~~~~~
make[1]: *** [Makefile:865: tkEvent.o] Error 1
/usr/bin/gcc -c -I/usr/include/freetype2  -I..  -I/usr/include/freetype2 -I. -Ibitmaps  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    tkImage.c
tkImage.c: In function ‘TileImageChanged’:
tkImage.c:1080:1: error: type of ‘imgWidth’ defaults to ‘int’ [-Wimplicit-int]
 1080 | TileImageChanged(clientData, x, y, width, height, imgWidth, imgHeight)
      | ^~~~~~~~~~~~~~~~
tkImage.c:1080:1: error: type of ‘imgHeight’ defaults to ‘int’ [-Wimplicit-int]
make[1]: *** [Makefile:865: tkImage.o] Error 1
make[1]: Target 'makemakerdflt' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pTk'
make: *** [Makefile:1627: pTk/libpTk.a] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pTk'
/usr/bin/gcc -c -I/usr/include/freetype2  -I..  -I/usr/include/freetype2 -I. -Ibitmaps  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    tkEvent.c
tkEvent.c: In function ‘TkCurrentTime’:
tkEvent.c:1154:1: error: type of ‘fallbackCurrent’ defaults to ‘int’ [-Wimplicit-int]
 1154 | TkCurrentTime(dispPtr, fallbackCurrent)
      | ^~~~~~~~~~~~~
tkEvent.c: In function ‘Tk_QueueWindowEvent’:
tkEvent.c:1326:91: warning: pointer targets in passing argument 9 of ‘XQueryPointer’ differ in signedness [-Wpointer-sign]
 1326 |       if (!XQueryPointer(eventPtr->xany.display, root, &root, &child, &rx, &ry, &wx, &wy, &mask) || child == None)
      |                                                                                           ^~~~~
      |                                                                                           |
      |                                                                                           int *
In file included from tkUnixPort.h:91,
                 from tkPort.h:48,
                 from tkEvent.c:17:
/usr/include/X11/Xlib.h:3006:5: note: expected ‘unsigned int *’ but argument is of type ‘int *’
 3006 |     unsigned int*       /* mask_return */
      |     ^~~~~~~~~~~~~
make[1]: *** [Makefile:865: tkEvent.o] Error 1
/usr/bin/gcc -c -I/usr/include/freetype2  -I..  -I/usr/include/freetype2 -I. -Ibitmaps  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    tkImage.c
tkImage.c: In function ‘TileImageChanged’:
tkImage.c:1080:1: error: type of ‘imgWidth’ defaults to ‘int’ [-Wimplicit-int]
 1080 | TileImageChanged(clientData, x, y, width, height, imgWidth, imgHeight)
      | ^~~~~~~~~~~~~~~~
tkImage.c:1080:1: error: type of ‘imgHeight’ defaults to ‘int’ [-Wimplicit-int]
make[1]: *** [Makefile:865: tkImage.o] Error 1
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pTk'
make: *** [Makefile:731: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pod'
Manifying 50 pod documents
Manifying 51 pod documents
Manifying 2 pod documents
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/pod'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/demos'
Manifying 1 pod document
Manifying 2 pod documents
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/demos'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Xlib'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Xlib/X'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- X.bs ../../blib/arch/auto/Tk/X/X.bs 644
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Xlib/X'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Xlib.bs ../blib/arch/auto/Tk/Xlib/Xlib.bs 644
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Xlib'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/WinPhoto'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- WinPhoto.bs ../blib/arch/auto/Tk/WinPhoto/WinPhoto.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/WinPhoto'
make: *** [Makefile:743: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Tixish'
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Tixish'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TixPixmap'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pixmap.bs ../blib/arch/auto/Tk/Pixmap/Pixmap.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TixPixmap'
make: *** [Makefile:749: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TixGrid'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- TixGrid.bs ../blib/arch/auto/Tk/TixGrid/TixGrid.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TixGrid'
make: *** [Makefile:752: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TextList'
Manifying 1 pod document
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TextList'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Text'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Text.bs ../blib/arch/auto/Tk/Text/Text.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Text'
make: *** [Makefile:758: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TList'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- TList.bs ../blib/arch/auto/Tk/TList/TList.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/TList'
make: *** [Makefile:761: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Scrollbar'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scrollbar.bs ../blib/arch/auto/Tk/Scrollbar/Scrollbar.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Scrollbar'
make: *** [Makefile:764: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Scale'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scale.bs ../blib/arch/auto/Tk/Scale/Scale.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Scale'
make: *** [Makefile:767: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/NBFrame'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- NBFrame.bs ../blib/arch/auto/Tk/NBFrame/NBFrame.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/NBFrame'
make: *** [Makefile:770: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Mwm'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Mwm.bs ../blib/arch/auto/Tk/Mwm/Mwm.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Mwm'
make: *** [Makefile:773: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Menubutton'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Menubutton.bs ../blib/arch/auto/Tk/Menubutton/Menubutton.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Menubutton'
make: *** [Makefile:776: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Listbox'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Listbox.bs ../blib/arch/auto/Tk/Listbox/Listbox.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Listbox'
make: *** [Makefile:779: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/JPEG'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- JPEG.bs ../blib/arch/auto/Tk/JPEG/JPEG.bs 644
Manifying 1 pod document
Manifying 1 pod document
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/JPEG'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/InputO'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- InputO.bs ../blib/arch/auto/Tk/InputO/InputO.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/InputO'
make: *** [Makefile:785: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/IO'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- IO.bs ../blib/arch/auto/Tk/IO/IO.bs 644
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/IO'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/HList'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- HList.bs ../blib/arch/auto/Tk/HList/HList.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/HList'
make: *** [Makefile:791: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Event'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Event.bs ../blib/arch/auto/Tk/Event/Event.bs 644
/usr/bin/gcc -c -I/usr/include/freetype2  -I..  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    Event.c
Event.xs: In function ‘TkPerlIO_debug’:
Event.xs:654:6: warning: unused variable ‘ofd’ [-Wunused-variable]
  654 |  int ofd    = (op) ? PerlIO_fileno(op) : -1;
      |      ^~~
Event.xs:653:6: warning: unused variable ‘ifd’ [-Wunused-variable]
  653 |  int ifd    = (ip) ? PerlIO_fileno(ip) : -1;
      |      ^~~
Event.xs: In function ‘PerlIO_handler’:
Event.xs:926:9: warning: unused variable ‘len’ [-Wunused-variable]
  926 |  STRLEN len;
      |         ^~~
Event.xs: In function ‘XS_Tk__Callback_Call’:
Event.xs:1154:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1154 |  int wantarray = GIMME;
      |  ^~~
In file included from /usr/lib64/perl5/CORE/perl.h:6188,
                 from Event.xs:8:
/usr/lib64/perl5/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
Event.xs:1171:2: warning: ‘Perl_dowantarray’ is deprecated [-Wdeprecated-declarations]
 1171 |  count = LangCallCallback(cb,GIMME|G_EVAL);
      |  ^~~~~
/usr/lib64/perl5/CORE/proto.h:1019:1: note: declared here
 1019 | Perl_dowantarray(pTHX)
      | ^~~~~~~~~~~~~~~~
Event.xs:1149:9: warning: unused variable ‘na’ [-Wunused-variable]
 1149 |  STRLEN na;
      |         ^~
In file included from Event.xs:9:
Event.xs: In function ‘XS_Tk__Event_INIT’:
/usr/lib64/perl5/CORE/XSUB.h:166:20: warning: unused variable ‘items’ [-Wunused-variable]
  166 | #define dITEMS I32 items = (I32)(SP - MARK)
      |                    ^~~~~
/usr/lib64/perl5/CORE/XSUB.h:169:23: note: in expansion of macro ‘dITEMS’
  169 |         dSP; dAXMARK; dITEMS
      |                       ^~~~~~
Event.xs:1235:2: note: in expansion of macro ‘dXSARGS’
 1235 |  dXSARGS;
      |  ^~~~~~~
Event.c: In function ‘XS_Tk__Event__Source_setup’:
Event.c:1892:17: warning: unused variable ‘flags’ [-Wunused-variable]
 1892 |         int     flags = (int)SvIV(ST(1))
      |                 ^~~~~
Event.c:1890:17: warning: unused variable ‘obj’ [-Wunused-variable]
 1890 |         SV *    obj = ST(0)
      |                 ^~~
Event.c: In function ‘XS_Tk__Event__Source_check’:
Event.c:1910:17: warning: unused variable ‘flags’ [-Wunused-variable]
 1910 |         int     flags = (int)SvIV(ST(1))
      |                 ^~~~~
Event.c:1908:17: warning: unused variable ‘obj’ [-Wunused-variable]
 1908 |         SV *    obj = ST(0)
      |                 ^~~
In file included from /usr/lib64/perl5/CORE/perl.h:6196:
Event.xs: In function ‘boot_Tk__Event’:
/usr/lib64/perl5/CORE/embedvar.h:61:49: error: initialization of ‘SV *’ {aka ‘struct sv *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
   61 | # define PL_curcop                              (vTHX->Icurcop)
      |                                                 ^
Event.xs:1535:18: note: in expansion of macro ‘PL_curcop’
 1535 |   SV *old_warn = PL_curcop->cop_warnings;
      |                  ^~~~~~~~~
Event.xs:1540:26: error: assignment to ‘char *’ from incompatible pointer type ‘SV *’ {aka ‘struct sv *’} [-Wincompatible-pointer-types]
 1540 |  PL_curcop->cop_warnings = old_warn;
      |                          ^
Event.xs: At top level:
Event.xs:1117:13: warning: ‘seen’ defined but not used [-Wunused-variable]
 1117 | static char seen[NSIG];
      |             ^~~~
Event.xs:1084:1: warning: ‘EventProc’ defined but not used [-Wunused-function]
 1084 | EventProc(evPtr, flags)
      | ^~~~~~~~~
make[1]: *** [Makefile:350: Event.o] Error 1
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Event'
make: *** [Makefile:794: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Entry'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Entry.bs ../blib/arch/auto/Tk/Entry/Entry.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Entry'
make: *** [Makefile:797: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/DragDrop'
Manifying 3 pod documents
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/DragDrop'
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Compound'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Compound.bs ../blib/arch/auto/Tk/Compound/Compound.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Compound'
make: *** [Makefile:803: subdirs] Error 2
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Canvas'
make[1]: *** No rule to make target '../pTk/libpTk.a', needed by 'subdirs'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Canvas.bs ../blib/arch/auto/Tk/Canvas/Canvas.bs 644
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Tk-804.036/Canvas'
make: *** [Makefile:806: subdirs] Error 2
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Tk.bs blib/arch/auto/Tk/Tk.bs 644
/usr/bin/gcc -c  -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g -grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64    -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib64/perl5/CORE"    tkGlue.c
tkGlue.c:56:25: warning: "/*" within comment [-Wcomment]
   56 | /* #define DEBUG_REFCNT /* */
tkGlue.c: In function ‘LangNull’:
tkGlue.c:315:9: warning: unused variable ‘len’ [-Wunused-variable]
  315 |  STRLEN len = 0;
      |         ^~~
tkGlue.c: In function ‘InterpHv’:
tkGlue.c:524:11: warning: unused variable ‘na’ [-Wunused-variable]
  524 |    STRLEN na;
      |           ^~
tkGlue.c: In function ‘FindXv’:
tkGlue.c:490:24: warning: statement with no effect [-Wunused-value]
  490 | #define TagIt(sv,type) (sv)
      |                        ^
tkGlue.c:573:8: note: in expansion of macro ‘TagIt’
  573 |        TagIt(sv,key);
      |        ^~~~~
tkGlue.c: In function ‘Tcl_CallWhenDeleted’:
tkGlue.c:731:6: warning: unused variable ‘hv’ [-Wunused-variable]
  731 |  HV *hv = InterpHv(interp,1);
      |      ^~
In file included from tkGlue.c:9:
tkGlue.c: In function ‘XS_Tk__Interp_DESTROY’:
/usr/lib64/perl5/CORE/XSUB.h:166:20: warning: unused variable ‘items’ [-Wunused-variable]
  166 | #define dITEMS I32 items = (I32)(SP - MARK)
      |                    ^~~~~
/usr/lib64/perl5/CORE/XSUB.h:169:23: note: in expansion of macro ‘dITEMS’
  169 |         dSP; dAXMARK; dITEMS
      |                       ^~~~~~
tkGlue.c:739:2: note: in expansion of macro ‘dXSARGS’
  739 |  dXSARGS;
      |  ^~~~~~~
tkGlue.c: In function ‘Lang_DeadMainWindow’:
tkGlue.c:833:9: warning: unused variable ‘na’ [-Wunused-variable]
  833 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘TkGlue_mgFree’:
tkGlue.c:886:9: warning: unused variable ‘na’ [-Wunused-variable]
  886 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘LangFontObj’:
tkGlue.c:1453:14: warning: unused variable ‘tkwin’ [-Wunused-variable]
 1453 |    Tk_Window tkwin = Tk_MainWindow(interp);
      |              ^~~~~
tkGlue.c:1441:9: warning: unused variable ‘na’ [-Wunused-variable]
 1441 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘Font_DESTROY’:
tkGlue.c:1473:9: warning: unused variable ‘na’ [-Wunused-variable]
 1473 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘Tcl_AddErrorInfo’:
tkGlue.c:1505:8: warning: unused variable ‘sv’ [-Wunused-variable]
 1505 |    SV *sv;
      |        ^~
tkGlue.c: In function ‘PushObjCallbackArgs’:
tkGlue.c:1713:24: warning: unused variable ‘count’ [-Wunused-variable]
 1713 |                    int count = LangCallCallback(arg,G_ARRAY|G_EVAL);
      |                        ^~~~~
In file included from /usr/lib64/perl5/CORE/perl.h:6168,
                 from tkGlue.c:8:
tkGlue.c: In function ‘PushCallbackArgs’:
/usr/lib64/perl5/CORE/pp.h:91:30: warning: unused variable ‘sp’ [-Wunused-variable]
   91 | #define dSP             SV **sp = PL_stack_sp
      |                              ^~
tkGlue.c:1769:2: note: in expansion of macro ‘dSP’
 1769 |  dSP;
      |  ^~~
tkGlue.c: In function ‘Tcl_BackgroundError’:
tkGlue.c:2020:12: warning: statement with no effect [-Wunused-value]
 2020 |      TagIt((SV *) av, "Tcl_BackgroundError");
      |            ^
tkGlue.c:490:25: note: in definition of macro ‘TagIt’
  490 | #define TagIt(sv,type) (sv)
      |                         ^~
tkGlue.c: In function ‘Tk_CheckHash’:
tkGlue.c:2191:14: warning: unused variable ‘len’ [-Wunused-variable]
 2191 |          I32 len;
      |              ^~~
tkGlue.c:2163:7: warning: unused variable ‘svp’ [-Wunused-variable]
 2163 |  SV **svp;
      |       ^~~
tkGlue.c: In function ‘SelGetProc’:
tkGlue.c:2454:18: warning: unused variable ‘strType’ [-Wunused-variable]
 2454 |      const char *strType = Tk_GetAtomName(tkwin, type);
      |                  ^~~~~~~
tkGlue.c: In function ‘XSTkCommand’:
tkGlue.c:3015:9: warning: unused variable ‘na’ [-Wunused-variable]
 3015 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘XStoNoWindow’:
tkGlue.c:3069:7: warning: unused variable ‘x’ [-Wunused-variable]
 3069 |  SV **x  ;
      |       ^
tkGlue.c:3066:6: warning: variable ‘cm’ set but not used [-Wunused-but-set-variable]
 3066 |  HV *cm;
      |      ^~
tkGlue.c: In function ‘LangDeadWindow’:
tkGlue.c:3187:9: warning: unused variable ‘na’ [-Wunused-variable]
 3187 |  STRLEN na;
      |         ^~
tkGlue.c: In function ‘Lang_CreateWidget’:
tkGlue.c:3316:6: warning: unused variable ‘tmp’ [-Wunused-variable]
 3316 |  SV *tmp;
      |      ^~~
tkGlue.c: In function ‘Tcl_CreateObjCommand’:
tkGlue.c:3465:10: warning: unused variable ‘hv’ [-Wunused-variable]
 3465 |      HV *hv = InterpHv(interp,1);
      |          ^~
tkGlue.c:3409:10: warning: variable ‘kind’ set but not used [-Wunused-but-set-variable]
 3409 |    char *kind = "NULL";
      |          ^~~~
tkGlue.c:3408:8: warning: unused variable ‘cv’ [-Wunused-variable]
 3408 |    CV *cv;
      |        ^~
tkGlue.c: In function ‘Perl_Value’:
tkGlue.c:3698:8: warning: unused variable ‘result’ [-Wunused-variable]
 3698 |  char *result;
      |        ^~~~~~
tkGlue.c:3697:16: warning: unused variable ‘p’ [-Wunused-variable]
 3697 |  Tk_TraceInfo *p = INT2PTR(Tk_TraceInfo *, ix);
      |                ^
tkGlue.c: In function ‘Lang_TraceVar2’:
tkGlue.c:3878:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 3878 |    mg->mg_virtual = &PL_vtbl_uvar;
      |                   ^
tkGlue.c:3805:6: warning: unused variable ‘exiting’ [-Wunused-variable]
 3805 |  SV *exiting;
      |      ^~~~~~~
tkGlue.c: In function ‘LangClientMessage’:
/usr/lib64/perl5/CORE/pp.h:91:30: warning: unused variable ‘sp’ [-Wunused-variable]
   91 | #define dSP             SV **sp = PL_stack_sp
      |                              ^~
tkGlue.c:4602:6: note: in expansion of macro ‘dSP’
 4602 |      dSP;
      |      ^~~
tkGlue.c: In function ‘LangEventCallback’:
tkGlue.c:4679:8: warning: unused variable ‘code’ [-Wunused-variable]
 4679 |    int code;
      |        ^~~~
tkGlue.c: In function ‘handle_idle’:
tkGlue.c:4903:6: warning: unused variable ‘count’ [-Wunused-variable]
 4903 |  int count = 0;
      |      ^~~~~
/usr/lib64/perl5/CORE/pp.h:91:30: warning: unused variable ‘sp’ [-Wunused-variable]
   91 | #define dSP             SV **sp = PL_stack_sp
      |                              ^~
tkGlue.c:4902:2: note: in expansion of macro ‘dSP’
 4902 |  dSP;
      |  ^~~
In file included from /usr/lib64/perl5/CORE/perl.h:6227:
tkGlue.c: In function ‘XEvent_Info’:
tkGlue.c:5023:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 5023 |         sv_setref_pv(eventSv, "DisplayPtr", (void *) number);
      |                                             ^
/usr/lib64/perl5/CORE/embed.h:701:77: note: in definition of macro ‘sv_setref_pv’
  701 | # define sv_setref_pv(a,b,c)                    Perl_sv_setref_pv(aTHX_ a,b,c)
      |                                                                             ^
tkGlue.c: In function ‘Tcl_TranslateFileName’:
tkGlue.c:5103:5: warning: unused variable ‘count’ [-Wunused-variable]
 5103 |  IV count;
      |     ^~~~~
tkGlue.c: In function ‘do_comp’:
tkGlue.c:5262:46: error: macro "pregcomp" passed 3 arguments, but takes just 2
 5262 |  p->pat = pregcomp(string,string+len,p->flags);
      |                                              ^
/usr/lib64/perl5/CORE/embed.h:498:10: note: macro "pregcomp" defined here
  498 | # define pregcomp(a,b)                          Perl_pregcomp(aTHX_ a,b)
      |          ^~~~~~~~
tkGlue.c:5262:11: error: ‘pregcomp’ undeclared (first use in this function); did you mean ‘regcomp_t’?
 5262 |  p->pat = pregcomp(string,string+len,p->flags);
      |           ^~~~~~~~
      |           regcomp_t
tkGlue.c:5262:11: note: each undeclared identifier is reported only once for each function it appears in
tkGlue.c:5256:8: warning: unused variable ‘string’ [-Wunused-variable]
 5256 |  char *string = Tcl_GetStringFromObj(p->source,&len);
      |        ^~~~~~
tkGlue.c: In function ‘XS_Tk_INIT’:
/usr/lib64/perl5/CORE/XSUB.h:166:20: warning: unused variable ‘items’ [-Wunused-variable]
  166 | #define dITEMS I32 items = (I32)(SP - MARK)
      |                    ^~~~~
/usr/lib64/perl5/CORE/XSUB.h:169:23: note: in expansion of macro ‘dITEMS’
  169 |         dSP; dAXMARK; dITEMS
      |                       ^~~~~~
tkGlue.c:5532:2: note: in expansion of macro ‘dXSARGS’
 5532 |  dXSARGS;
      |  ^~~~~~~
In file included from /usr/lib64/perl5/CORE/perl.h:6196:
tkGlue.c: In function ‘Boot_Glue’:
/usr/lib64/perl5/CORE/embedvar.h:61:49: error: initialization of ‘STRLEN *’ {aka ‘long unsigned int *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
   61 | # define PL_curcop                              (vTHX->Icurcop)
      |                                                 ^
tkGlue.c:5552:31: note: in expansion of macro ‘PL_curcop’
 5552 |  COP_WARNINGS_TYPE old_warn = PL_curcop->cop_warnings;
      |                               ^~~~~~~~~
tkGlue.c:5560:26: error: assignment to ‘char *’ from incompatible pointer type ‘STRLEN *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types]
 5560 |  PL_curcop->cop_warnings = old_warn;
      |                          ^
tkGlue.c:5545:6: warning: variable ‘cv’ set but not used [-Wunused-but-set-variable]
 5545 |  CV *cv;
      |      ^~
tkGlue.c:5543:8: warning: unused variable ‘XEventMethods’ [-Wunused-variable]
 5543 |  char *XEventMethods = "abcdfhkmopstvwxyABDEKNRSTWXY#";
      |        ^~~~~~~~~~~~~
/usr/lib64/perl5/CORE/pp.h:91:30: warning: unused variable ‘sp’ [-Wunused-variable]
   91 | #define dSP             SV **sp = PL_stack_sp
      |                              ^~
tkGlue.c:5541:2: note: in expansion of macro ‘dSP’
 5541 |  dSP;
      |  ^~~
tkGlue.c: At top level:
tkGlue.c:118:12: warning: ‘my_watch’ defined but not used [-Wunused-variable]
  118 | static SV *my_watch;
      |            ^~~~~~~~
tkGlue.c:117:12: warning: ‘ec’ defined but not used [-Wunused-variable]
  117 | static I32 ec = 0;
      |            ^~
make: *** [Makefile:484: tkGlue.o] Error 1
make: Target 'makemakerdflt' not remade because of errors.
@chrstphrchvz
Copy link
Contributor

chrstphrchvz commented Feb 14, 2024

tkEvent.c: In function ‘TkCurrentTime’:
tkEvent.c:1154:1: error: type of ‘fallbackCurrent’ defaults to ‘int’ [-Wimplicit-int]
 1154 | TkCurrentTime(dispPtr, fallbackCurrent)
      | ^~~~~~~~~~~~~
tkImage.c: In function ‘TileImageChanged’:
tkImage.c:1080:1: error: type of ‘imgWidth’ defaults to ‘int’ [-Wimplicit-int]
 1080 | TileImageChanged(clientData, x, y, width, height, imgWidth, imgHeight)
      | ^~~~~~~~~~~~~~~~
tkImage.c:1080:1: error: type of ‘imgHeight’ defaults to ‘int’ [-Wimplicit-int]

#91 proposed a solution for these implicit int errors. I am not aware if someone has already proposed a solution for the remaining errors, though.

@chrstphrchvz
Copy link
Contributor

chrstphrchvz commented Feb 14, 2024

tkGlue.c: In function ‘do_comp’:
tkGlue.c:5262:46: error: macro "pregcomp" passed 3 arguments, but takes just 2
 5262 |  p->pat = pregcomp(string,string+len,p->flags);
      |                                              ^
/usr/lib64/perl5/CORE/embed.h:498:10: note: macro "pregcomp" defined here
  498 | # define pregcomp(a,b)                          Perl_pregcomp(aTHX_ a,b)
      |          ^~~~~~~~
tkGlue.c:5262:11: error: ‘pregcomp’ undeclared (first use in this function); did you mean ‘regcomp_t’?
 5262 |  p->pat = pregcomp(string,string+len,p->flags);
      |           ^~~~~~~~
      |           regcomp_t

I think this error likely means that the pregcomp2.c configuration test unexpectedly failed.

@chrstphrchvz
Copy link
Contributor

chrstphrchvz commented Feb 14, 2024

In file included from /usr/lib64/perl5/CORE/perl.h:6196:
Event.xs: In function ‘boot_Tk__Event’:
/usr/lib64/perl5/CORE/embedvar.h:61:49: error: initialization of ‘SV *’ {aka ‘struct sv *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
   61 | # define PL_curcop                              (vTHX->Icurcop)
      |                                                 ^
Event.xs:1535:18: note: in expansion of macro ‘PL_curcop’
 1535 |   SV *old_warn = PL_curcop->cop_warnings;
      |                  ^~~~~~~~~
Event.xs:1540:26: error: assignment to ‘char *’ from incompatible pointer type ‘SV *’ {aka ‘struct sv *’} [-Wincompatible-pointer-types]
 1540 |  PL_curcop->cop_warnings = old_warn;
      |                          ^
In file included from /usr/lib64/perl5/CORE/perl.h:6196:
tkGlue.c: In function ‘Boot_Glue’:
/usr/lib64/perl5/CORE/embedvar.h:61:49: error: initialization of ‘STRLEN *’ {aka ‘long unsigned int *’} from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
   61 | # define PL_curcop                              (vTHX->Icurcop)
      |                                                 ^
tkGlue.c:5552:31: note: in expansion of macro ‘PL_curcop’
 5552 |  COP_WARNINGS_TYPE old_warn = PL_curcop->cop_warnings;
      |                               ^~~~~~~~~
tkGlue.c:5560:26: error: assignment to ‘char *’ from incompatible pointer type ‘STRLEN *’ {aka ‘long unsigned int *’} [-Wincompatible-pointer-types]
 5560 |  PL_curcop->cop_warnings = old_warn;
      |                          ^

These errors are due to Perl/perl5@f8552c1 (i.e. Perl 5.37.6) which changed PL_curcop->cop_warnings from type STRLEN * to char * (and Perl/Tk has dealt with how it was previously of type SV *). A workaround (applicable to any Perl5 version) could be to use void *old_warn instead.

@kloczek
Copy link
Author

kloczek commented Feb 14, 2024

These errors are due to Perl/perl5@f8552c1 (i.e. Perl 5.37.6) which changed PL_curcop->cop_warnings from type STRLEN * to char * (and Perl/Tk has dealt with how it was previously of type SV *). A workaround (applicable to any Perl5 version) could be to use void *old_warn instead.

Just FTR: I found that issue on building perl-Tk in in build env with perl 5.38.2.

@chrstphrchvz
Copy link
Contributor

chrstphrchvz commented Feb 16, 2024

I think this error likely means that the pregcomp2.c configuration test unexpectedly failed.

Compilers such as Apple Xcode clang 14.2 already emit this warning by default:

config/pregcomp2.c:7:13: warning: incompatible pointer types initializing 'regexp *' (aka 'struct regexp *') with an expression of type 'REGEXP *' (aka 'struct p5rx *') [-Wincompatible-pointer-types]
    regexp* rx = pregcomp(sv, 0);
            ^    ~~~~~~~~~~~~~~~

But as seen in #98 (comment) the reporter’s gcc 14 compiler considers this to be an error by default rather than a warning. So that is likely why the pregcomp2.c configuration test failed unexpectedly.

I believe a workaround would be to use void* rx instead of regexp* rx. There is already the regexp511.c configuration test to decide whether to use REGEXP * (Perl 5.11.0 and later) instead of regexp *, but that test is run after pregcomp2.c.

@jamborm
Copy link

jamborm commented Jul 8, 2024

For the record, I needed the patch attached to https://bugzilla.opensuse.org/show_bug.cgi?id=1225909#c1 to make openSUSE perl-tk build without -fpermissive with GCC 14. In the end, I decided to use only the configuration options of the patch (mainly because apparently the configuration mechanism was not passing the option to GCC when compiling its snippets and so they are necessary) and rely on -fpermissive for the rest in order not to introduce too much divergence from upstream.

hejohns pushed a commit to eecs592-he-schwartz/perl-tk that referenced this issue Nov 10, 2024
hejohns pushed a commit to eecs592-he-schwartz/perl-tk that referenced this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants