Closed alfiqmiq closed 2 years ago
# pkg info | grep firebird
firebird25-client-2.5.8_7 Firebird-2 database client
firebird25-server-2.5.8_7 Firebird-2 relational database (server)
# find /usr/ -iname "libfbclient*" -o -iname "libgds*" -o -iname "libib_util*"
/usr/local/lib/libgds.so.2.5
/usr/local/lib/libfbclient.so.2
/usr/local/lib/libib_util.so
/usr/local/lib/libgds.so
/usr/local/lib/libfbclient.so.2.5
/usr/local/lib/libfbclient.so
/usr/local/lib/libfbclient.so.2.5.8
/usr/local/lib/libgds.so.2
Yes, sorry I missed that at first. I'll leave this to Martin then; sorry for my intrusion.
I always try to give as many information as i can ;-)
Well, I don't have any experiences with Free BSD. But we'll find out what the problem is.
As I can see you're trying to compile the PHP 64 bit version. What version is Firebird? 64 bit too? Or 32 bit?
pkg info firebird25-server
firebird25-server-2.5.8_7
Name : firebird25-server
Version : 2.5.8_7
Installed on : Sun Mar 21 05:19:00 2021 CET
Origin : databases/firebird25-server
Architecture : FreeBSD:13:amd64
Prefix : /usr/local
Categories : databases
Licenses : IPL, IDPL
Maintainer : acm@FreeBSD.org
WWW : https://sourceforge.net/projects/firebird/
Comment : Firebird-2 relational database (server)
Shared Libs required:
libfbclient.so.2
libicuuc.so.68
libicui18n.so.68
libfbembed.so.2.5
libicudata.so.68
libib_util.so
Shared Libs provided:
libfbtrace.so.0
libfbintl.so.1
Annotations :
FreeBSD_version: 1300139
cpe : cpe:2.3:a:firebird:firebird:2.5.8:::::freebsd13:x64:7
repo_type : binary
repository : FreeBSD
Flat size : 12.0MiB
Description :
Firebird is a relational database offering many ANSI SQL-99 features
that runs on Linux, Windows, and a variety of Unix platforms. Firebird
offers excellent concurrency, high performance, and powerful language
support for stored procedures and triggers. It has been used in
production systems, under a variety of names since 1981.
Firebird is completely free of any registration, licensing or deployment
fees. It may be deployed freely for use with any third-party software,
whether commercial or not.
WWW: https://sourceforge.net/projects/firebird/
WWW: http://www.firebirdsql.org/
any progress / solution ?
Using -I switch for lib directory makes no sense (it works with include files, not libraries), if you wish - try with -L CPPFLAGS=-L/usr/local/lib/ ./configure but I doubt it can help, by default libraries in /usr/local/lib are present in lib search path.
Well, I never used BSD. If someone is able to compile the driver on BSD, please let me know. Then we can add a section at the wiki.
Well, I never used BSD. If someone is able to compile the driver on BSD, please let me know. Then we can add a section at the wiki.
If U can help me with compilation then we can try do it together
git clone https://github.com/FirebirdSQL/php-firebird.git
cd php-firebird/
phpize
CPPFLAGS=-L/usr/local/lib ./configure
make
/bin/sh /root/php-firebird/libtool --mode=compile cc -I. -I/root/php-firebird -I/root/php-firebird/include -I/root/php-firebird/main -I/root/php-firebird -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/opt/firebird/include -L/usr/local/lib -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-firebird/interbase.c -o interbase.lo
mkdir .libs
cc -I. -I/root/php-firebird -I/root/php-firebird/include -I/root/php-firebird/main -I/root/php-firebird -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/opt/firebird/include -L/usr/local/lib -DHAVE_CONFIG_H -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-firebird/interbase.c -fPIC -DPIC -o .libs/interbase.o
cc: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
In file included from /root/php-firebird/interbase.c:35:
./php_ibase_includes.h:24:10: fatal error: 'ibase.h' file not found
#include <ibase.h>
^~~~~~~~~
1 error generated.
*** Error code 1
Stop.
find /usr/ -iname "libfbclient*" -o -iname "libgds*" -o -iname "libib_util*" -o -iname "ibase.h*"
/usr/local/lib/libfbclient.so.2.5.8
/usr/local/lib/libfbclient.so.2.5
/usr/local/lib/libib_util.so
/usr/local/lib/libfbclient.so.2
/usr/local/lib/libfbclient.so
/usr/local/lib/libgds.so.2.5
/usr/local/lib/libgds.so.2
/usr/local/lib/libgds.so
/usr/local/include/ibase.h
Next i try:
./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
Result:
[root@php80.bsd|~/php-firebird]# make
/bin/sh /root/php-firebird/libtool --mode=compile cc -I. -I/root/php-firebird -I/root/php-firebird/include -I/root/php-firebird/main -I/root/php-firebird -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/opt/firebird/include -DHAVE_CONFIG_H -I/usr/local/include -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-firebird/ibase_query.c -o ibase_query.lo
cc -I. -I/root/php-firebird -I/root/php-firebird/include -I/root/php-firebird/main -I/root/php-firebird -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/opt/firebird/include -DHAVE_CONFIG_H -I/usr/local/include -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /root/php-firebird/ibase_query.c -fPIC -DPIC -o .libs/ibase_query.o
/root/php-firebird/ibase_query.c:159:24: warning: equality comparison result unused [-Wunused-comparison]
ib_result->stmt_res == NULL;
~~~~~~~~~~~~~~~~~~~~^~~~~~~
/root/php-firebird/ibase_query.c:159:24: note: use '=' to turn this equality comparison into an assignment
ib_result->stmt_res == NULL;
^~
=
/root/php-firebird/ibase_query.c:178:22: warning: equality comparison result unused [-Wunused-comparison]
ib_query->stmt_res == NULL;
~~~~~~~~~~~~~~~~~~~^~~~~~~
/root/php-firebird/ibase_query.c:178:22: note: use '=' to turn this equality comparison into an assignment
ib_query->stmt_res == NULL;
^~
=
/root/php-firebird/ibase_query.c:253:22: error: use of undeclared identifier 'blr_bool'
case blr_bool:
^
/root/php-firebird/ibase_query.c:254:34: error: use of undeclared identifier 'SQL_BOOLEAN'
a->el_type = SQL_BOOLEAN;
^
/root/php-firebird/ibase_query.c:598:22: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/root/php-firebird/ibase_query.c:790:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/root/php-firebird/ibase_query.c:795:32: error: use of undeclared identifier 'SQL_BOOLEAN'
var->sqltype = SQL_BOOLEAN;
^
/root/php-firebird/ibase_query.c:883:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/root/php-firebird/ibase_query.c:1386:14: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/root/php-firebird/ibase_query.c:1985:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/root/php-firebird/ibase_query.c:2012:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
2 warnings and 9 errors generated.
*** Error code 1
Stop.
make: stopped in /root/php-firebird
I was able to build it (both with gcc and clang) without problems with:
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
(FreeBSD keeps 3rd party software in /usr/local/ prefix)
The problem about SQL_BOOLEAN should be fixed in the last commit.
This can be closed I think.
@alfiqmiq If you still have problems, maybe it's your box. I built for you the module for PHP 8.0 and Firebird 2.5. My system is 13-STABLE but it is binary compatible with all 13.x-RELEASEs.
@diegosardina thanks for reply,
I can confirm that on my homelab (13.0-RELEASE FreeBSD amd64
), extension was compiled succesfully with php-firebird commit eb2f5df
, and php 8.0
, i will do some tests and will close this if everything will be ok :-)
Also i will try to compile module and check it with php 8.1
.
It compiles well with PHP 8.1 and Firebird 4.0, this is what I use :-)
I'm trying to compile php8 + Firebird extension with no success
Steps to reproduce:
fail occurred
so ...
and than i use
still no success