I can't compile with this configuration:
Linux
Interbase 7.5
Python 2.3 or 2.4 (from Python.org or included in OS)
KinterbasDB 3.2
I changed this in the setup.cfg
database_is_firebird=0
database_home_dir=/opt/interbase
database_include_dir=/opt/interbase/include
database_lib_dir=/opt/interbase/lib
database_lib_name=gds
When executing 'python setup.py install' I get the following message:
building 'kinterbasdb._kinterbasdb' extension
creating build/temp.linux-i686-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -UNDEBUG -I/usr/include/python2.3 -I/opt/interbase/include -I/usr/include/python2.3 -c _kinterbasdb.c -o build/temp.linux-i686-2.3/_kinterbasdb.o -pedantic -std=c99 -fno-strict-aliasing -pthread
In file included from _kinterbasdb.c:166:
_kicore_connection.c: In function `pyob_Connection_x_info':
_kicore_connection.c:1186: warning: pointer targets in passing arg 1 of `isc_portable_integer' differ in signedness
_kinterbasdb.c: In function `pyob_isc_portable_integer':
_kinterbasdb.c:277: warning: pointer targets in passing arg 1 of `isc_portable_integer' differ in signedness
In file included from _kinterbasdb.c:751:
_kinterbasdb_constants.c: In function `_init_kidb_ibase_header_constants_general':
_kinterbasdb_constants.c:160: error: `isc_dpb_set_db_charset' undeclared (first use in this function)
_kinterbasdb_constants.c:160: error: (Each undeclared identifier is reported only once
_kinterbasdb_constants.c:160: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1
I didn't have any problems with
kinterbasdb-3.2_pre_20051217
I think isc_dpb_set_db_charset is not declared in my ibase.h... I achieved to workaround this modifying
_kinterbasdb_constants.c, with an ifdef, as I saw it had been done with other functions.
SET_PARAMBUF_CONST(isc_dpb_gfix_attach);
SET_PARAMBUF_CONST(isc_dpb_gstat_attach);
--> #ifdef isc_dpb_set_db_charset ---------
SET_PARAMBUF_CONST(isc_dpb_set_db_charset);
#endif
---------------------------------------
#ifdef isc_dpb_gsec_attach
SET_PARAMBUF_CONST(isc_dpb_gsec_attach);
#endif
#ifdef isc_dpb_address_path
SET_PARAMBUF_CONST(isc_dpb_address_path);
#endif
But i can't import kinterbasdb in the python interpreter...
Logged In: YES
user_id=414645
Originator: NO
Thanks for the bug report. I'll be sure to fix this in 3.2.1.
Logged In: YES
user_id=65965
Originator: NO
I did something similar, but you also have to comment out the line in __init__.py prior to building and installing similar to what I've done here:
_DPB_CODES_WITH_STRING_VALUE = (
isc_dpb_user_name,
isc_dpb_password,
isc_dpb_lc_messages,
# This doesn't exist in IB7.5... How do I prevent adding it to the list?
#isc_dpb_set_db_charset,
)
Logged In: YES
user_id=414645
Originator: NO
Note that this has long been fixed in the 3.2 snapshots (http://kinterbasdb.sourceforge.net/snapshots/3.2/ ), which will soon become 3.2.1.
Logged In: YES
user_id=65965
Originator: NO
I wasn't aware that a fix was available. I'm on windows looking to upgrade to python from 2.4 to 2.5 but there was no binary for 2.5 and interbase 7.5, so I did a CVS checkout, which I thought would give me the newest sources?
To get setup.py build to work I had to hard-code the MSVC lib and include files in setup.py because the regestry keys it was looking for just didn't exist. Then the library wasn't compiling due to the isc_dpb_set_db_charset constant, so I added some conditional logic to that. Then it built and installed, but I couldn't import kinterbasdb until I commented out the line in __init__.py.
Is the CVS out of date? Or did I miss something? I checked out module Kinterbasdb-3.0.
Logged In: YES
user_id=414645
Originator: NO
Yes, CVS is out of date.
"To get setup.py build to work I had to hard-code the MSVC lib and include files in setup.py because the regestry keys it was looking for just didn't exist."
If you're using the MSVC 2003 Command Line Toolkit, that's expected. The Python distutils developers never bothered to try to support the Command Line Toolkit, only full MSVC 2003.
The GCC 4.1.2 distribution at
http://www.develer.com/oss/GccWinBinaries
works effectively and conveniently, at least with FB 1.5+. I don't know about IB 7.5.
---
I had not recently uploaded a binary snapshot compatible with Interbase 7.5, but now I've uploaded a snapshot for FB 1.0, which should work with IB 7.5:
http://kinterbasdb.sourceforge.net/snapshots/3.2/kinterbasdb-3.2_20070521.win32-FB-1.0-py2.5.exe