PHP 4.0 Bug #7498 Updated: JPEG not build into PHP
| From: | mrobinso@php.net | Date: | Mon, 30 Oct 2000 23:39:23 +0000 |
| Subject: | PHP 4.0 Bug #7498 Updated: JPEG not build into PHP | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36499@lists.php.net to get a copy of this message | ||
ID: 7498
Updated by: mrobinso
Reported By: siju@starmedia.net
Status: Closed
Bug Type: *Graphics related
Assigned To:
Comments:
The answer to your problem is in the gd Makefile.
There are more lines to edit than just the CFLAGS line.
You need to add -ljpeg to the LIBS line.
You need to add the path to jpeg-6b
to the INCLUDEDIRS line, thus:
INCLUDEDIRS=-I. -I/yourpathto/jpeg-6b/
All this information is in the Makefile and gd docs.
RTFM please.
In any event, this is not a php problem.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-30 17:37:47] siju@starmedia.net
I did CFLAGS=-DHAVE_JPEG and when I do a Make I get the following.
gcc -I. -I/usr/local/libpng-1.0.8 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
-I/usr/X11R6/include/ -I/usr/local/jpeg/work/jpeg-6b gdtest.o -o gdtest -L.
-L/usr/local/libpng-1.0.8 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/local/jpeg -L/usr/X11R6/include/
-lm -lgd -lpng -lz
./libgd.a(gd_jpeg.o): In function `fatal_jpeg_error':
gd_jpeg.o(.text+0x45): undefined reference to `jpeg_destroy'
./libgd.a(gd_jpeg.o): In function `gdImageJpegCtx':
gd_jpeg.o(.text+0x191): undefined reference to `jpeg_std_error'
gd_jpeg.o(.text+0x1fb): undefined reference to `jpeg_CreateCompress'
gd_jpeg.o(.text+0x236): undefined reference to `jpeg_set_defaults'
gd_jpeg.o(.text+0x251): undefined reference to `jpeg_set_quality'
gd_jpeg.o(.text+0x26c): undefined reference to `jpeg_simple_progression'
gd_jpeg.o(.text+0x2c8): undefined reference to `jpeg_destroy_compress'
gd_jpeg.o(.text+0x2ea): undefined reference to `jpeg_start_compress'
gd_jpeg.o(.text+0x392): undefined reference to `jpeg_write_marker'
gd_jpeg.o(.text+0x491): undefined reference to `jpeg_write_scanlines'
gd_jpeg.o(.text+0x4d8): undefined reference to `jpeg_finish_compress'
gd_jpeg.o(.text+0x4e7): undefined reference to `jpeg_destroy_compress'
./libgd.a(gd_jpeg.o): In function `gdImageCreateFromJpegCtx':
gd_jpeg.o(.text+0x5a3): undefined reference to `jpeg_std_error'
gd_jpeg.o(.text+0x627): undefined reference to `jpeg_CreateDecompress'
gd_jpeg.o(.text+0x64b): undefined reference to `jpeg_read_header'
gd_jpeg.o(.text+0x73a): undefined reference to `jpeg_start_decompress'
gd_jpeg.o(.text+0x8dd): undefined reference to `jpeg_read_scanlines'
gd_jpeg.o(.text+0x980): undefined reference to `jpeg_finish_decompress'
gd_jpeg.o(.text+0x9a8): undefined reference to `jpeg_destroy_decompress'
gd_jpeg.o(.text+0x9d0): undefined reference to `jpeg_destroy_decompress'
./libgd.a(gd_jpeg.o): In function `jpeg_gdIOCtx_src':
gd_jpeg.o(.text+0xc4b): undefined reference to `jpeg_resync_to_restart'
*** Error code 1
Stop.
"
I even tried doing a Package add. It added the package without any complains. But then it is hard to
compile a package into PHP.
---------------------------------------------------------------------------
[2000-10-30 17:08:49] siju@starmedia.net
I did CFLAGS=-DHAVE_JPEG and when I do a Make I get the following.
gcc -I. -I/usr/local/libpng-1.0.8 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
-I/usr/X11R6/include/ -I/usr/local/jpeg/work/jpeg-6b gdtest.o -o gdtest -L.
-L/usr/local/libpng-1.0.8 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/local/jpeg -L/usr/X11R6/include/
-lm -lgd -lpng -lz
./libgd.a(gd_jpeg.o): In function `fatal_jpeg_error':
gd_jpeg.o(.text+0x45): undefined reference to `jpeg_destroy'
./libgd.a(gd_jpeg.o): In function `gdImageJpegCtx':
gd_jpeg.o(.text+0x191): undefined reference to `jpeg_std_error'
gd_jpeg.o(.text+0x1fb): undefined reference to `jpeg_CreateCompress'
gd_jpeg.o(.text+0x236): undefined reference to `jpeg_set_defaults'
gd_jpeg.o(.text+0x251): undefined reference to `jpeg_set_quality'
gd_jpeg.o(.text+0x26c): undefined reference to `jpeg_simple_progression'
gd_jpeg.o(.text+0x2c8): undefined reference to `jpeg_destroy_compress'
gd_jpeg.o(.text+0x2ea): undefined reference to `jpeg_start_compress'
gd_jpeg.o(.text+0x392): undefined reference to `jpeg_write_marker'
gd_jpeg.o(.text+0x491): undefined reference to `jpeg_write_scanlines'
gd_jpeg.o(.text+0x4d8): undefined reference to `jpeg_finish_compress'
gd_jpeg.o(.text+0x4e7): undefined reference to `jpeg_destroy_compress'
./libgd.a(gd_jpeg.o): In function `gdImageCreateFromJpegCtx':
gd_jpeg.o(.text+0x5a3): undefined reference to `jpeg_std_error'
gd_jpeg.o(.text+0x627): undefined reference to `jpeg_CreateDecompress'
gd_jpeg.o(.text+0x64b): undefined reference to `jpeg_read_header'
gd_jpeg.o(.text+0x73a): undefined reference to `jpeg_start_decompress'
gd_jpeg.o(.text+0x8dd): undefined reference to `jpeg_read_scanlines'
gd_jpeg.o(.text+0x980): undefined reference to `jpeg_finish_decompress'
gd_jpeg.o(.text+0x9a8): undefined reference to `jpeg_destroy_decompress'
gd_jpeg.o(.text+0x9d0): undefined reference to `jpeg_destroy_decompress'
./libgd.a(gd_jpeg.o): In function `jpeg_gdIOCtx_src':
gd_jpeg.o(.text+0xc4b): undefined reference to `jpeg_resync_to_restart'
*** Error code 1
Stop.
"
I even tried doing a Package add. It added the package without any complains. But then it is hard to
compile a package into PHP.
---------------------------------------------------------------------------
[2000-10-28 03:43:59] mathieu@php.net
Your fix would be editing the GD Makefile;
CFLAGS=-DHAVE_JPEG
--Mathieu
---------------------------------------------------------------------------
[2000-10-27 23:26:39] rasmus@php.net
JPEG support needs to be compiled into GD. If the GD library you link into PHP doesn't have
support for JPEG, then linking the JPEG library into PHP has no effect.
---------------------------------------------------------------------------
[2000-10-27 22:48:43] siju@starmedia.net
I compiled php with jpeg6b, zlib,libpng1.0.8, gd,apache. The compile was successful, the make and
make install was successful too.
But my programs still do not work. They keep saying that JPEG was not build into this PHP. HELP ME
!!!!!
---------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view the rest of the comments,
please view the bug report online.
Full Bug description available at: http://bugs.php.net/?id=7498