php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12906 Configure appends extra -l with libjpeg test
Submitted: 2001-08-22 13:12 UTC Modified: 2001-08-22 18:45 UTC
From: ron at csu dot concordia dot ca Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.6 OS: Caldera Linux
Private report: No CVE-ID: None
 [2001-08-22 13:12 UTC] ron at csu dot concordia dot ca
On a clean php-4.0.6 distribution, (untar the file and then cd to the directory) the following configure command causes problems:

./configure --with-mysql --with-apache=../apache_1.3.12 --enable-track-vars --with-gd=/usr/local --with-jpeg-dir=/usr/local --with-xpm-dir=/usr/X11R6

checking whether to include GD support... yes
checking whether to enable truetype string function in gd... no
checking for the location of libjpeg... yes
checking for jpeg_read_header in -ljpeg... no
configure: error: libjpeg not found!

Here is the config.log entry:

--------- CUT HERE ------
configure:17964: checking for jpeg_read_header in -ljpeg
configure:17985: gcc -o conftest -g -O2   conftest.c -ljpeg
      -L/usr/local/lib
     -l -lcrypt -lresolv -lm -ldl -lnsl  -lresolv 1>&5
/usr/i386-linux/bin/ld: cannot open -l-lcrypt: No such file or directory
configure: failed program was:
#line 17974 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char jpeg_read_header();

int main() {
jpeg_read_header()
; return 0; }

--------- CUT HERE ------

Note the extra -l with no library before -l crypt. This is what is causing the test to fail, despite the jpeg library having being isntalled correctly. Compiling the same test program without the extra -l succeeds. 

Thanks! 

Ron. 

P.S. Are there any workarounds to this problem? I'm still trying to figure out which part of the configure command is adding the extra -l. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-22 13:17 UTC] sniper@php.net
I fixed something like this in the CVS..but I can't remember
now what and where it was. :(

Please try the latest CVS snapshot from 
http://snaps.php.net/ 

--Jani

 [2001-08-22 13:32 UTC] ron at csu dot concordia dot ca
Thanks Jani - The latest snapshot seems to configure without errors. It whined about my IMAP path, but I just used --with-imap, and it seems to have configured OK. 

Ron. 

 [2001-08-22 13:53 UTC] ron at csu dot concordia dot ca
I think I spoke too soon... It's still problematic, even with the latest CVS. I think the reason it succeeded was because there was no 'ext' subdirectory in the snapshot.... 

Ron
 [2001-08-22 18:45 UTC] sniper@php.net
Get a new snapshot. You might have got some errors
during transfer. (I tested the latest snapshot and it works just fine)


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC