Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new gd2 test errors #42

Closed
rurban opened this issue Jan 24, 2022 · 5 comments
Closed

new gd2 test errors #42

rurban opened this issue Jan 24, 2022 · 5 comments
Assignees
Labels

Comments

@rurban
Copy link
Collaborator

rurban commented Jan 24, 2022

@eserte has a fedora system with gd 2.3.2 and GD.t still fails with GD-2.74:.
2.73 works fine

#   Failed test 'unable to generate comparison image for test 1: Can't locate object method "newFromGd2" via package "GD::Image" at (eval 16) line 1.
# '
#   at t/GD.t line 259.
Can't locate object method "newFromGd2" via package "GD::Image" at t/GD.t line 80.
# Looks like your test exited with 255 just after 3.
t/GD.t .................... Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 12/14 subtests 
@rurban rurban added the Bug label Jan 24, 2022
@rurban rurban self-assigned this Jan 24, 2022
@eserte
Copy link

eserte commented Jan 24, 2022

This can be reproduced using the following Dockerfile

FROM fedora:34
RUN yum -y install perl-CPAN gcc perl-Test perl-Test-Simple
RUN yum -y install gd-devel
RUN cpan -t GD

and

docker build -t perl-test . && docker run perl-test

Test output:

# Testing gd 2.3.2 using gd2 support.

#   Failed test 'unable to generate comparison image for test 1: Can't locate object method "newFromGd2" via package "GD::Image" at (eval 16) line 1.
# '
#   at t/GD.t line 259.
Can't locate object method "newFromGd2" via package "GD::Image" at t/GD.t line 80.
# Looks like your test exited with 255 just after 3.
t/GD.t .................... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 12/14 subtests 

@hakonhagland
Copy link
Contributor

hakonhagland commented Jan 24, 2022

@eserte Thanks for providing the Dockerfile. I am able to reproduce the error with docker, and I can see that the error occurs at line 94 :

my $tile = eval "GD::Image->newFrom${op}('$fn')" or die $@;

where the value of $op is Gd2 and the value of $fn is ./test_data/tile.gd2 (the file exists). However, the specific values of these variable seems to be unimportant. I tried replacing them with Png and ./test_data/tile.png (the file exists) and I get the same error:

 Can't locate object method "newFromPng" via package "GD::Image"

I wonder if the error can have something to do with the installation location of the shared library:

$ ldd blib/arch/auto/GD/GD.so  | grep libgd
	libgd.so.3 => /lib64/libgd.so.3 (0x00007f9274326000)

However cpan GD uses the default path in Makefile.PL, se line 203 of /usr/lib instead of /lib64

@rurban
Copy link
Collaborator Author

rurban commented Jan 24, 2022

The image format selection in the test was still a hack. I'll change it the actual supported formats. Gif changed, GD changed and many formats depend if the support library was found or not.

rurban added a commit that referenced this issue Jan 24, 2022
check for newFromGd, not just the version.
add newFromTiff, fix some prototypes and APIs which dont have
truecolor support

cleanup the meta requires for faster non-develop testing.
@rurban
Copy link
Collaborator Author

rurban commented Jan 24, 2022

Thanks for the reproducer!
I could fix it in devel, soon in 2.75

@rurban
Copy link
Collaborator Author

rurban commented Jan 24, 2022

Merged

@rurban rurban closed this as completed Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants