|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25896 Doesn't detect DB3 version correctly
Submitted: 2003-10-17 09:41 UTC Modified: 2003-10-28 04:47 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kscott at toadmail dot com Assigned:
Status: No Feedback Package: DBM/DBA related
PHP Version: 4.3.4RC1 OS: Solaris 8
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-10-17 09:41 UTC] kscott at toadmail dot com
Also found this to be true in 4.3.3, but since 4.3.0 had already been installed on the system, I believe it worked ok.  The problem is that configure complains the major version doesn't match the header.  In fact, the header was fine, the library was recompiled a couple times and reinstalled just to be sure.  To work around this, I forced THIS_LIBS to equal $LIBS, and the configuration continued, and it appears PHP is working okay.  I really couldn't figure out why it fails.

The version of DB3 I'm using is 3.2.9.  I haven't tried another version yet.  OS is Solaris 8.  PHP versions attempted, 4.3.4RC1 and 4.3.3.  Both failed in same way.

Reproduce code:
Source near line 22980 in "configure."

Expected result:
It should detect and configure for DB3.  

Actual result:
checking for db3 major version... error: Header contains different version


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-17 09:49 UTC]
Check the config.log for more information about why it fails.

 [2003-10-28 04:47 UTC]
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-10-17 09:29 UTC] valdes at uchicago dot edu
This form says not to submit "this is how I solved it" 
comments to bugs that aren't open, but since I didn't 
originally submit this bug, I don't know how else to 
follow up on it.  So here goes.

I had this same problem, also on Solaris, when trying 
to configure php 4.3.9 with db2 or db3.  My db 
libraries and includes are in /usr/local/lib & /usr/
local/include, resp, and configure properly finds them.  
However, when "configure" compiles conftest's that use 
libdb*.*, the library option (-ldb*) is placed before 
conftest.c on the command line, and hence the 
compilation fails with a link error.  Eg, for db3, the 
config.log file shows:

configure:23508: cc -o conftest -O
-D_POSIX_PTHREAD_SEMANTICS -L/usr/local/lib -ldb3
-R/usr/ucblib -L/usr/ucblib conftest.c -lresolv -lm
-ldl -lnsl -lsocket 1>&5

which fails with:

Undefined                       first referenced
 symbol                             in file
db_create                           conftest.o
ld: fatal: Symbol referencing errors. No output written 
to conftest

The problem is that the "-ldb3" in the compilation 
command should come after the source file conftest.c.

One way to fix this in the configure script is by 
changing the lines around, eg, 23490 from 

    LIBS="-l$LIB $LIBS"

The proper fix would be to change the lines in ext/dba/
config.m4 that generate the relevant lines in 
configure, but I don't speak autoconf at the moment, so 
I can't produce a proper patch.  The bug is present for 
both db2 and db3 (and I'm guessing db4 too--I don't 
have db4 installed, so I didn't test it), so multiple 
changes are required.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jun 25 17:01:26 2019 UTC