Burton,
Thanks for the pointers. I found your post re: the same problem on
RedHat 7.2. I was able to use your post as a good set of hints. Below is
a slightly modified version of your original set of directions that worked
for me on RedHat 7.3 and today's CVS load. I'm sure that some of the
differences are a result of my upgrade to 7.3 from an older 6.x version.
With luck this will help somebody else.
---------------------------------------------------------------------------------------------
First off, following the instructions in BUILD-NTOP.txt works fine,
although
that means that the libraries are static, hard-coded, etc.
What I found was that RedHat 7.2 installed a libgd.so.1.8.4 library, which
was compiled against 1.0.x series of libpng (which is fine, because RedHat
7.2 includes libpng-1.0.12).
Unfortunately, there aren't more recent RedHat packages for the required
set
(libpng-1.2.2, zlib-1.1.4 and gd-1.8.4).
Brief instructions for manually updating libgd.so.1.8.4 (this assumes
you've
installed libpng 1.2.2 from source in the default location).
If you do not have the freetype sources installed, obtain them and install
them:
cd to a working directory
cd ~
wget
ftp://speakeasy.rpmfind.net/linux/redhat/7.3/en/os/i386/SRPMS/freetype-2.0.9-2.src.rpm
wget
ftp://speakeasy.rpmfind.net/linux/redhat/7.3/en/os/i386/RedHat/RPMS/freetype-devel-2.0.9-2.i386.rpm
rpm -Uvh freetype-2.0.9-2.src.rpm
rpm -Uvh freetype-devel-2.0.9-2.i386.rpm
1) Obtain the source rpm and install it:
cd /usr/src/redhat/SRPMS
wget
ftp://ftp.redhat.com/pub/redhat/linux/7.2/en/os/i386/SRPMS/gd-1.8.4-4.src.rp
m
rpm -i gd-1.8.4-4.src.rpm
Which gives you 2 files in /usr/src/redhat/SOURCES:
gd-1.8.4.tar.gz
and
gd-1.8.4-redhat.patch
2) Unpack the .tar.gz file into a work directory and apply the patch
cd ~
tar xfvz /usr/src/redhat/SOURCES/gd-1.8.4.tar.gz
cd gd-1.8.4
patch -p1 < /usr/src/redhat/SOURCES/gd-1.8.4-redhat.patch >> patchlog
3) Edit Makefile
Change CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG
to CFLAGS=-fpic -O -DHAVE_LIBPNG -DHAVE_LIBJPEG
Change LIBS=-lgd -lpng -lz -lm
to LIBS=-lgd -lpng -lz -lm -ljpeg
Change INCLUDEDIRS=-I. -I/usr/include/freetype2
to INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/libpng12
4) make && make install
NOTE: This will fail with...
gdft.c:36:31: freetype/freetype.h: No such file or directory
gdft.c:37:30: freetype/ftglyph.h: No such file or directory
make: *** [gdft.o] Error 1
...if you do not have the freetype sources installed.
5) Create and install the shared library...
gcc --shared -o libgd.so.1.8.4 gd.o gd_gd.o gd_gd2.o gd_io.o
gd_io_dp.o gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o
gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o gdtables.o gdft.o
gdttf.o gdcache.o gdkanji.o wbmp.o gd_wbmp.o gdhelpers.o
/usr/lib/libjpeg.so
install -v -m 644 libgd.so.1.8.4 /usr/lib/libgd.so.1.8.4
chmod +x /usr/lib/libgd.so.1.8.4
I tried to simply restart ntop but got...
ntop: relocation error: /usr/lib/libgd.so.1.8: undefined symbol: gdSinT
so I rebuilt gdchart and ntop and everything worked fine.
--
J. Eric Josephson
Director of Network and System Operations
978-720-2159
mailto:[EMAIL PROTECTED]
|---------+---------------------------->
| | "Burton Strauss" |
| | <Burton@ntopsuppo|
| | rt.com> |
| | Sent by: |
| | ntop-admin@unipi.|
| | it |
| | |
| | |
| | 01/14/2003 05:04 |
| | PM |
| | Please respond to|
| | ntop |
| | |
|---------+---------------------------->
>----------------------------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: Re: [Ntop] libpng warning and segmentation fault. I'm stumped.
|
>----------------------------------------------------------------------------------------------------------------------|
Read the stuff in docs/FAQ and in the back traffic for this list (you can
search at gmane if need be).
--with-gdchart-root=../gdchart0.94c/ should NOT be needed - it should find
it automatically there...
If you have installed stuff, then the tests in buildAll.sh should fix the
gdchart dependency problem...
Finally, the current source should trap the libpng problem and give the
user an error .png
-----Burton
---------- Original Message ----------------------------------
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Tue, 14 Jan 2003 15:28:37 -0500
>
>I'm hoping that somebody knows what my issue is. I have been running NTOP
>for the past couple of years and usually get the source from the CVS
>server. I recently decided to upgrade my Linux server from RH 6.2 to RH
>7.3. I also though that it would be a good time to upgrade NTOP to a
>current build. I have been trying the source from the CVS server for the
>past week or so while working on this project.
>
>After solving my Automake dependency I was able to build with the
following
>config line:
>
> ./configure --with-gdchart-root=../gdchart0.94c/
>--with-rrd-root=/usr/local/rrdtool-1.0.40/
>
>I made sure that my source tree was clean by fetching the entire tree from
>scratch after deleting it locally. I *think* I was able to find all old
>instances of Libpng (key word, think).
>As soon as I attempt to see the network load (
>http://myserver.mynetwork.net:3000/thptStats.html ) I get the following.
>
>libpng warning: Application was compiled with png.h from libpng-1.0.12
>libpng warning: Application is running with png.c from libpng-1.2.4
>gd-png: fatal libpng error: Incompatible libpng version in application
and
>library
>Segmentation fault
>
>I have two interfaces and start ntop with the following command line:
>
> ntop -u ntopuser -i eth1,eth0 -M -K -E -e 10000 -U
>http://10.11.11.9/cgi-bin/mapper.pl -P1 -p /root/protocols.txt -P /tmp
>
>I'm sure I have overlooked something, but do not know what. Any pointers
>would be a tremendous help. Thanks!
>
>--
>
>J. Eric Josephson
>Director of Network and System Operations
>978-720-2159
>mailto:[EMAIL PROTECTED]
>
>
>_______________________________________________
>Ntop mailing list
>[EMAIL PROTECTED]
>http://listgateway.unipi.it/mailman/listinfo/ntop
>
____________________________________________________________
Free 20MB Web Site Hosting and Personalized E-mail Service!
Get It Now At Doteasy.com http://www.doteasy.com/et/
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop