php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58158 flags not present
Submitted: 2008-04-15 07:27 UTC Modified: 2008-04-15 09:28 UTC
From: myname at gourad dot biz Assigned:
Status: Closed Package: tdb (PECL)
PHP Version: 5.2.5 OS: FreeBSD 6.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: myname at gourad dot biz
New email:
PHP Version: OS:

 

 [2008-04-15 07:27 UTC] myname at gourad dot biz
Description:
------------
Version tdb 1.0.6

running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
 1. Please provide the path to Trivial DB installation : autodetect

1-1, 'all', 'abort', or Enter to continue: 
building in /var/tmp/pear-build-root/tdb-0.1.0
running: /tmp/tdb/configure --with-tdb
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... yes
checking build system type... i386-unknown-freebsd6.3
checking host system type... i386-unknown-freebsd6.3
checking target system type... i386-unknown-freebsd6.3
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/20060613
checking for PHP installed headers prefix... /usr/local/include/php
checking for re2c... re2c
checking for re2c version... 0.12.1 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for Trivial DB support... yes, shared
checking for Trivial DB files in default path... found in /usr/local/
checking for tdb_open in -ltdb... no
configure: error: wrong Trivial DB lib version or lib not found
ERROR: `/tmp/tdb/configure --with-tdb' failed


Reproduce code:
---------------
cd /usr/ports/databases/tdb/ && make install
pecl install channel://pecl.php.net/tdb-0.1.0



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-15 07:36 UTC] tony at daylessday dot org
>error: wrong Trivial DB lib version or lib not found

Well, you didn't provide any info, so I can only repeat this message.
Look for more information in config.log.
 [2008-04-15 07:49 UTC] myname at gourad dot biz
configure:3867: checking for Trivial DB files in default path
configure:3872: result: found in /usr/local/
configure:4023: checking for tdb_open in -ltdb
configure:4058: gcc -o conftest -g -O2  -R/usr/local//lib -L/usr/local//lib  -lm -ldl conftest.c -ltdb   >&5
/usr/bin/ld: cannot find -ldl
configure:4064: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING "" 
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char tdb_open ();
| int
| main ()
| {
| return tdb_open ();
|   ;
|   return 0;
| }
configure:4083: result: no
configure:4200: error: wrong Trivial DB lib version or lib not found
 [2008-04-15 07:59 UTC] tony at daylessday dot org
Please try to remove "-ldl" from config.m4 and then run `phpize --clean && phpize && ./configure --with-tdb && make`.
 [2008-04-15 08:18 UTC] myname at gourad dot biz
configure is ok.
More errors with make:
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
meganuke# make
/usr/local/bin/bash /root/tdb-0.1.0/libtool --mode=compile gcc  -I. -I/root/tdb-0.1.0 -DPHP_ATOM_INC -I/root/tdb-0.1.0/include -I/root/tdb-0.1.0/main -I/root/tdb-0.1.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local//include  -DHAVE_CONFIG_H  -g -O2   -c /root/tdb-0.1.0/tdb.c -o tdb.lo
mkdir .libs
 gcc -I. -I/root/tdb-0.1.0 -DPHP_ATOM_INC -I/root/tdb-0.1.0/include -I/root/tdb-0.1.0/main -I/root/tdb-0.1.0 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/local//include -DHAVE_CONFIG_H -g -O2 -c /root/tdb-0.1.0/tdb.c  -fPIC -DPIC -o .libs/tdb.o
/root/tdb-0.1.0/tdb.c: In function `zm_startup_tdb':
/root/tdb-0.1.0/tdb.c:89: error: `TDB_NOSYNC' undeclared (first use in this function)
/root/tdb-0.1.0/tdb.c:89: error: (Each undeclared identifier is reported only once
/root/tdb-0.1.0/tdb.c:89: error: for each function it appears in.)
/root/tdb-0.1.0/tdb.c:90: error: `TDB_SEQNUM' undeclared (first use in this function)
/root/tdb-0.1.0/tdb.c: In function `zif_tdb_unlock':
/root/tdb-0.1.0/tdb.c:489: error: void value not ignored as it ought to be
/root/tdb-0.1.0/tdb.c: In function `zif_tdb_chainunlock':
/root/tdb-0.1.0/tdb.c:561: error: void value not ignored as it ought to be
*** Error code 1
 [2008-04-15 08:24 UTC] tony at daylessday dot org
> configure is ok.

Ok, will commit the fix in a minute.

> error: `TDB_NOSYNC' undeclared
All flags for tdb_open() including TDB_NOSYNC are defined in tdb.h.
If they are not, there must be something with TDB or its headers.
 [2008-04-15 09:25 UTC] myname at gourad dot biz
In TDB 1.0.6 tdb.h flags:
TDB_NOSYNC
TDB_SEQNUM
is not presented.
 [2008-04-15 09:28 UTC] tony at daylessday dot org
Then I'm afraid TDB 1.0.6 won't work, you need to follow the instructions written here:
http://cvs.php.net/viewvc.cgi/pecl/tdb/README?revision=1.1

I'll add some checks to be sure it's detected in configure.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC