InfiniteSilence has asked for the wisdom of the Perl Monks concerning the following question:

Before you say this isn't a Perl question, hear me out. I run a very poor machine -- a Chromebook running Arch Linux. I use this because I want people overseas who are very resource limited to be able to run any example I give them. These Chromebooks run out of space and my cue to go out and get something else comes along when I try to install a module and start getting really strange errors that I would not get on my Ubuntu-running desktop. I'll try to update the machine and essentially run out of space.

Here are some quick hardware and os specs:

NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues +" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo [joel@PLANTER1 tmp]$ uname -r 6.13.5-arch1-1hostname [joel@PLANTER1 tmp]$ hostnamectl Static hostname: blah Icon name: computer-laptop Chassis: laptop 💻 Machine ID: 431546e29fab402dba950af2652c39ca Boot ID: 6642a71047814218b7785c68524132a4 Operating System: Arch Linux Kernel: Linux 6.13.5-arch1-1 Architecture: x86-64 Hardware Vendor: GOOGLE Hardware Model: Candy Firmware Version: MrChromebox-2408.1 Firmware Date: Sat 2024-09-14 Firmware Age: 1y 7month 3w 6d

I kept trying to use tiny Linux distros but would run into all sorts of hardware issues like my mouse would not work of my monitor would flicker. I settled on old Chromebooks because I could get them for a song on eBay. What prompted today's writing is that I tried to install Tk. I think I installed the pre-reqs:

sudo pacman -S tk .... warning: tk-8.6.16-1 is up to date -- reinstalling ... sudo pacman -S tcl warning: tcl-8.6.16-1 is up to date -- reinstalling ... cpan -i Tk .... cc -c -I/usr/include/freetype2 -I.. -I/usr/include/freetype2 -I. -Ib +itmaps -I/usr/include/freetype2 -D_REENTRANT -D_GNU_SOURCE -fwrapv - +fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/include/db5 +.3 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=ge +neric -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wforma +t -Werror=format-security -fstack-clash-protection -fcf-protection -f +no-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-m +ap=/build/perl/src=/usr/src/debug/perl -flto=auto -DVERSION=\"804.0 +36\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib/perl5/5.40/core_perl/ +CORE" Xlib_f.c 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:1683:15: note: declared here 1683 | extern KeySym XKeycodeToKeysym( | ^~~~~~~~~~~~~~~~ Xlib.t:334:14: error: initialization of ‘KeySym (*)(Display *, unsigne +d int, int)’ {aka ‘long unsigned int (*)(Display *, unsigned int, i +nt)’} 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_XKeycodeTo +Keysym’) 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:865: Xlib_f.o] Error 1 make[1]: Leaving directory '/root/.cpan/build/Tk-804.036-2/pTk' make: *** [Makefile:1659: pTk/libpTk.a] Error 2 SREZIC/Tk-804.036.tar.gz /usr/bin/make -- NOT OK

So what I am looking for a machine/linux OS with longevity that virtually anyone can afford. I'm looking a lot into mini PCs, figuring I'll just carry around a foldable keyboard and small HDMI mini capable monitor or something around. Of course I've looked around online and found a resource on reddit talking about this issue but since my main interest is ensuring that Perl modules will compile and install correctly my guess is that module authors might already have some rigs set up that they go to for these testing scenarios.

By the way, thank you everyone who has read and responded my posts. Your help is greatly appreciated.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re: Tk on Arch on Essentially Garbage Equipment
by bliako (Abbot) on May 12, 2026 at 23:09 UTC

    If it's any consolation, I get the same errors on a system with Linux kernel 6.14 and (i think) Xlib version 1.8. Can you not try to upgrade your system? Usually that is not space consuming. But it will fail if your hardware is no longer supported.

    Another reason for failure is if your gcc compiler (sometimes aliased as cc in linux) is v14 or newer which it treats some warnings as errors and breaks everything in older systems (see https://stackoverflow.com/questions/79917415/gcc15-treats-warnings-as-errors-by-default). Needless to say that anyone trying to keep alive older computer systems will be in a lot of trouble if they allow gcc to be upgraded. Consider locking its version in your package manager. That is another way the "West" has found to shoot itself on the foot, additionally to a long strand of other equally idiotic moves we are witnessing lately.Shooting our feet is now the norm./rant

    Now, if you feel adventurous, you can try the following hacks but be careful because a couple of them may break your tk scripts. Some of the failures are because of the gcc's idiotic breaking decision I mentioned above, but others are unexplained to me, like why USE_PREGCOMP_31027 is not defined although there is in the configuration. In any event, with these I managed to compile, run all the tests and install the beast to an older linux I keep.

    1. cpanm --look Tk
    2. perl Makefile.PL
    3. make all (it should fail as per your post)
    4. edit ./pTk/Xlib.t and remove 3 lines starting from line 333 incl. (the first line should be a #if... and the last an #endif... Said function is deprecated in Xlib so I don't know why Tk has not marked it so.
    5. edit ./pTk/tkCanvText.c and in line 1253 substitute size_t with int
    6. edit ./pTk/tkEvent.c and in line 1155 add int fallbackCurrent; to make it look like this TkDisplay *dispPtr;int fallbackCurrent;
    7. edit ./pTk/tkImage.c in line 1085 append int imgWidth; int imgHeight; after the existing int height;
    8. edit ./Event/Event.xs and comment out lines 1535 and 1540 (prepend with //) *This may have some side effects in warnings *
    9. edit ./objGlue.c line 630 replace *lengthPtr with *((STRLEN *)lengthPtr) (candidate for crashes if you get any).
    10. edit ./tkGlue.c comment out lines 5552 and 5560 (prepend with //)
    11. edit ./tkGlue.c and insert at the very top of the file this #define USE_PREGCOMP_31027 1
    12. make all
    13. make test
    14. make install

    bw, bliako

Re: Tk on Arch on Essentially Garbage Equipment
by swl (Prior) on May 12, 2026 at 23:28 UTC