LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-01-2007, 03:18 AM   #16
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0

hi yes i did try configuring using --with-gd=/usr/local/lib as this is where the libgd.so file is however i get the error

configure: error: Unable to find gd.h anywhere under /usr/local/lib

this file (gd.h) is held under /usr/local/include this is why i used /usr/local

is there anyway around this? can i simply move the file across?
 
Old 03-01-2007, 07:20 AM   #17
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Ah have you tried

Quote:
--with-gd=/usr/local/include

You might try that. The other thing (this is how I usually compile programs, so it's easier to delete them if I need too) is you could recompile gd this way:

Quote:
./configure --prefix=/usr/local/gd
make
make install
Then use this with PHP:

Quote:
--with-gd=/usr/local/gd
I've done that in the past with success.
 
Old 03-02-2007, 04:51 AM   #18
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Hi yes i have tried installind gd with the /usr/local/include path however it then complains it can find other file.

I've done as you said. I compiled gd with --prefix=/usr/local/gd, make, make install
this went ok

i then compiled php with --with-gd=/usr/local/gd, this worked ok too!

however when i ran make i recieve the error
ext/gd/.libs/gd.o: In function `php_image_filter_smooth':
/home/matt/php-5.2.0/ext/gd/gd.c:5030: undefined reference to `php_gd_gdImageSmooth'
ext/gd/.libs/gd.o: In function `zif_imageconvolution':
/home/matt/php-5.2.0/ext/gd/gd.c:5112: undefined reference to `php_gd_gdImageConvolution'
ext/gd/.libs/gd.o: In function `zif_imageantialias':
/home/matt/php-5.2.0/ext/gd/gd.c:5138: undefined reference to `php_gd_gdImageAntialias'
ext/gd/.libs/gd.o: In function `php_free_gd_image':
/home/matt/php-5.2.0/ext/gd/gd.c:1176: undefined reference to `php_gd_gdImageDestroy'
ext/gd/.libs/gd.o: In function `_php_image_bw_convert':
/home/matt/php-5.2.0/ext/gd/gd.c:4650: undefined reference to `php_gd_gdImageWBMPCtx'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

( I included a small amount of the cod ebefore as i dont think its finding the functions in my gd)

any ideas.

also i'd just like to thank you for all your help so far.

Matt.
 
Old 03-02-2007, 07:34 AM   #19
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Mmmmmm....there might be some stuff left over from your old compiles of PHP. Try this:

cd into_your_php_dir
make clean
./configure --with-gd=/usr/local/gd
make
make install

My thought is PHP might be looking for functions in the wrong place. Give that a whirl and see if you have the same errors.
 
Old 03-07-2007, 04:24 AM   #20
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Hi sorry for the late reply i've been tied up in other business recently. ok this seems to have sorted something out however i still get the following error on compilation

ext/gd/.libs/gd.o: In function `zif_imagecreatefromstring':
/home/matt/php-5.2.0/ext/gd/gd.c:2300: undefined reference to `gdImageCreateFromPngCtx'
ext/gd/.libs/gd.o: In function `zif_imagecreatefrompng':
/home/matt/php-5.2.0/ext/gd/gd.c:2502: undefined reference to `gdImageCreateFromPngCtx'
/home/matt/php-5.2.0/ext/gd/gd.c:2502: undefined reference to `gdImageCreateFromPng'
ext/gd/.libs/gd.o: In function `zif_imagepng':
/home/matt/php-5.2.0/ext/gd/gd.c:2742: undefined reference to `gdImagePngCtxEx'
ext/gd/.libs/gd.o: In function `_php_image_convert':
/home/matt/php-5.2.0/ext/gd/gd.c:4751: undefined reference to `gdImageCreateFromPng'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

do i need a png library to fix this?

Thanks Again, Matt.
 
Old 03-07-2007, 07:31 AM   #21
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Yeppers you'll need to have libpng:

http://www.libpng.org/pub/png/libpng.html

It's probably installed with your Distro though. Or you could always compile it yourself. Then wherever you compile it to use:
Quote:
./configure --with-png=/png/directory
When you compile gd. After you've compiled gd with png support you'll need to recompile PHP with gd support. Kind of a dependency issue, but I think you're getting really close.

There's also a jpeg library you might want to use with gd:

http://www.ijg.org/

After you compile it enable it with:

Quote:
./configure --with-jpeg=/jpeg/directory
 
Old 03-09-2007, 07:04 AM   #22
flynny1st
LQ Newbie
 
Registered: Dec 2006
Posts: 17

Original Poster
Rep: Reputation: 0
Ok i installed both now so here what i did

libpng 1.2.16

./configure --prefix=/usr/local/libpng
make
make install

for jpeg6b (libjpeg)

./configure (using default prefix /usr/local)
make
make install

i then used the following for the php5 configure after i've run make clean again

'./configure' '--with-mysql=/usr/local/mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-gd=/usr/local/gd' '--with-iconv-dir' '--with-png=/usr/local/libpng' '--with-jpeg=/usr/local'

this runs ok and thought it was there but now i get the following when i run make

ext/gd/.libs/gd.o: In function `zif_imagecreatefromstring':
/home/matt/php-5.2.0/ext/gd/gd.c:2300: undefined reference to `gdImageCreateFromPngCtx'
ext/gd/.libs/gd.o: In function `zif_imagecreatefrompng':
/home/matt/php-5.2.0/ext/gd/gd.c:2502: undefined reference to `gdImageCreateFromPngCtx'
/home/matt/php-5.2.0/ext/gd/gd.c:2502: undefined reference to `gdImageCreateFromPng'
ext/gd/.libs/gd.o: In function `zif_imagepng':
/home/matt/php-5.2.0/ext/gd/gd.c:2742: undefined reference to `gdImagePngCtxEx'
ext/gd/.libs/gd.o: In function `_php_image_convert':
/home/matt/php-5.2.0/ext/gd/gd.c:4751: undefined reference to `gdImageCreateFromPng'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

any ideas?
 
Old 03-09-2007, 10:35 AM   #23
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Did you rebuild gd? You'll want to rebuild gd with the png and jpeg options:

Quote:
--prefix=/usr/local/gd
--with-png=/usr/local/libpng
--with-jpeg=/usr/local
Then try rebuilding PHP with these options:

Quote:
'./configure' '--with-mysql=/usr/local/mysql' '--without-sqlite' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-zlib' '--with-gd=/usr/local/gd' '--with-iconv-dir'

Last edited by asommer; 03-09-2007 at 10:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Turn off image thumbnail caching on KDE 3.5.2?? JamesNorris Linux - Software 2 04-03-2006 10:57 AM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Newbie 1 11-25-2004 01:45 PM
sem has incomplete type error in building the filesystem image sudhirvemana Linux - Software 0 11-25-2004 03:17 AM
what is the function library of the basic graphics library in rethat9.0? zerwolve Red Hat 0 04-29-2004 09:18 PM
Dynamically extracting a thumbnail from an interlaced image. Travis86 Programming 0 01-31-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration