From: Terry B. <te...@te...> - 2009-03-05 17:40:53
|
Hi, I'm happily running the Python-Sybase module on Python 2.5.2, FreeTDS 0.82, Debian Lenny/686. Everything work with no problems. However, when I build the module on an equivalent 64-bit system Python 2.5.2, FreeTDS 0.82, Debian Lenny/AMD64, I encounter the following runtime error when running import Sybase: Traceback (most recent call last): File "/srv/ipdb/bin/ndor_latest", line 3, in <module> import Sybase File "/usr/lib/python2.5/site-packages/Sybase.py", line 11, in <module> from sybasect import * ImportError: /usr/lib/python2.5/site-packages/sybasect.so: undefined symbol: cs_config Any clues as to what might be happening would be gratefully received. All the best, Terry ---- Build output... $ export SYBASE=/usr $ python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY running build_ext building 'sybasect' extension creating build creating build/temp.linux-x86_64-2.5 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c blk.c -o build/temp.linux-x86_64-2.5/blk.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c databuf.c -o build/temp.linux-x86_64-2.5/databuf.o databuf.c:498: warning: initialization from incompatible pointer type gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c cmd.c -o build/temp.linux-x86_64-2.5/cmd.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c conn.c -o build/temp.linux-x86_64-2.5/conn.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c ctx.c -o build/temp.linux-x86_64-2.5/ctx.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c datafmt.c -o build/temp.linux-x86_64-2.5/datafmt.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c iodesc.c -o build/temp.linux-x86_64-2.5/iodesc.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c locale.c -o build/temp.linux-x86_64-2.5/locale.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c msgs.c -o build/temp.linux-x86_64-2.5/msgs.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c numeric.c -o build/temp.linux-x86_64-2.5/numeric.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c money.c -o build/temp.linux-x86_64-2.5/money.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c datetime.c -o build/temp.linux-x86_64-2.5/datetime.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c date.c -o build/temp.linux-x86_64-2.5/date.o gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c sybasect.c -o build/temp.linux-x86_64-2.5/sybasect.o creating build/lib.linux-x86_64-2.5 gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.5/blk.o build/temp.linux-x86_64-2.5/databuf.o build/temp.linux-x86_64-2.5/cmd.o build/temp.linux-x86_64-2.5/conn.o build/temp.linux-x86_64-2.5/ctx.o build/temp.linux-x86_64-2.5/datafmt.o build/temp.linux-x86_64-2.5/iodesc.o build/temp.linux-x86_64-2.5/locale.o build/temp.linux-x86_64-2.5/msgs.o build/temp.linux-x86_64-2.5/numeric.o build/temp.linux-x86_64-2.5/money.o build/temp.linux-x86_64-2.5/datetime.o build/temp.linux-x86_64-2.5/date.o build/temp.linux-x86_64-2.5/sybasect.o -o build/lib.linux-x86_64-2.5/sybasect.so |
From: Sébastien S. <sa...@us...> - 2009-03-06 13:41:55
|
Hi Terry, the sybase module is not linked to the freetds libraries, that is why there are some undefined symbols. This is probably because the setup.py script is not looking with the correct name for those libraries. Could you please send me privately the list of files installed by your freetds package or the result of the following command: ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* \ /usr/lib/*libsybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* \ /usr/lib/lib*intl* regards -- Sébastien Sablé Terry Burton a écrit : > Hi, > > I'm happily running the Python-Sybase module on Python 2.5.2, FreeTDS > 0.82, Debian Lenny/686. Everything work with no problems. > > However, when I build the module on an equivalent 64-bit system Python > 2.5.2, FreeTDS 0.82, Debian Lenny/AMD64, I encounter the following > runtime error when running import Sybase: > > Traceback (most recent call last): > File "/srv/ipdb/bin/ndor_latest", line 3, in <module> > import Sybase > File "/usr/lib/python2.5/site-packages/Sybase.py", line 11, in <module> > from sybasect import * > ImportError: /usr/lib/python2.5/site-packages/sybasect.so: undefined > symbol: cs_config > > Any clues as to what might be happening would be gratefully received. > > > All the best, > > Terry > > > ---- > > Build output... > > $ export SYBASE=/usr > $ python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY > running build_ext > building 'sybasect' extension > creating build > creating build/temp.linux-x86_64-2.5 > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c blk.c -o > build/temp.linux-x86_64-2.5/blk.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c databuf.c > -o build/temp.linux-x86_64-2.5/databuf.o > databuf.c:498: warning: initialization from incompatible pointer type > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c cmd.c -o > build/temp.linux-x86_64-2.5/cmd.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c conn.c -o > build/temp.linux-x86_64-2.5/conn.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c ctx.c -o > build/temp.linux-x86_64-2.5/ctx.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c datafmt.c > -o build/temp.linux-x86_64-2.5/datafmt.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c iodesc.c -o > build/temp.linux-x86_64-2.5/iodesc.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c locale.c -o > build/temp.linux-x86_64-2.5/locale.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c msgs.c -o > build/temp.linux-x86_64-2.5/msgs.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c numeric.c > -o build/temp.linux-x86_64-2.5/numeric.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c money.c -o > build/temp.linux-x86_64-2.5/money.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c datetime.c > -o build/temp.linux-x86_64-2.5/datetime.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c date.c -o > build/temp.linux-x86_64-2.5/date.o > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall > -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -DSYB_LP64 -DHAVE_DATETIME > -DHAVE_DECIMAL -DHAVE_BLK_ALLOC -DHAVE_BLK_DESCRIBE -DHAVE_BLK_DROP > -DHAVE_BLK_ROWXFER_MULT -DHAVE_BLK_TEXTXFER -DHAVE_CT_CURSOR > -DHAVE_CT_DATA_INFO -DHAVE_CT_DYNAMIC -DHAVE_CT_SEND_DATA > -DHAVE_CT_SETPARAM -DHAVE_CS_CALC -DHAVE_CS_CMP -DHAVE_FREETDS=1 > -UWANT_BULKCOPY -I/usr/include -I/usr/include/python2.5 -c sybasect.c > -o build/temp.linux-x86_64-2.5/sybasect.o > creating build/lib.linux-x86_64-2.5 > gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions > build/temp.linux-x86_64-2.5/blk.o > build/temp.linux-x86_64-2.5/databuf.o > build/temp.linux-x86_64-2.5/cmd.o build/temp.linux-x86_64-2.5/conn.o > build/temp.linux-x86_64-2.5/ctx.o > build/temp.linux-x86_64-2.5/datafmt.o > build/temp.linux-x86_64-2.5/iodesc.o > build/temp.linux-x86_64-2.5/locale.o > build/temp.linux-x86_64-2.5/msgs.o > build/temp.linux-x86_64-2.5/numeric.o > build/temp.linux-x86_64-2.5/money.o > build/temp.linux-x86_64-2.5/datetime.o > build/temp.linux-x86_64-2.5/date.o > build/temp.linux-x86_64-2.5/sybasect.o -o > build/lib.linux-x86_64-2.5/sybasect.so > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Python-sybase-misc mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-sybase-misc |
From: Terry B. <te...@te...> - 2009-03-06 14:58:57
|
On Fri, Mar 6, 2009 at 1:25 PM, Sébastien Sablé <sa...@us...> wrote: > the sybase module is not linked to the freetds libraries, that is why there > are some undefined symbols. > > This is probably because the setup.py script is not looking with the correct > name for those libraries. Hi Sébastien, Absolutely correct, thanks. Commenting out the lines that append _r64 to the lib path for 64-bit arch fixes the problem: if os.name == 'posix': # unix # Most people will define the location of their Sybase # installation in their environment. ... lib_names += ['sybblk', 'sybct', 'sybcs', 'sybtcl', 'sybinsck', 'sybcomn', 'sybintl', 'sybunic'] for name in lib_names: extensions = [('', 'a'), ('', 'so'), ('_r', 'a'), ('_r', 'so')] # if have64bit and sys.platform not in ['osf1V5']: # extensions = [('_r64', 'a'), ('_r64', 'so')] for (ext1, ext2) in extensions: lib_name = "%s%s" % (name, ext1) lib_path = os.path.join(sybase, 'lib', 'lib%s.%s' % (lib_name, ext2)) if os.access(lib_path, os.R_OK): syb_libs.append(lib_name) break > Could you please send me privately the list of files installed by your > freetds package or the result of the following command: > > ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* \ > /usr/lib/*libsybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* \ > /usr/lib/lib*intl* For interest sake: $ ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* /usr/lib/lib*sybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* /usr/lib/lib*intl* ls: cannot access /usr/lib/lib*blk*: No such file or directory ls: cannot access /usr/lib/lib*sybtcl*: No such file or directory ls: cannot access /usr/lib/lib*insck*: No such file or directory ls: cannot access /usr/lib/lib*comn*: No such file or directory ls: cannot access /usr/lib/lib*intl*: No such file or directory /usr/lib/libct.a /usr/lib/libct.so.4 /usr/lib/librpcsecgss.so.3.0.0 /usr/lib/libct.la /usr/lib/libct.so.4.0.0 /usr/lib/librpcsvc.a /usr/lib/libct.so /usr/lib/librpcsecgss.so.3 Many thanks for your assistance. Warm regards, Terry |
From: Sébastien S. <sa...@us...> - 2009-03-06 15:46:13
|
Hi Terry, thanks for the feedback. There are different naming conventions for sybase libraries depending on the version of sybase, the platform, 32 or 64 bits and if you are using the original sybase libraries or freetds... I have commited a correction in trunk which hopefully should work in most cases: $ svn diff Index: setup.py =================================================================== --- setup.py (révision 443) +++ setup.py (copie de travail) @@ -90,7 +90,7 @@ for name in lib_names: extensions = [('', 'a'), ('', 'so'), ('_r', 'a'), ('_r', 'so')] if have64bit and sys.platform not in ['osf1V5']: - extensions = [('_r64', 'a'), ('_r64', 'so')] + extensions = [('_r64', 'a'), ('_r64', 'so')] + extensions for (ext1, ext2) in extensions: lib_name = "%s%s" % (name, ext1) lib_path = os.path.join(sybase, 'lib', 'lib%s.%s' % (lib_name, ext2)) Index: ChangeLog =================================================================== --- ChangeLog (révision 443) +++ ChangeLog (copie de travail) @@ -1,3 +1,7 @@ +2009-03-06 Sébastien Sablé <sa...@us...> + + * setup.py: Improved libraries detection for 64bits platforms + 2008-10-15 Sébastien Sablé <sa...@us...> * Sybase.py: Start using logging module $ svn commit -m "Improved libraries detection for 64bits platforms" Envoi ChangeLog Envoi setup.py Transmission des données .. Révision 444 propagée. regards -- Sébastien Sablé Terry Burton a écrit : > On Fri, Mar 6, 2009 at 1:25 PM, Sébastien Sablé > <sa...@us...> wrote: >> the sybase module is not linked to the freetds libraries, that is why there >> are some undefined symbols. >> >> This is probably because the setup.py script is not looking with the correct >> name for those libraries. > > Hi Sébastien, > > Absolutely correct, thanks. > > Commenting out the lines that append _r64 to the lib path for 64-bit > arch fixes the problem: > > if os.name == 'posix': # unix > # Most people will define the location of their Sybase > # installation in their environment. > ... > lib_names += ['sybblk', 'sybct', 'sybcs', 'sybtcl', 'sybinsck', > 'sybcomn', 'sybintl', 'sybunic'] > for name in lib_names: > extensions = [('', 'a'), ('', 'so'), ('_r', 'a'), ('_r', 'so')] > # if have64bit and sys.platform not in ['osf1V5']: > # extensions = [('_r64', 'a'), ('_r64', 'so')] > for (ext1, ext2) in extensions: > lib_name = "%s%s" % (name, ext1) > lib_path = os.path.join(sybase, 'lib', 'lib%s.%s' % > (lib_name, ext2)) > if os.access(lib_path, os.R_OK): > syb_libs.append(lib_name) > break > >> Could you please send me privately the list of files installed by your >> freetds package or the result of the following command: >> >> ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* \ >> /usr/lib/*libsybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* \ >> /usr/lib/lib*intl* > > For interest sake: > > $ ls /usr/lib/lib*blk* /usr/lib/lib*ct* /usr/lib/lib*cs* > /usr/lib/lib*sybtcl* /usr/lib/lib*insck* /usr/lib/lib*comn* > /usr/lib/lib*intl* > ls: cannot access /usr/lib/lib*blk*: No such file or directory > ls: cannot access /usr/lib/lib*sybtcl*: No such file or directory > ls: cannot access /usr/lib/lib*insck*: No such file or directory > ls: cannot access /usr/lib/lib*comn*: No such file or directory > ls: cannot access /usr/lib/lib*intl*: No such file or directory > /usr/lib/libct.a > /usr/lib/libct.so.4 > /usr/lib/librpcsecgss.so.3.0.0 > /usr/lib/libct.la > /usr/lib/libct.so.4.0.0 > /usr/lib/librpcsvc.a > /usr/lib/libct.so > /usr/lib/librpcsecgss.so.3 > > > Many thanks for your assistance. > > > Warm regards, > > Terry |