php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17671 Fails to build libphp4.so (builds libphp4.a instead!)
Submitted: 2002-06-09 21:13 UTC Modified: 2002-07-11 18:49 UTC
From: colin dot harford at mail dot su dot ualberta dot ca Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.0-dev OS: OpenBSD 3.1-current
Private report: No CVE-ID: None
 [2002-06-09 21:13 UTC] colin dot harford at mail dot su dot ualberta dot ca
Configured and made with:

./configure --with-apxs2=/var/opt/apache2/bin/apxs --with-mysql=/var/opt/db/mysql/ --enable-bcmath --with-gd=php --enable-debug --with-zlib --enable-sockets

When I go to start Apache 2 I get:

(kajack!/root) [root-]
# /opt/apache2/bin/apachectl start
/usr/libexec/ld.so: Undefined symbol "_gdFontGiant" in httpd:/opt/apache2/modules/libphp4.so
/opt/apache2/bin/apachectl start: httpd could not be started

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-09 21:30 UTC] colin dot harford at mail dot su dot ualberta dot ca
fyi:

I have tried installing php and mysql with and without --zlib.

Everything is of course happy without the --with-gd.  Of coruse I need --with-gd
 [2002-06-10 06:33 UTC] sander@php.net
Which version of GD are you using?
Can you try to compile --with-freetype?
 [2002-06-12 10:15 UTC] sniper@php.net
Could you try with this configure line and latest CVS:

./configure --with-gd=php --with-zlib


 [2002-06-12 16:00 UTC] colin dot harford at mail dot su dot ualberta dot ca
(kajack!/root/php4-200206120900) [root-ttyp1]
# /opt/apache2/bin/apachectl start
/usr/libexec/ld.so: Undefined symbol "_gdFontGiant" in 
httpd:/opt/apache2/modules/libphp4.so
/opt/apache2/bin/apachectl start: httpd could not be 
started

Nope, no dice!

CH
 [2002-06-12 19:15 UTC] sniper@php.net
That configure line does not make any apache2 module..

Please try again, this time with fresh sources from
http://snaps.php.net/ (the latest non-stable snapshot)
and after using the same short configure line I gave,
do 'make' and then try some script with the php binary
found in the same directory where you run configure in.

 [2002-06-13 16:27 UTC] colin dot harford at mail dot su dot ualberta dot ca
It loads the page just fine...

Is this what you wanted?

(kajack!/proc/8731) [root-ttyp0]
# /root/php4-200206131200/php /root/acid/acid_main.php 
X-Powered-By: PHP/4.3.0-dev
Set-Cookie: PHPSESSID=eb15a629846feb9edd12b63cf06c7e05; 
path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-
check=0, pre-check=0
Pragma: no-cache
Content-type: text/html


<!doctype html public "-//w3c//dtd html 4.0 transitional//
en">
<!-- Analysis Console for Incident Databases (ACID) 
0.9.6b21 -->
<HTML>

<HEAD>

  <META name="Author" content="Roman Danyliw">
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
  <META HTTP-EQUIV="REFRESH" CONTENT="180"; URL="";>
  <TITLE>Analysis Console for Intrusion Databases (ACID) </
TITLE>

  <LINK rel="stylesheet" type="text/css" href=
"acid_style.css">

</HEAD>

<BODY>

<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=5>
<TR>
  <TD class="mainheader"> &nbsp </TD>
  <TD class="mainheadertitle">
     <U>A</U>nalysis <U>C</U>onsole for <U>I</U>ntrusion <
U>D</U>atabases
  </TD>
</TR>
</TABLE>
<P><P>

<P><B>Error loading the DB Abstraction library: </B> from 
"/adodb.inc.php"<P>Check the DB abstraction library 
variable <CODE>$DBlib_path</CODE>  in <CODE>acid_conf.php</
CODE>
            <P>
            The underlying database library currently used 
is ADODB, that can be downloaded
            at <A HREF="http://php.weblogs.com/adodb">
http://php.weblogs.com/adodb</A>
(kajack!/proc/8731) [root-ttyp0]
 [2002-06-15 21:43 UTC] sniper@php.net
I can not reproduce this within Linux. (with Apache2)

Can you please try your original configure line
with the latest snapshot and also check that
the installed libphp4.so really is the latest and correct one.

