Compilation problem

hi,

i’m getting this error when i execute ‘make all’ during compilation,

Undefined first referenced
symbol in file
gdImageCreateFromJpeg /var/tmp//ccRcbV1Q.o
ld: fatal: Symbol referencing errors. No output written to statusmap.cgi
collect2: ld returned 1 exit status
make[1]: *** [statusmap.cgi] Error 1
make[1]: Leaving directory `/usr/local/nagios-1.3/cgi’
make: *** [all] Error 2

this was the error on the config.log,

configure:2716: gcc -o conftest -g -O2 conftest.c -lgd -liconv -lz -lm -lpng -ljpeg 1>&5
ld: fatal: library -ljpeg: not found
ld: fatal: File processing errors. No output written to conftest

i downloaded jpeg-6b.tar.gz and run ./configure and ‘make install’

do i need to do something else?

When you ran configure, it complained about missing libs as you can see from the config.log, so at that point, you should have stopped to fix those complaints it made.
make clean
./configure
over again, now that you have installed the jpeg libs.

hi,

i’m still getting the same error after running make clean and ./configure during nagios compilation.

pls help

thanks

Fix the error. "ld: fatal: library -ljpeg: not found"
Why didn’t it find it?
Where are the libs installed?
Edit /etc/ld.so.conf and make sure that the lib directory where they are located is in there.
For example:
My libjpeg is installed in /usr/lib
But my ld.so.conf might have this in it.
/usr/X11R6/lib
/usr/local/lib
/usr/lib/mrtg2
So I would add this
/usr/lib to the ld.so.conf file and then run
ldconfig

hi,

it still can’t seem to find libjpeg file but i already installed jpeg-6b.tar.gz.

bash-2.05# make install
./install-sh -c cjpeg /usr/local/bin/cjpeg
./install-sh -c djpeg /usr/local/bin/djpeg
./install-sh -c jpegtran /usr/local/bin/jpegtran
./install-sh -c rdjpgcom /usr/local/bin/rdjpgcom
./install-sh -c wrjpgcom /usr/local/bin/wrjpgcom

bash-2.05# ls -l libjpeg*
-rw-r–r-- 1 root other 146180 Feb 20 21:24 libjpeg.a
-rw-r–r-- 1 301 20 159338 Feb 21 1998 libjpeg.doc
-rw-r–r-- 1 root other 466 Feb 18 01:08 libjpeg.la

when i run crle i get this result

Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/bin
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)

Command line:
crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/local/bin

pls help

thanks

hi guys,

need some advice here pls

thanks =)

rpm -ql libjpeg
/usr/bin/cjpeg
/usr/bin/djpeg
/usr/bin/jpegtran
/usr/bin/rdjpgcom
/usr/bin/wrjpgcom
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0
/usr/share/doc/libjpeg-6b
/usr/share/doc/libjpeg-6b/README
/usr/share/doc/libjpeg-6b/usage.doc
/usr/share/man/man1/cjpeg.1.gz
/usr/share/man/man1/djpeg.1.gz
/usr/share/man/man1/jpegtran.1.gz
/usr/share/man/man1/rdjpgcom.1.gz
/usr/share/man/man1/wrjpgcom.1.gz
This tells me that it was installed in /usr/lib
What about your output of rpm -ql libjpeg???