[mrtg] Fw: a cure for 'gd-png: fatal libpng error' on RedHat Linux

Takumi Yamane yamtak at b-session.com
Mon Dec 22 19:16:44 MET 2003


Hi Nate,

It works well at least on RHL7.2, RHL7.3 & RHL9.

----------------------- forwarded message -----------------------
From:     Takumi Yamane <yamtak at b-session.com>
To:       mrtg at list.ee.ethz.ch
Subject:  [mrtg] a cure for 'gd-png: fatal libpng error' on RedHat Linux
Date:     Sun, 14 Dec 2003 11:16:37 +0900

Hi, all.

I found a cure for infamous long-listed-but-not-answered problem
'gd-png: fatal libpng error' on RedHat Linux.

In short, apply following patch to 'configure' script:
(as of mrtg-2.10.11)

--- configure.orig      Sun Dec 14 10:30:51 2003
+++ configure   Sun Dec 14 10:31:17 2003
@@ -3835,7 +3835,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgd -Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic $LIBS"
+LIBS="-lgd -Wl,-Bdynamic ${GLIBS} $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -3895,7 +3895,7 @@
 echo "${ECHO_T}$ac_cv_lib_gd_gdImageGd" >&6
 if test $ac_cv_lib_gd_gdImageGd = yes; then

-   GLIBS="-Wl,-Bstatic ${GLIBS} -Wl,-Bdynamic"
+   GLIBS="-Wl,-Bdynamic ${GLIBS}"

 else
   :

Obviously, I just removed a flag for static-linking.
There's no need to compile libz/libpng/libgd, you can use out-of-the-
box of RPMs for these libraries.

Also, note that this 'cure' may incur slight performance degradation, 
since 'rateup' binary being dynamicaly links those libraries.


I don't know why it can be fixed the problem, but I just found the 
difference between old-well-working MRTG installation and newest-but-
doesn't-works one, when I tried to setup MRTG to one of my Linux box 
in this morning.


Forgive me if it already solved by someone, since I just subscribed 
this list an hour ago :)

I hope this may help you.
Takumi Yamane <yamtak at b-session.com>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list