Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

libpng build fails to find library that is present 1

Status
Not open for further replies.

LaylaNahar

Programmer
Oct 25, 2006
26
0
0
US
Hello,

I am using Centos 5.2 and following these instructions to build RRDTool
(
The command :
env CFLAGS="-O3 -fPIC" ./configure --prefix=$INSTALL_DIR
run from the libpng-1.2.18 directory always ends in the failure:
checking for zlibVersion in -lz... no
configure: error: zlib not installed

I'm wondering if someone can tell me what to do to allow the libpng-1.2.18 configure process to find the zlib material it needs. I have set up my build environment as shown below.

Thank you very much.

[root@localhost ~]# ls $BUILD_DIR
cairo-1.6.4 libpng-1.2.18.tar.gz pkg-config-0.23
rrdtool-1.4.5.tar.gz
cairo-1.6.4.tar.gz pixman-0.10.0 pkg-config-0.23.tar.gz zlib-1.2.3
libpng-1.2.18 pixman-0.10.0.tar.gz rrdtool-1.4.5
zlib-1.2.3.tar.gz

[root@localhost ~]# echo $INSTALL_DIR
/opt/rrdtool-1.4.5

[root@localhost ~]# ls $INSTALL_DIR/include
zconf.h zlib.h

[root@localhost ~]# ls $INSTALL_DIR/lib
libz.a libz.so libz.so.1 libz.so.1.2.3

[root@localhost ~]# echo $PATH
/opt/rrdtool-1.4.5/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/rrdtool-1.4.5:/opt/rrdtool-1.4.5/lib:/opt/rrdtool-1.4.5/include

[root@localhost ~]# echo $PKG_CONFIG
/opt/rrdtool-1.4.5/bin/pkg-config:/opt/rrdtool-1.4.5/include
 
Out of curiosity, is RRDTool available in the package repositories?

Generally speaking, it is better to avoid building from source when applications are available. The reasons being, as you noticed, the configuration can be non standard and by using the package tools, it gets on the list for automatically getting program updates.
 
Hi Noway2,

Thanks for your response, & for the question about whether the program is available in the binary form. I followed the first install instructions I found, which are on the website of the person who created it. I tried "rpm install rrdtools" and "yum install rrdtools" Both commands failed to find anything based on that name. I want to use yum (or rpm) if possible for installing because of the simplicity. There's so much to assimilate with this open source stuff. If there are any other ways to standard ways to install from binaries I'd love to know.

LN
 
PNG is a common graphics format. I find it difficult to believe that it would not be supported by Centos standard libraries, BTW in the repositories. Generally, it has been my experience that when you can't find something that reasonably should be expected in the repositories it is that the search name isn't correct. One would think that the tools would do a better job of this, but sometimes they don't.

Have a look at this page:
It appears that the libpng is available at revision 1.2.7 or 1.2.8 depending on what distribution you are using. If you can find the version for your distribution and rev level, you should be able to download the binary and install it with the tools. Normally, the package tools will verify the signature of the applications that are downloaded through them. If you download a binary yourself, you should verify the GPG signature and the MD5 sum to verify its authenticity. As far as the GPG signature goes, be sure to check the list of signatures and try to verify that signer is actually the designated package maintainer.
 
Noway2,

Thanks for the link to the RPM search page!

thanks again for your help & your responses

LN
 
Noway2,

A quick follow up. I had hit another roadblock building an application from source. Based on your tip about it being more helpful to install from the binaries, I dug around a bit and found out how to install the binaries for the application that was failing to build, and now I can move on to the next step in my project. Thanks again!

LN
 
Happy to have been of help. I am glad that you are making progress.

As an aside, this forum and linuxquestions.org, which you referenced in an earlier post, are the two best technical forums I have found. If you haven't signed up there yet, would recommend it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top