Operating System - Linux
1753359 Members
5647 Online
108792 Solutions
New Discussion юеВ

hlp me instal gd, got eror - undefined reference to `gdImageCreateFromGd2Part'

 
SOLVED
Go to solution
Maaz
Valued Contributor

hlp me instal gd, got eror - undefined reference to `gdImageCreateFromGd2Part'

before installing mrtg, completing the pre-req,
dowload the zlib-1.2.3.tar.bz2
# cd /usr/src
# tar jxvf zlib-1.2.3.tar.bz2
# cd /usr/src/zlib-1.2.3
# mkdir /usr/local/zlib
# make clean
# ./configure --prefix=/usr/local/zlib
# make
# make install

Now I am trying to install gd-2-0.34
# cd /usr/src
# tar jxvf gd-2.0.34.tar.bz2
# cd /usr/src/gd-2.0.34
# mkdir /usr/local/gd
# ./configure --prefix=/usr/local/gd --with-png=/usr/local/libpng \
--with-jpeg=/usr/local/jpeg
# make
got the following error
/usr/local/gd-2.0.34/gdparttopng.c:42: undefined reference to `gdImageCreateFromGd2Part'
collect2: ld returned 1 exit status
make[2]: *** [gdparttopng] Error 1
make[2]: Leaving directory `/usr/local/gd-2.0.34'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/gd-2.0.34'
make: *** [all] Error 2

Plz help
Regards
2 REPLIES 2
Solution

Re: hlp me instal gd, got eror - undefined reference to `gdImageCreateFromGd2Part'

I understand that gd needs zlib. But you are installing zlib in a non-standard location (/usr/local/zlib instead of /usr/local). So it's likely that gd won't find it, which may be the cause of the error.

I think you should stick with standard locations (i.e., do not specify --prefix).
Maaz
Valued Contributor

Re: hlp me instal gd, got eror - undefined reference to `gdImageCreateFromGd2Part'

Thanks Dear Jerome Forissier for superb help :)

I followed your instruction to install zlib, i.e,
# ./configure
# make
# make install
then I tried to install the gd(as above), it went smooth/perfect ... thanks
Even I was also facing error installing libpng(http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1119599)..but rsolved when I installed the zlib, as per your instruction.

Regards
Maaz