StrawberryPerl / Perl-Dist-Strawberry

Tooling to build and package releases for Perl on Windows.
https://strawberryperl.com
Other
289 stars 49 forks source link

Tk build fails (5.40.0.1) #208

Closed epa closed 3 months ago

epa commented 3 months ago

Please see https://github.com/eserte/perl-tk/pull/89/commits/517fb271fe2735bb87977080121566047fb29687 I am seeing the same build error with Strawberry Perl 5.40.0.1 and "cpanm Tk". The end of the build.log follows.

Although the patch in that issue hasn't been merged into the main Tk branch, I think you might apply it as a local patch somehow when packaging Tk for Strawberry Perl? If that even makes any sense.

gcc -c -I. -I./pTk/mTk/xlib  -I.. -I.. -I../pTk/mTk/xlib -I. -Ibitmaps -I.. -I../pTk/mTk/xlib -std=c99 -DWIN32 -DWIN64 -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-strict-aliasing -mms-bitfields -DPERLDLL -Os -falign-functions -falign-jumps -falign-labels -falign-loops -freorder-blocks -freorder-blocks-algorithm=stc -freorder-blocks-and-partition   -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\"  "-IC:\STRAWB~1\perl\lib\CORE"    imgBMP.c
In file included from ../pTk/mTk/xlib/X11/Xlib.h:31,
                 from tkWinPort.h:19,
                 from tkPort.h:32,
                 from tk.h:87,
                 from imgBMP.c:11:
../pTk/mTk/xlib/X11/X.h:182:34: error: expected identifier or '(' before numeric constant
  182 | #define ControlMask             (1<<2)
      |                                  ^
gmake[1]: *** [makefile:891: imgBMP.o] Error 1
gmake[1]: Leaving directory 'C:/Users/eda/.cpanm/work/1724858901.32000/Tk-804.036/pTk'
gmake: *** [makefile:1638: pTk/libpTk.a] Error 2
-> FAIL Installing Tk failed. See C:\Users\eda\.cpanm\work\1724858901.32000\build.log for details. Retry with --force to force install it.
shawnlaffan commented 3 months ago

A patched Tk distribution is available but not part of SP. See discussion under #87.

A link to the patched distribution is at https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/87#issuecomment-2292839449

I'll close this issue given the above.