Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Tk in Strawberry on W10

by syphilis (Archbishop)
on Mar 31, 2024 at 06:39 UTC ( [id://11158603]=note: print w/replies, xml ) Need Help??

in reply to Re: Tk in Strawberry on W10
in thread Tk in Strawberry on W10

see especially this reply from syphilis, which describes a fix to the Tk C code in pTk/mTk/xlib/X11/X.h

Thanks for locating that eyepopslikeamosquito - I think it's fucking deplorable that we still have to keep digging up this old stuff. (And I don't even use Tk.)
The github repo (at least) should have been fixed by now, IMFO.
Unfortunately, it's still broken.

If I clone the current Tk version from github into Tk-20240331 ($ git clone Tk-20240331), I still have to apply 2 fixes to that source.
Firstly, I have to apply the patch at
Then, in that very same X.h file that I've just patched, I need to replace the one occurrence of typedef unsigned long XID with typedef unsigned long long XID (at line 46).
I made all of those changes by hand (cut'n'paste) - it's not such a big deal.
That done, in Strawberry-5.38.2 I can just cd to that Tk-20240331 source directory and run "cpan .". (Ignore the error messages that are generated at the start - they're just in response to the configure probing that's being done.)
The big deal is having to continually dig up these solutions because no-one can be bothered actually fixing the github source. (Of course, it's actually a new release of Tk that's needed.)

Update: The above patch that replaces "long" with "long long" works fine on Windows, but the revised X.h would really be better rewritten as:
$ diff -u X.h X.h_preferred --- X.h 2024-03-31 17:24:19.640385400 +1100 +++ X.h_preferred 2024-03-31 20:33:02.097334700 +1100 @@ -40,10 +40,8 @@ /* Resources */ -#if defined(_WIN64) && defined(_MSC_VER) +#if defined(_WIN64) typedef __int64 XID; -#else -typedef unsigned long long XID; #endif
$ diff -u X.h X.h_preferred --- X.h 2024-03-31 17:24:19.640385400 +1100 +++ X.h_preferred 2024-04-01 10:05:59.718400900 +1100 @@ -40,10 +40,10 @@ /* Resources */ -#if defined(_WIN64) && defined(_MSC_VER) +#if defined(_WIN64) typedef __int64 XID; #else -typedef unsigned long long XID; +typedef unsigned long XID; #endif typedef XID Window;

Replies are listed 'Best First'.
Re^3: Tk in Strawberry on W10
by etj (Deacon) on Apr 06, 2024 at 14:04 UTC, the AppVeyor build on the most recent commit, shows it building OK on Strawberry Perl?

    Is the problem you're describing captured in one of the open issues on there? When I asked Slaven for co-maint and a commit bit in the past (for GraphViz::Makefile), he was very receptive.

      The page says "github workflow for FreeBSD". Is it really Strawberry?

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        I double-taked at that for several microseconds. But that's the most recent commit message. Look at the bottom of the log, where it mentions updating C:\Strawberry.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11158603]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-05-23 20:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found