./testimlib.pl Image::Imlib2 load error: No loader for file format at ./testimlib.pl line 5
I am having trouble finding a proper place to even file a bug report it is is a problem with the core library.
I am not sure it is though because when I use the feh utilty which I believe uses the same library on my workstation - both using updated Artix... it works
The server isn't running X so it is harder to determine but this test perl code seems to have the same load error as my server
/usr/local/apache2/logs/gallery_error_log:[Fri Mar 28 07:29:07.143493 2025] [perl:error] [pid 6725] [client 166.84.1.1:59779] Image::Imlib2 load error: No loader for file format at /usr/local/lib/perl5/site_perl/5.26.1/Apache/Gallery.pm line 1515.\n, referer: http://images.mrbrklyn.com/2025_purim_amsterdam2/test.jpg /usr/local/apache2/logs/gallery_error_log:[Fri Mar 28 07:29:12.993200 2025] [perl:error] [pid 6780] [client 166.84.1.1:59777] Image::Imlib2 load error: No loader for file format at /usr/local/lib/perl5/site_perl/5.26.1/Apache/Gallery.pm line 1515.\n, referer: http://images.mrbrklyn.com/2025_purim_amsterdam2/test.jpg?width=640
Title: Re: Imlib2
Post by: mrbrklyn on 28 March 2025, 16:17:43
I followed this through the debugger it the c libraries
I instaled a custom apache set up on top of a normal Artix (Arch without systemd) build that I keep current. Anytime Image Magic gets upgraded, it makes me worry and it has a history of breaking things.
I started x on the server and the program fah can see the files - it is program that uses Imbib
I think something needs to be rebuilt.
BTW - I did run X on the server and the program 'feh' that uses that same library can read these files.
Title: Re: Imlib2
Post by: gripped on 28 March 2025, 17:37:19
If I were in your shoes I'd try these two things if I wanted to get it working without waiting for a fix.
Downgrade imagemagick to the last version. Low confidence that will work due to all the other libraries it depends on? Build the latest imagemagick package on the server where it will (hopefully) compile against the libraries available to it on the system.
Title: Re: Imlib2
Post by: mrbrklyn on 28 March 2025, 17:41:41
cpan has a recompile feature that I am running right now and it is recompiling everything including the modperl apache tree
I get this strong feeling I will be rebuilding this by scratch in a few hours .... seems like I can't avoid the every 7 years or so..
Title: Re: Imlib2
Post by: mrbrklyn on 28 March 2025, 20:35:44
I should be happy right? I've been using software from 2002...
Title: Re: Imlib2
Post by: mrbrklyn on 28 March 2025, 21:20:25
this from the modperl people
Quote
On 3/28/25 1:01 PM, Ian B wrote: > So, a few bits to check....(what distro is this on?) > it is on artix
> do an 'updatedb' as root/sudo, to rebuild your file search db find? pacman -Ss imlib2 world/feh 3.10.3-1 [installed] Fast and light imlib2-based image viewer world/imlib2 1.12.4-1 [installed]
find / -mount -iname "linux-vdso.so.1" -print comes blank
> > Does it show a lib for jpeg, eg > > libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007f47fc6e2000) > > On Fri, Mar 28, 2025 at 3:55 PM Ruben Safir <ruben@mrbrklyn.com> wrote: > >> On 3/28/25 10:46 AM, Ian B wrote: >>> and maybe just check the obvious, if you do "file >>> /home/ruben/20130303_133505.jpg" does it say its a JPEG ? (assuming on >>> Linux) >>> >> yes >> >> >> -- >> So many immigrant groups have swept through our town >> that Brooklyn, like Atlantis, reaches mythological >> proportions in the mind of the world - RI Safir 1998 >> http://www.mrbrklyn.com >> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 >> >> http://www.nylxs.com - Leadership Development in Free Software >> http://www.brooklyn-living.com >> >> Being so tracked is for FARM ANIMALS and extermination camps, >> but incompatible with living as a free human being. -RI Safir 2013 >> >
Title: Re: Imlib2
Post by: mrbrklyn on 29 March 2025, 03:11:22
there is a file missing from the package - maybe more than one ***imlib2-config***
It is required for the build of the perl package Images::Imlib2
Title: Re: Imlib2
Post by: darcy on 29 March 2025, 07:48:07
I'm also having issues with imlib2-1.12.4. Previous version imlib2-1.12.3-2 works fine.
Title: Re: Imlib2
Post by: Dudemanguy on 29 March 2025, 17:01:52
It's the same files in the package as Arch upstream. I have no idea how this works with regards to that perl module but the diff in question is just a version update (https://gitea.artixlinux.org/packages/imlib2/commit/c2e0157956a1154a80639414271671219de00397).
Title: Re: Imlib2
Post by: capezotte on 29 March 2025, 17:33:15
there is a file missing from the package - maybe more than one ***imlib2-config***
It is required for the build of the perl package Images::Imlib2
The project's Git history (https://git.enlightenment.org/old/legacy-imlib2/commit/e9d84bd2163e6fab494b5ce5cc8830a54ff97765) show that file hasn't been a part of the package for over 16 years.
I'm able to build the AUR package by making /usr/local/bin/imlib2-config a shell script that calls:
however, it installs files to my home directory instead of /usr/share (so Perl can't find it), and I don't know enough about Perl PKGBUILDs to fix that.
The Perl maintainer should've changed that build script literally decades ago.
Title: Re: Imlib2
Post by: mrbrklyn on 29 March 2025, 19:29:34
It's the same files in the package as Arch upstream. I have no idea how this works with regards to that perl module but the diff in question is just a version update (https://gitea.artixlinux.org/packages/imlib2/commit/c2e0157956a1154a80639414271671219de00397).
I looked this over yesterday when I was searching for the source code to try to build it by hand. I must have changed on the upstream. Money it worked and Tuesday it just didn't so something changed.
I think the library itself works in that it can find the image loader libraries and binaries. The Perl module can't find them, though, where last week it did. There is a lynchpin of information missing between the two.
[ruben@www3 Image-Imlib2-2.03-2]$ perl Makefile.PL # running Build.PL You must install the imlib2 library before you can install Image::Imlib2. You can obtain imlib2 from http://sourceforge.net/projects/enlightenment/
Alternatively, if you have downloaded and installed imlib2 and this still will not work, modify the $CONFIG variable inside Build.PL to point to the imlib2-config program that provides.
The change file of imlib2 says this program has been removed and returned and then recently removed again. Scouring the net for a solution I turned up this:
Ok, after digging a little deeper into the imlib2 source it turns out that the loaders are always looked up as shared objects. I thought the loaders are also compiled into the static lib, but I was wrong.
Either I can set the directory by specifying IMLIB2_LOADER_PATH or by putting them into the default loader path which is /usr/local/lib/imlib2/loaders in the self compiled version.
I don't think adding an environmental variable to a program called by Apache is a good idea.
It is in the Arch AUR but hasn't been changed since 2015
I don't see anything in the package build that can be useful to fix this, but I am not a pacman expert.
Title: Re: Imlib2
Post by: mrbrklyn on 29 March 2025, 21:44:25
v1.7.5 - 2021-12-06 -------------------- Kim Woelders (83): Build .xz instead of .bz2 release tarball Drop imlib2-config (use pkg-config) Test: Add some minimal regression testing Test: Fix dist imlib2_load: Add option to use imlib_load_image_immediately() JPEG loader: Cosmetics
in the imlib2 source ChangeLog
Title: Re: Imlib2
Post by: mrbrklyn on 30 March 2025, 04:49:07
well it exposed the error in the tests Building Image-Imlib2 /home/ruben/.cpan/build/Image-Imlib2-2.03-0/. ./Build -- OK Running Build test for /home/ruben/.cpan/build/Image-Imlib2-2.03-0/. t/autocrop.t ...... 1/8 Image::Imlib2 load error: No loader for file format at t/autocrop.t line 7. # Looks like your test exited with 255 just after 1. what I don't have is a solution this sucks I have 40 years of photographs set up on this and it has been wrecked by figgity coders Why couldn't they just leave it alone! there was no security issues with the software and no new services added to them it just worked for decades
Title: Re: Imlib2
Post by: mrbrklyn on 30 March 2025, 12:24:31
I got this back from the developers
Quote
Hello,
imlib2-config was removed in imlib2 version 1.7.5 from 2021. imlib2 is now at version 1.12.4. Please use pkg-config instead.
The "can't find loaders" problem you see may happen if the perl module dlopens libImlib2.so with RTLD_LOCAL instead of RTLD_GLOBAL. A change was introduced in imlib2 version 1.12.4 that requires libImlib2.so to be loaded with RTLD_GLOBAL.
/Kim
I am not sure how I would affect this though.
Title: Re: Imlib2
Post by: mrbrklyn on 30 March 2025, 12:35:28
I got this back from the imlib2 maintainer. I have no idea how to fix this though from the cpan module
Quote
Hello,
imlib2-config was removed in imlib2 version 1.7.5 from 2021. imlib2 is now at version 1.12.4. Please use pkg-config instead.
The "can't find loaders" problem you see may happen if the perl module dlopens libImlib2.so with RTLD_LOCAL instead of RTLD_GLOBAL. A change was introduced in imlib2 version 1.12.4 that requires libImlib2.so to be loaded with RTLD_GLOBAL.
/Kim
Title: Re: Imlib2
Post by: mrbrklyn on 30 March 2025, 14:13:29
I got the FIX
specifically, adding 'sub dl_load_flags { 1 }' to Image/Imlib2.pm
Title: Re: Imlib2
Post by: mrbrklyn on 30 March 2025, 15:49:08
On 3/30/25 8:04 AM, Ian B wrote: > Couple of things you could try, modify the Image::Imlib2 module, to have > sub dl_load_flags { 0x102 } just before the "boostrap" line... > so it would look like (remember to save original) > .. > $VERSION = '2.03'; > sub dl_load_flags { 0x102 }; > bootstrap Image::Imlib2 $VERSION; > ...
EXCELLENT - I did this as a fix 20 ); 21 $VERSION = '2.03'; 22 23 sub dl_load_flags { 1 }; 24 25 bootstrap Image::Imlib2 $VERSION; 26 27 Image::Imlib2->set_cache_size(0); 28
It works now!
Summary - the Package needs to be updated to work with pkg-config
Build.PL 4 # We need to find imlib2-config 5 my $CONFIG = "pkg-config"; 6 21 22 my $libs = `$CONFIG --libs imlib2`; 23 my $cflags = "-DX_DISPLAY_MISSING " . `$CONFIG imlib2 --cflags`; 24