dk / Prima

prima.eu.org
Other
108 stars 27 forks source link

Tests fail on install on Kali Linux #115

Closed vikasnkumar closed 5 months ago

vikasnkumar commented 5 months ago

Hello I am doing an install on Kali Linux which is a debian clone.

$ lsb_release -a
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:    2024.1
Codename:   kali-rolling
$ perl -v
This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux-gnu-thread-multi
(with 47 registered patches, see perl -V for more detail)

See attached build.log for the unit tests failing. I have all the dependencies installed as per the Readme. The tests fail on TIFF and I have both the types of TIFF Libraries installed.

build.log

 dpkg -l | grep libtiff
ii  libtiff-dev:amd64                                           4.5.1+git230720-4                         amd64        Tag Image File Format library (TIFF), development files
ii  libtiff5:amd64                                              4.4.0-6                                   amd64        Tag Image File Format (TIFF) library
ii  libtiff5-dev:amd64                                          4.5.1+git230720-4                         amd64        Tag Image File Format library (TIFF), development files (transitional package)
ii  libtiff6:amd64                                              4.5.1+git230720-4                         amd64        Tag Image File Format (TIFF) library
ii  libtiffxx6:amd64                                            4.5.1+git230720-4                         amd64        Tag Image File Format (TIFF) library -- C++ interface
dk commented 5 months ago

I was getting that failure all over cpantesters and couldn't pinpoint it -- finally, thank you!

However, that's not a Prima bug, that's a libtiff bug that was introduced and quickly fixed within a week, and apparently kali and other distros picked it before waiting for a proper release.

I created a small package if you want to file that bug upstream. The bug is that they wanted to do a proper memory protection but it was badly executed, and instead of reading tiff file properly, it warns like this:

TIFFFetchDirectory: Warning, Requested memory size for TIFF directory of 156 is greather than filesize 0. Memory not allocated, TIFF directory not read. TIFFReadDirectory: Failed to read directory at offset 10.

The bug was fixed last year.. I'm not sure what is the best way to deal with it on Prima level if the library itself is buggy. libtiff-bug.tar.gz

dk commented 5 months ago

bug introduced: https://gitlab.com/libtiff/libtiff/-/commit/5320c9d89c054fa805d037d84c57da874470b01a bug fixed: https://gitlab.com/libtiff/libtiff/-/commit/dbb825a8312f30e63a06c272010967d51af5c35a

dk commented 5 months ago

I believe this should do it. Kindly check if this works for you, and if not, do reopen

vikasnkumar commented 5 months ago

@dk i tested on both Debian 11 and Kali Linux and your fix works. please make a release when you can ! Thank you.

dk commented 4 months ago

v1.73 is out, will appear on cpan shortly