php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20269 Something is broken when compiling with --with-jpeg as apache module
Submitted: 2002-11-05 17:26 UTC Modified: 2002-11-21 17:11 UTC
Votes:9
Avg. Score:3.9 ± 0.9
Reproduced:7 of 7 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (14.3%)
From: luci at conexim dot com dot au Assigned:
Status: No Feedback Package: GD related
PHP Version: 4.3.0-pre2 OS: RHL7.3
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 - 8 = ?
Subscribe to this entry?

 
 [2002-11-05 17:26 UTC] luci at conexim dot com dot au
modules/php4/libphp4.a(gd_jpeg.o): In function `fatal_jpeg_error':
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:57: undefined reference to `jpeg_destroy'
modules/php4/libphp4.a(gd_jpeg.o): In function `gdImageJpegCtx':
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:135: undefined reference to `jpeg_std_error'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:147: undefined reference to `jpeg_CreateCompress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:153: undefined reference to `jpeg_set_defaults'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:155: undefined reference to `jpeg_set_quality'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:164: undefined reference to `jpeg_simple_progression'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:175: undefined reference to `jpeg_destroy_compress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:181: undefined reference to `jpeg_start_compress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:190: undefined reference to `jpeg_write_marker'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:213: undefined reference to `jpeg_write_scanlines'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:245: undefined reference to `jpeg_write_scanlines'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:251: undefined reference to `jpeg_finish_compress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:253: undefined reference to `jpeg_destroy_compress'
modules/php4/libphp4.a(gd_jpeg.o): In function `gdImageCreateFromJpegCtx':
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:298: undefined reference to `jpeg_std_error'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:312: undefined reference to `jpeg_CreateDecompress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:316: undefined reference to `jpeg_read_header'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:347: undefined reference to `jpeg_start_decompress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:440: undefined reference to `jpeg_read_scanlines'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:453: undefined reference to `jpeg_finish_decompress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:458: undefined reference to `jpeg_destroy_decompress'
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:463: undefined reference to `jpeg_destroy_decompress'
modules/php4/libphp4.a(gd_jpeg.o): In function `jpeg_gdIOCtx_src':
/usr/local/src/php-4.3.0pre2/ext/gd/libgd/gd_jpeg.c:718: undefined reference to `jpeg_resync_to_restart'
collect2: ld returned 1 exit status

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-05 21:00 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This error occures becuase the linker (ld) cannot find the jpeg library. You can fix this problem by editing the config.nice file inside the php4 directory and adding 
LDFLAGS='-L/path/to/lib' \ 
above the ./configure \ 

For example is your libjpeg.so resides inside /usr/local/lib, you'd add -L/usr/local.

Once you've edited the file, remove config.cache and run ./config.nice, after that make; make install; should work.
 [2002-11-05 21:03 UTC] luci at conexim dot com dot au
The same config/compile configuration options have been used as with previously working php 4.1.x, 4.2.x.

The problem may be with the fact the the php4.3.x requires implicitly the new GD2 instead of the GD1 used before.
 [2002-11-05 21:06 UTC] iliaa@php.net
Could you please show you config line that you are using, in particular the parts related to gd configuration options.
 [2002-11-05 21:10 UTC] luci at conexim dot com dot au
./configure  --enable-safe-mode --with-exec-dir=/home/virtual--enable-calendar --with-mysql=/usr/local/mysql --with-apache=/usr/local/src/apache_1.3.27 --enable-trans-sid --enab
le-track-vars --with-zlib-dir --with-gd --with-jpeg-dir --with-ttf --enable-gd-native-ttf --enable-gd-imgstrttf --with-freetype-dir=/usr/local/include/freetype2 --with-curl=/usr/l
ib --with-imap --with-kerberos
 [2002-11-05 21:14 UTC] iliaa@php.net
Does the compilation work correctly if you remove the --with-jpeg-dir flag?

The purpose of that flag is to specify the directory where libjpeg can be found, since you are not specifying the path, you might as well leave that option out.
 [2002-11-05 21:29 UTC] luci at conexim dot com dot au
No, still the same without the flag.
 [2002-11-06 08:22 UTC] iliaa@php.net
First confirm that you do in fact have libjpeg library. You can do so by running 'locate libjpeg.so'. If you have the library, please add it to the LDFLAGS as per my earlier instructions and try to recompile PHP.
Before doing the recompile make sure to do: rm config.cache and make clean.
 [2002-11-21 17:11 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-04-12 17:01 UTC] smc+php at dogphilosophy dot net
Quick note - another possible cause of this problem seems 
to be multiple "libjpeg.so" files. 
 
In my case, compiling with Java support as well, and 
having a separate libjpeg.so file in the jre/lib/i386 
directory within it seems to be causing the same 
problem...
 [2006-06-20 06:06 UTC] techguy at netscan dot ca
I have tried the fixes suggested below, and I have posted this problem to at least 10 forums, newsgroups, email lists, etc. and still do not have an answer. This does appear to be a bug. I would really like an answer or a fix as I have wasted two weeks on this. 


#! /bin/sh
#
# Created by configure

LDFLAGS='-L/usr/lib' \
'./configure' \
'--with-mysql=/usr/local/mysql' \
'--with-xml' \
'--enable-track-vars' \
'--with-apache=../apache_1.3.31' \
'--with-gd' \
'--with-jpeg-dir=/usr/lib' \
'--with-zlib-dir=/usr/lib' \
'--with-png-dir=/usr/lib' \
"$@" 

 /home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c -o ext/gd/libgd/gd_jpeg.o  && echo > ext/gd/libgd/gd_jpeg.lo
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function `fatal_jpeg_error':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:56: error: structure has no member named `client_data'
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function `gdImageJpegCtx':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:114: error: structure has no member named `client_data'
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c: In function `gdImageCreateFromJpegCtx':
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:257: error: structure has no member named `client_data'
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error: `jpeg_saved_marker_ptr' undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error: (Each undeclared identifier is reported only once
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error: for each function it appears in.)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:330: error: parse error before "marker"
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:336: error: `marker' undeclared (first use in this function)
/home/shared/php-5.0.0/ext/gd/libgd/gd_jpeg.c:336: error: structure has no member named `marker_list'
make: *** [ext/gd/libgd/gd_jpeg.lo] Error 1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 07:01:28 2024 UTC