Build log for GD states 'zlib.pc not found' for GD versions 2.78 and 2.77

Attempting to build Perl 5.36.1 (or earlier versions) for Windows on the Activestate platform configured to include either of the latest two versions of GD, i.e. 2.78 or 2.77, fails. From looking at the build logs for GD, this appears to be because zlib.pc is not in any pckconfig folder that pck-config looks in.

Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘zlib’, required by ‘gdlib’, not found
Package ‘zlib’, required by ‘libpng’, not found

I created a build on the platform using GD version 2.76. Oddly zlib.pc is not in usr\lib\pckconfig, the folder where it would be after installation. Although it’s not there, it must have been located during the build process along with the other .pc files.

I can create a zlib.pc file, and update GD to version 2.78 in my installation using cpan, but it would be good if this could be fixed for a platform build too.

Thank you for letting us know about that error.

I have made an internal ticket to fix this inside the platform build process.

We appreciate you letting us know about the bugs and are sorry you are running into so many.


The other issues I was having are fixed by putting the exec folder in PATH instead of the bin folder. [Putting the bin folder and the usr\bin folders in PATH may be an alternative option, but I’m not sure if there are any downsides to this that I have not yet encountered.] Some documentation on what the perl.exe in the exec folder does would be helpful.

I’ve asked our Technical Writer to take a look at our FAQs and see if he can add some items to document what you ran into better.

I have discovered that in the build I created using GD version 2.76 there are 2 pkconfig folders, usr/lib/pkgconfig and usr/share/pkgconfig, and zlib.pc is in the latter whilst all the other .pc files are in the former.

I don’t know why the zlib.pc is in a different folder. However, I am guessing that the build error when GD version 2.78 is selected may be due to PKG_CONFIG_PATH including usr/lib/pkgconfig but not usr/share/pkgconfig.

I’ve put a note in the ticket to check if that folder issue gets resolved when the issue that started this thread gets resolved!