From: <ra...@ar...> - 2003-08-14 05:16:47
|
Hello there. I think I have solved this before, but I cannot remember how. I am using Debian Woody + some add-ons I build freeTDS from source ./configure --enable-threadsafe make make install I build Sybase SYBASE=/usr/local/ python2.2 setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY -D WANT_THREADS I get this: gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c cmd.c -o build/temp.linux-i686-2.2/cmd.o cmd.c: In function `CS_COMMAND_ct_param': cmd.c:787: warning: overflow in implicit constant conversion gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c conn.c -o build/temp.linux-i686-2.2/conn.o conn.c: In function `CS_CONNECTION_ct_diag': conn.c:82: warning: implicit declaration of function `ct_diag' gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c ctx.c -o build/temp.linux-i686-2.2/ctx.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c datafmt.c -o build/temp.linux-i686-2.2/datafmt.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c iodesc.c -o build/temp.linux-i686-2.2/iodesc.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c locale.c -o build/temp.linux-i686-2.2/locale.o gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DWANT_THREADS=1 -UWANT_BULKCOPY -I/usr/local/include -I/usr/include/python2.2 -c msgs.c -o build/temp.linux-i686-2.2/msgs.o msgs.c:144: structure has no member named `sqlstate' msgs.c:144: initializer element is not constant msgs.c:144: (near initialization for `CS_SERVERMSG_memberlist[8].offset') msgs.c: In function `CS_SERVERMSG_getattr': msgs.c:154: structure has no member named `textlen' msgs.c:164: structure has no member named `sqlstate' msgs.c:165: structure has no member named `sqlstatelen' error: command 'gcc' failed with exit status 1 ++++++++ If I try without -D WANT_THREADS (I do want them) the module builds OK, but then I get this Python 2.2.1 (#1, Sep 7 2002, 14:34:30) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/Sybase.py", line 20, in ? from sybasect import * ImportError: /usr/lib/python2.2/site-packages/sybasect.so: undefined symbol: ct_diag Thank you very much. Any pointers? |