(the paths in your error messages don't quite match the configure paths..?)


 [2002-06-16 16:02 UTC] colin dot harford at mail dot su dot ualberta dot ca
No dice:

(kajack!/root/php4-200206161200) [root-ttyp1]
# /var/opt/apache2/bin/apachectl start
/usr/libexec/ld.so: Undefined symbol "_gdFontGiant" in 
httpd:/opt/apache2/modules/libphp4.so
/var/opt/apache2/bin/apachectl start: httpd could not be 
started


btw: /opt = /var/opt (symlink)
 [2002-06-16 23:12 UTC] sniper@php.net
Where is gd.h located in your system?
(besides the one in the php4 sources)

 [2002-06-16 23:12 UTC] sniper@php.net
oops..feedback it was..

 [2002-06-16 23:20 UTC] colin dot harford at mail dot su dot ualberta dot ca
# find / -name gd.h
/usr/include/gd.h
/usr/local/include/gd.h
/var/opt/packages/gd-1.8.4/gd.h
/var/opt/packages/gd-2.0.1/gd.h
 [2002-06-17 00:07 UTC] cynic@php.net
looks like you have two versions of gd installed in different places.
wipe out all but the one you actually want to use and try again.
if this doesn't fix your problem, reopen the PR.

 [2002-06-17 10:35 UTC] sniper@php.net
Cynic, please READ the reports before you bogus them.
This is actually about our BUNDLED GD..reopened.

 [2002-06-28 03:49 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


Now if you build with the bundled GD library, the include
path for ext/gd/libgd/ is the first one. So it shouldn't
get that system gd.h anymore..


 [2002-06-28 13:15 UTC] colin dot harford at mail dot su dot ualberta dot ca
checking for Apache 2.0 module support via DSO through 
APXS... configure: error: Please note that Apache version >
= 2.0.40 is required.


Ummm, checking the apache site, and the latest release is 
2.0.39.
 [2002-06-28 14:53 UTC] derick@php.net
You will need apache's CVS version too... (We can't help they keep changing the API with every micro version :(

Derick
 [2002-06-28 17:03 UTC] colin dot harford at mail dot su dot ualberta dot ca
Something still not happy.... the ./configure is the exact 
same as earlier....

(kajack!/root/php4-200206281200) [root-ttyp3]
# make install
/root/php4-200206281200/build/shtool mkdir -p "/opt/
apache2/modules" && /var/opt/apache2/bin/apxs -S 
LIBEXECDIR="/opt/apache2/modules" -i -a -n php4 libphp4.la
/opt/apache2/build/instdso.sh SH_LIBTOOL='/opt/apache2/
build/libtool' libphp4.la /opt/apache2/modules
/opt/apache2/build/libtool --mode=install cp libphp4.la /
opt/apache2/modules/
cp .libs/libphp4.lai /opt/apache2/modules/libphp4.la
cp .libs/libphp4.a /opt/apache2/modules/libphp4.a
ranlib -t /opt/apache2/modules/libphp4.a
chmod 644 /opt/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --
finish /root/php4-200206281200/libs'
mv: rename /opt/apache2/modules/ to /opt/apache2/modules/
libphp4.so: Invalid argument
chmod 755 /opt/apache2/modules/libphp4.so
chmod: /opt/apache2/modules/libphp4.so: No such file or 
directory
apxs:Error: Command failed with rc=65536
.
*** Error code 1

Stop in /root/php4-200206281200 (line 123 of Makefile).
 [2002-06-28 20:50 UTC] sniper@php.net
Could you please try with Apache 1.3.26? Apache2 seems to be
in a bit unstable phase atm..

 [2002-06-28 21:10 UTC] colin dot harford at mail dot su dot ualberta dot ca
(kajack!/root/php4-200206281200) [root-ttyp5]
# make install
/root/php4-200206281200/build/shtool mkdir -p "/var/opt/
apache/libexec" && /var/opt/apache/bin/apxs -S LIBEXECDIR=
"/var/opt/apache/libexec" -i -a -n php4 libs/libphp4.so
[activating module `php4' in /var/opt/apache/conf/
httpd.conf]
cp libs/libphp4.so /var/opt/apache/libexec/libphp4.so
cp: libs/libphp4.so: No such file or directory
apxs:Break: Command failed with rc=1
*** Error code 1

Stop in /root/php4-200206281200 (line 123 of Makefile).

(kajack!/root/php4-200206281200) [root-ttyp5]

Still no dice...
 [2002-06-28 21:17 UTC] sniper@php.net
After configure/make, what is in /root/php4-200206281200/.libs/ ??

 [2002-06-28 21:21 UTC] colin dot harford at mail dot su dot ualberta dot ca
(kajack!/root/php4-200206281800) [root-ttyp5]
# make install
/root/php4-200206281800/build/shtool mkdir -p "/var/opt/
apache/libexec" && /var/opt/apache/bin/apxs -S LIBEXECDIR=
"/var/opt/apache/libexec" -i -a -n php4 libs/libphp4.so
[activating module `php4' in /var/opt/apache/conf/
httpd.conf]
cp libs/libphp4.so /var/opt/apache/libexec/libphp4.so
cp: libs/libphp4.so: No such file or directory
apxs:Break: Command failed with rc=1
*** Error code 1

Stop in /root/php4-200206281800 (line 123 of Makefile).

(kajack!/root/php4-200206281800) [root-ttyp5]
# cd .libs/

(kajack!/root/php4-200206281800/.libs) [root-ttyp5]
# ls
.           ..          libphp4.a   libphp4.la  libphp4.lai

(kajack!/root/php4-200206281800/.libs) [root-ttyp5]
#
 [2002-06-28 21:26 UTC] sniper@php.net
Wierd..is this happening with _clean_ and freshly untarred sources? Which libtool you have installed? (libtool --version)

For some odd reason it's not building shared extension.
Can you check what the last link line is?

 [2002-06-28 21:28 UTC] colin dot harford at mail dot su dot ualberta dot ca
It is a brand fresh new source, notice the new date on the 
directory (more recent cvs).


# libtool --version
ltmain.sh (GNU libtool) 1.3.5 (1.385.2.206 2000/05/27 
11:12:27)
 [2002-06-28 21:48 UTC] sniper@php.net
This is not any GD problem anymore..so reclassified.

The libtool shouldn't actually matter, as it uses the bundled libtool anyway. You're using the snapshots, right?
And not getting the stuff from directly from CVS?

Which gcc version you have? And what was that last link line again? 

 [2002-06-28 22:02 UTC] colin dot harford at mail dot su dot ualberta dot ca
# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-
openbsd3.1/2.95.3/specs
gcc version 2.95.3 20010125 (prerelease)


Ya, sorry, I am using the snapshots and not cvs....

I have enabled you directly sniper with the full, ./
configure, make, make install, and cat Makefile output 
rather than flood the list.
 [2002-06-28 23:57 UTC] sniper@php.net
Relevant part of that output was this:

*** Warning: This library needs some functionality provided by -lresolv.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This library needs some functionality provided by -lresolv.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp4.  Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.

 [2002-06-29 00:01 UTC] colin dot harford at mail dot su dot ualberta dot ca
So what exactly do I need to install...
 [2002-06-29 02:00 UTC] colin dot harford at mail dot su dot ualberta dot ca
(kajack!/home/charford/php4) [root-ttyp8]
# /opt/apache/bin/apachectl start
/opt/apache/bin/apachectl start: httpd started

Looks like the latest snapshot you emailed me sniper seems 
to fix the problems...


*Dances around*

It only took a month, but now I can build my testing 
NIDS....


Thanks for all your help Sniper.  

The funny thing is my two other OpenBSD machines run php 
with gd (non embeded php gd though).... When I saw the post 
on the QA list, I figured I would give this one a try....
 [2002-07-03 17:39 UTC] colin dot harford at mail dot su dot ualberta dot ca
from: sniper@php.net

    Please contact sas@php.net as he knows how to fix this.
    Feel free to reopen the bug report, it's not fixed in 
CVS.
    
    --Jani
 [2002-07-07 21:24 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

Should be fixed for real now.

http://snaps.php.net/php4-latest.tar.gz

 [2002-07-11 18:49 UTC] colin dot harford at mail dot su dot ualberta dot ca
everything looks good.  

Compiled just fine and runs.


Thnxs all.


CH
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 07:00:01 2026 UTC