Bug 1162842

Summary: libpng RPM missing dependency on zlib
Product: Red Hat Enterprise Linux 6 Reporter: Todd <ToddAndMargo>
Component: libpngAssignee: Petr Hracek <phracek>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.5CC: ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-12 08:42:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Todd 2014-11-11 20:28:55 UTC
Dear Red Hat,

I am coming from the community: Scientific Linux 6.5, 64 bit.  Would one of our intrepid heroes please fix this for me?

It about killed my trying to compile Wine-1.7.30 (I conquered).  In the "./configure" phase, Wine threw the following error:

wine-1.7.30]# ./configure --disable-win64
configure: WARNING: libpng 32-bit development files not found, PNG won't be supported.

Only thing was that libpng was actually installed:
# rpm -qa \*libpng\* | grep -i i686
libpng-devel-1.2.49-1.el6_2.i686
libpng-1.2.49-1.el6_2.i686

The error was bad reporting from Wine "./configure".  The actual problem was that libpng had a dependance on zlib.  "yum install zlib-devel.i686" fixed the bogus error from Wine.

I was able to install libpng (and libpng-devel) without zlib.  Would you please include zlib as an RPM dependancy in libpng?

Here is an article on libpng and its zlib dependancy:
http://www.libpng.org/pub/png/libpng.html
   "libpng is available as ANSI C (C89) source code and requires zlib
    1.0.4 or later (1.2.5 or later recommended for performance and security
    reasons)."

Also, if you do the following google search, this haunts a lot of other people, some who never do figure it out.

https://www.google.com/?gws_rd=ssl#q=WARNING:+libpng+32-bit+development+files+not+found%2C+PNG+won%27t+be+supported

Many thanks,
-T

Comment 2 Petr Hracek 2014-11-12 08:14:01 UTC
Well. in RHEL-6.5 are those dependecies:

$ grep 'BuildRequires:' libpng.spec 
BuildRequires: zlib-devel, pkgconfig
$ 

And zlib-devel should provide zlib package.

You are right, there is no section like:
Requires: zlib

Comment 4 Ondrej Vasik 2014-11-12 08:42:11 UTC
Hi Todd,
I think you are pretty new in the world of rpm and its build requires and dependencies. Actually, libpng rpm package HAS dependency on zlib - it requires libz.so.1 - this dependency is automatically added by rpmbuild during the build. You should not use ./configure and such things - rpmbuild is supposed to build the packages from spec files.

Regards,
       Ondrej

Comment 5 Ondrej Vasik 2014-11-12 08:45:58 UTC
You were probably not able to install libpng without zlib, but of course you were able to install libpng and libpng-devel without zlib-devel - but this is pretty much expected. Guidelines are even stricter, explicit requirements for library packages are forbidden ( https://fedoraproject.org/wiki/Packaging:Guidelines#Explicit_Requires - Red Hat Enterprise Linux follows Fedora packaging guidelines with just very few exceptions ).