Current perl-tk-xft manjaro package not compatible with current manjaro perl 5.40 package

I just tried to run an application that uses perl-tk but it wasn’t starting due to allegedly missing perl-tk despite perl-tk-xft was installed and until recently it worked fine.

After some debugging I found that the problem is that the manjaro perl-tk-xft package is still the old one for perl 5.38, it seems it wasn’t rebuilt for perl 5.40.

If I install the plain perl-tk package it works fine with perl 5.40 but the plain perl-tk package without xft support is practically unusable as the fonts are so ugly (it looks like straight out of the 90s).

Can you please at least rebuild perl-tk-xft for perl 5.40 or better make the perl-tk-xft package the standard perl-tk package, I cannot imagine that anybody uses perl-tk without xft support.

As perl-tk-xft is an AUR package, have you tried rebuilding it (pamac build perl-tk-xft)?

The AUR (en) - perl-tk-xft page shows no comments from users, which is an indication that there are no current issues with the package.

There is no perl-tk-xft in the repos.

https://manjaristas.org/branch_compare?q=perl-tk-xft

As you tagged this thread with AUR, it would appear you already know this.

If not then explanation incoming;

The Arch User Repository is a third party, officially unsupported, source for PKGBUILDs. No built packages exist there. And everything you do with the AUR is your own responsibility.

You might also need to be reminded that AUR packages, by their nature, require rebuilds against current system libraries from time to time. This is again your responsibility.

Wiki link for more info:

I changed the tag when I saw it was an AUR package.

1 Like

I was under the impression that I installed the perl-tk-xft package from the normal repos in the past. maybe it was removed from the normal repos recently?

I will try to install it from AUR now, that should solve the problem, but my plea for you to make the perl-tk-xft package the standard perl-tk package still stands, nobody would want to use perl-tk without xft support, the fonts look horrible without xft support, all other distros compile perl-tk with xft support as standard, not as an option relegated into a user supported repo like AUR.

1 Like

I suppose it is possible. Though I cannot find any evidence of it previously existing.

The perl-tk package is packaged by Arch and simply adopted into our repos as-is as provided by Arch, like the majority of packages found in manjaro repos.

You can see this such as by pacman -Si perl-tk | grep Packager .

So this ask either becomes for Manjaro to begin packaging perl-tk-xft, to create its own overlay on the perl-tk package, or should simply be aimed at Arch maintainers upstream instead.

1 Like

That is probably the most effective solution, do you know where I should post such request?
I have no direct experience with Arch and their support systems, I have only ever used Manjaro, not Arch directly.

They recently moved most stuff to gitlab, so I think an issues there might make the most sense.

By the by … Manjaro users are somewhat discouraged from partaking in Arch development lists, package reporting, and the like. This happens to be a generic and upstream enough that it should not matter but this is a warning.

2 Likes

Hm, perl-tk-xft fails to build with perl 5.40:

cc -c  -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=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/perl/src=/usr/src/debug/perl -flto=auto   -DVERSION=\"804.036\" -DXS_VERSION=\"804.036\" -fPIC "-I/usr/lib/perl5/5.40/core_perl/CORE"    tixGlue.c
In file included from /usr/lib/perl5/5.40/core_perl/CORE/perl.h:4541,
                 from objGlue.c:9:
objGlue.c: In function ‘Tcl_GetByteArrayFromObj’:
/usr/lib/perl5/5.40/core_perl/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/lib/perl5/5.40/core_perl/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);
      |                             ^~~~
In file included from /usr/lib/perl5/5.40/core_perl/CORE/perl.h:7870:
/usr/lib/perl5/5.40/core_perl/CORE/sv_inline.h:910:33: note: expected ‘STRLEN * const’ {aka ‘long unsigned int * const’} but argument is of type ‘int *’
  910 |                  STRLEN * const lp,
      |                  ~~~~~~~~~~~~~~~^~
make: *** [Makefile:484: objGlue.o] Error 1
make: *** Waiting for unfinished jobs....
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited, status=4/NOPERMISSION
Service runtime: 40.045s
CPU time consumed: 38.221s

this is the output from “pamac build perl-tk-xft” (the last bunch of lines leading to the error).

The perl-tk package has a gcc-14 patch (added 2 months ago) that the AUR perl-tk-xft package doesn’t have, it looks like that’s the reason for the build failure.

How do I add this patch locally to build perl-tk-xft on my machine with this patch added?

“pamac build” gives me the option to edit the PKGBUILD file (which I have done to add the line for the patch) but I don’t know where to place the patch file.

/var/tmp/pamac-build-scotty/perl-tk-xft/src/gcc-14.patch (replace scotty with your username)

Then, from the /var/tmp/pamac-build-scotty/perl-tk-xft/ directory run

makepkg -si

so that it builds using the updated PKGBUILD and installs required dependencies.

However I just tried that and still got an error when building.

I think that’s where I will have to leave it - I just don’t have the knowledge to troubleshoot further.

1 Like

Thanks, I’ll give it a go but I also just now notified the maintainer of the perl-tk-xft AUR package via email, I hope he will find the time to fix his AUR package sometime soon.

I would go the other way around and download the regular PKGBUILD but just add the

XFT=1

To the perl Makefile... line, so that it appears like

perl Makefile.PL XFT=1 INSTALLDIRS=vendor

as thats essentially all the AUR package does.

And I did, and it built fine.

Click here for my steps
git clone https://gitlab.archlinux.org/archlinux/packaging/packages/perl-tk.git
cd perl-tk
### this is a comment. the following is where we edit the line, then save and close the file.
micro PKGBUILD
makepkg -sric

Though I will note that I am on Unstable, which is closer to Arch.

If you are on Stable you may wish to use the previous release.

3 Likes

Thanks that worked perfectly, I marked it as solution even though strictly speaking it’s a workaround, the real solution will be when the AUR perl-tk-xft
package maintainer fixes his package to work with gcc-14.

Just be aware though that, until/if Arch adds xft support, any official Manjaro updates to the perl-tk package will probably undo the change you made. You may want to keep a note of the instructions provided by @cscs (or bookmark this topic) so you can easily re-add xft to the perl-tk package. You can expect a perl-tk update will arrive when the next Stable update is released, as it is currently behind Testing & Unstable:

Branch compare for Manjaro - perl-tk

stable    :804.036-6
testing    :804.036-7
unstable    :804.036-7
1 Like

The maintainer of the AUR perl-tk-xft package has now updated it to include the gcc-14 patch. So I tried installing perl-tk-xft and now it builds successfully.
https://aur.archlinux.org/packages/perl-tk-xft

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.