The Image::Imlib2 perl module does not load the libimlib2.so... library so it fails when executing any program that uses it. This can be worked around by running the script with LD_PRELOAD variable set LD_PRELOAD=/usr/lib64/libImlib2.so.1.4.2 perl test.pl I've tried this on a couple of systems. Both x86_64 and i686. Reproducible: Always Steps to Reproduce: 1. perl test.pl # To run perl program using Image::Imlib2 Actual Results: /usr/bin/perl: symbol lookup error: /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux/auto/Image/Imlib2/Imlib2.so: undefined symbol: imlib_set_cache_size Expected Results: Program loads without error. If I make the perl module by hand, make test works fine. If I run make test from the portage work directory, it fails the same way as my app. By hand I do perl Makefile.PL ./Build make test In the portage work directory, there is no Makefile after the compile step (I re-run perl Makefile.PL to create it), so I don't think the same steps were taken.
It should work if you reinstall Image-Imlib2. It was caused by setting extra_linker_flags in the eclass. Thanks for the bug report.