You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(3) |
Apr
(26) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
(6) |
Nov
(14) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(31) |
Feb
(15) |
Mar
(6) |
Apr
(18) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(1) |
Nov
(2) |
Dec
(6) |
| 2004 |
Jan
(3) |
Feb
(3) |
Mar
(18) |
Apr
(4) |
May
(13) |
Jun
(32) |
Jul
(21) |
Aug
(22) |
Sep
(11) |
Oct
(2) |
Nov
(6) |
Dec
(5) |
| 2005 |
Jan
(4) |
Feb
(16) |
Mar
(21) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(20) |
Dec
|
| 2006 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(5) |
May
(4) |
Jun
(6) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(8) |
Nov
|
Dec
(12) |
| 2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(9) |
Jun
(1) |
Jul
(6) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(1) |
Dec
(4) |
| 2009 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(21) |
Sep
(11) |
Oct
(4) |
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
| 2011 |
Jan
(9) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
| 2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Chris C. <cc...@gm...> - 2005-11-28 14:21:57
|
The Sybase libraries (the C-level ones, not the python ones) use "errors" t=
o
communicate all kinds of things (like database names after "use database").
Catch the exception and check for message 3216. Since it's a known message=
,
you can ignore it.
-Chris
P.S. Of course, you'll need to be sure that you won't need to signal a
volume change during the backup, becase you need the information in the
message to be able to do that properly.
On 11/25/05, Wang King <wan...@gm...> wrote:
>
> Sybase Module for python had been installed successful.
> My commands like this:
> >>> from Sybase import *
> >>> a =3D connect('SYBASE','sa','')
> >>> a
> <Sybase.Connection instance at 0x0093BBC0>
>
> >>> cur =3D a.cursor()
> >>> cur
> <Sybase.Cursor instance at 0x00934350>
> >>> cur.execute('dump database test to "c:\\test" ')
>
> The result like this:
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "D:\Python24\Lib\site-packages\Sybase.py", line 764, in execute
> self.description =3D fetcher.start(self.arraysize)
> File "D:\Python24\Lib\site-packages\Sybase.py", line 515, in start
> return self._start_results()
> File "D:\Python24\Lib\site-packages\Sybase.py", line 619, in
> _start_results
> status, result =3D self._cmd.ct_results()
> File "D:\Python24\Lib\site-packages\Sybase.py", line 200, in
> _servermsg_cb
> raise DatabaseError(_fmt_server(msg))
> Sybase.DatabaseError: Msg 3216, Level 10, State 1, Line 1
> Backup Server session id is: 47. Use this value when executing the
> 'sp_volchan
> ged' system stored procedure after fulfilling any volume change request
> from the
> Backup Server.
> Msg 404101, Level 1, State 1, Procedure bs_write_header
> Backup Server: 4.41.1.1: Creating new disk file c:\test.
>
> But the database has been dumped successful.
>
> How can I dump database by python?
>
> _______________________________________________
> Python-sybase mailing list
> Pyt...@ww...
> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
>
>
>
--
Nervous passengers are advised to wear a blindfold.
|
|
From: Wang K. <wan...@gm...> - 2005-11-26 03:17:30
|
Sybase Module for python had been installed successful.
My commands like this:
>>> from Sybase import *
>>> a =3D connect('SYBASE','sa','')
>>> a
<Sybase.Connection instance at 0x0093BBC0>
>>> cur =3D a.cursor()
>>> cur
<Sybase.Cursor instance at 0x00934350>
>>> cur.execute('dump database test to "c:\\test" ')
The result like this:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "D:\Python24\Lib\site-packages\Sybase.py", line 764, in execute
self.description =3D fetcher.start(self.arraysize)
File "D:\Python24\Lib\site-packages\Sybase.py", line 515, in start
return self._start_results()
File "D:\Python24\Lib\site-packages\Sybase.py", line 619, in
_start_results
status, result =3D self._cmd.ct_results()
File "D:\Python24\Lib\site-packages\Sybase.py", line 200, in _servermsg_c=
b
raise DatabaseError(_fmt_server(msg))
Sybase.DatabaseError: Msg 3216, Level 10, State 1, Line 1
Backup Server session id is: 47. Use this value when executing the
'sp_volchan
ged' system stored procedure after fulfilling any volume change request fro=
m
the
Backup Server.
Msg 404101, Level 1, State 1, Procedure bs_write_header
Backup Server: 4.41.1.1: Creating new disk file c:\test.
But the database has been dumped successful.
How can I dump database by python?
|
|
From: Marcos P. <ma...@bu...> - 2005-11-23 17:55:26
|
You are very right, but how many times has someone answered >> Check that your LD_LIBRARY_PATH is set right. >> (i.e. $SYBASE/SYBASE.sh is sourced.) ? PS I'll use the same postage stamp to say thanks to the author/s of this module. :-) El mar, 22-11-2005 a las 12:52 -0600, sk...@po... escribió: > >> > ImportError: ld.so.1: python: fatal: relocation error: file /home/ > >> > disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not > >> > found > >> > >> Check that your LD_LIBRARY_PATH is set right. > >> (i.e. $SYBASE/SYBASE.sh is sourced.) > > Marcos> It seems that we need more explicit error messages ;-) > > That's only useful up to a point. There are plenty of error messages in > Python that could be more user-friendly. This probably isn't one of them > though. The code in Python that raises the ImportError exception doesn't > really know the details of why the import failed, only that it failed. > dlopen() failures can happen for lots of reasons. Here's the relevant bit > from the dlopen() man page on Solaris 10 about return values. > > The dlopen() function returns NULL if pathname cannot be > found, cannot be opened for reading, or is not a shared > object or a relocatable object. dlopen() also returns NULL > if an error occurs during the process of loading pathname or > relocating its symbolic references. See NOTES. Additional > diagnostic information is available through dlerror(). > > Python (perhaps helpfully, perhaps not) regurgitates the message from > dlerror(). It has no control over the content of that message, and it > probably has no business trying to interpret it. > |
|
From: <sk...@po...> - 2005-11-23 13:52:55
|
>> > ImportError: ld.so.1: python: fatal: relocation error: file /home/
>> > disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not
>> > found
>>
>> Check that your LD_LIBRARY_PATH is set right.
>> (i.e. $SYBASE/SYBASE.sh is sourced.)
Marcos> It seems that we need more explicit error messages ;-)
That's only useful up to a point. There are plenty of error messages in
Python that could be more user-friendly. This probably isn't one of them
though. The code in Python that raises the ImportError exception doesn't
really know the details of why the import failed, only that it failed.
dlopen() failures can happen for lots of reasons. Here's the relevant bit
from the dlopen() man page on Solaris 10 about return values.
The dlopen() function returns NULL if pathname cannot be
found, cannot be opened for reading, or is not a shared
object or a relocatable object. dlopen() also returns NULL
if an error occurs during the process of loading pathname or
relocating its symbolic references. See NOTES. Additional
diagnostic information is available through dlerror().
Python (perhaps helpfully, perhaps not) regurgitates the message from
dlerror(). It has no control over the content of that message, and it
probably has no business trying to interpret it.
--
Skip Montanaro
Katrina Benefit Concerts: http://www.musi-cal.com/katrina
sk...@po...
|
|
From: Don K. <da...@pr...> - 2005-11-23 11:20:50
|
On Nov 22, 2005, at 9:07 AM, Marcos S=E1nchez Provencio wrote:
> It seems that we need more explicit error messages ;-)
>
> El lun, 21-11-2005 a las 12:20 +1100, Gregory Bond escribi=F3:
>> Victor Lu wrote:
>>
>>> ImportError: ld.so.1: python: fatal: relocation error: file /home/
>>> disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol =20
>>> not found
He could be getting the libtcl.so for the TCL/Tk programming language
before the Sybase library of the same name.
hail{dak}1056: ls -l $SYBASE/lib/libtcl.*
-rwxrwxr-x 1 sybase 420372 Nov 20 1997 /usr/local/sybase/lib/=20
libtcl.so
hail{dak}1057: ls -l /usr/local/pkg/tcl-8.3.1/lib/libtcl.so
lrwxrwxrwx 1 root 12 Aug 10 2000 /usr/local/pkg/=20
tcl-8.3.1/lib/libtcl.so -> libtcl8.3.so
I guess the LD_LIBRARY_PATH is still suspect.
>>
>> Check that your LD_LIBRARY_PATH is set right. (i.e. $SYBASE/=20
>> SYBASE.sh
>> is sourced.)
>> _______________________________________________
>> Python-sybase mailing list
>> Pyt...@ww...
>> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-=20
>> sybase
> --=20
> Marcos S=E1nchez Provencio <ma...@bu...>
>
> _______________________________________________
> Python-sybase mailing list
> Pyt...@ww...
> https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
--
Don Kiphart
Software Developer
Prediction Company
Santa Fe, NM
|
|
From: Marcos P. <ma...@bu...> - 2005-11-23 11:07:55
|
It seems that we need more explicit error messages ;-) El lun, 21-11-2005 a las 12:20 +1100, Gregory Bond escribió: > Victor Lu wrote: > > > ImportError: ld.so.1: python: fatal: relocation error: file /home/ > > disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not found > > Check that your LD_LIBRARY_PATH is set right. (i.e. $SYBASE/SYBASE.sh > is sourced.) > _______________________________________________ > Python-sybase mailing list > Pyt...@ww... > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase -- Marcos Sánchez Provencio <ma...@bu...> |
|
From: Gregory B. <gn...@it...> - 2005-11-21 20:20:55
|
Victor Lu wrote: > ImportError: ld.so.1: python: fatal: relocation error: file /home/ > disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not found Check that your LD_LIBRARY_PATH is set right. (i.e. $SYBASE/SYBASE.sh is sourced.) |
|
From: Victor Lu <v....@ga...> - 2005-11-21 20:18:09
|
I have tried to install sybase-0.37.tar on my sun server (sunos 5.6,
sybase version 11.0.2).
I installed as follows:
python setup.py install
and the installation ran to completion without any errors.
After launching python I then get the following error:
Python 2.4 (#1, Nov 18 2005, 14:53:00)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import Sybase
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.4/site-packages/Sybase.py", line 20,
in ?
from sybasect import *
ImportError: ld.so.1: python: fatal: relocation error: file /home/
disk1/server/lib/libtcl.so: symbol svr4_tli: referenced symbol not found
>>>
I know there was a similar posting by Steve Bremer http://www.object-
craft.com.au/pipermail/python-sybase/2003-June/000177.html but there
was no reply to his question.
I'd be grateful for any assistance.
Victor
|
|
From: Wang K. <wan...@gm...> - 2005-11-09 20:36:49
|
Thanks a lot.It works well. :-) 2005/11/8, Adam Hooper <ad...@de...>: > On Tue, 2005-11-08 at 17:18 +0800, Wang King wrote: > > HI,everyone: > > I'd install the Sybase Module for python successful,but I don't know > > how to get the database message returned from Sybase.For example,I > > execute sql "SELECT * FROM TABLE_NOEXIST",I want to get the message > > from database like "TABLE_NOEXIST not found...."but not > > "Sybase.DatabaseError". > > > > I'm jackeroo for python.So please give an example for this problem. > > That "Sybase.DatabaseError" is an exception; it can be caught and dealt > with. I think you'll find that whenever the table doesn't exist you'll > get the same "Msg" name; so you can parse the error string and handle > the specific case when the the table does not exist. It'll look like > this: > > try: > c.execute(sql) > except Sybase.DatabaseError, e: > # See if the error is "table does not exist" > # change 5555 to whichever number that's supposed to be > if "Msg 5555" in str(e): > do_something() > else: > # If it's another error, pretend we didn't catch it > raise > > As you can see, the message is found using "str(e)" in the "except" > block. The *actual* string returned by the server is on the second line > -- in str(e).split('\n')[1]. But unless you're writing a generic SQL > client, you'd be far better off looking at the message numbers as I did > above than looking at the string returned by the server. (For instance, > the server's returned string might be French for some servers, but the > number will always be the same.) > > Good luck! > > -- > Adam Hooper <ad...@de...> > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > > iD8DBQBDcKK790GtBxQ61zARAi8zAKDlzJv1s6PevHWrtugiRGfKCKLhpgCgzOOk > L768oq6KyTLJ6roZmhMJNK0=3D > =3DOuaU > -----END PGP SIGNATURE----- > > > |
|
From: Grant M. <gmc...@in...> - 2005-11-09 19:08:45
|
Hi,
What you want is os.uname()[4]. This will return the same information as
uname -m:
Regards,
___________________________________________
Grant McDonald InfoComp Pty Ltd
Programmer Level 1, 63 Market St, Wollongong
Ph: (+61) 2 4298 9100
Fax: (+61) 2 4298 9199
Email: gmc...@in...
___________________________________________
-----Original Message-----
From: pyt...@ww...
[mailto:pyt...@ww...]On Behalf Of Gomez,
Daniel
Sent: 09 November 2005 02:58
To: pyt...@ww...
Subject: gmc...@in... - Found word(s) list error in the Text body
- [python-sybase] RE: 64-bit python sybase module failure SOLVED
I realize that my problem is because 64-bit sybase libraries are not
accomodated in the setup.py file for the 64-bit python. Hence here's a
patch to make it select the right libs. (I've never written in python. I
am a sysadmin. I was looking for some internal python variable that
would return the bit arch, but all I could come up with was a 'uname'
command. Not ideal but I do use a bedrock command that all linux os
should have.)
--- sybase-0.37/setup.py 2005-04-06 18:46:43.000000000 -0400
+++ sybase-0.37.patch/setup.py 2005-11-08 10:44:26.840499000 -0500
@@ -45,7 +45,12 @@
# On Linux the Sybase tcl library is distributed as sybtcl
syb_libs = []
if os.uname()[0] == 'Linux':
- lib_names = ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn',
'intl']
+ # accomodate 64-bit sybase libraries
+ arch = os.popen("uname -m").read().splitlines()[0]
+ if "x86_64" == arch:
+ lib_names = ['blk64', 'ct64', 'cs64', 'sybtcl64', 'insck64',
'comn64', 'intl64']
+ else:
+ lib_names = ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn',
+ 'intl']
elif os.uname()[0] == 'AIX':
lib_names = ['blk', 'ct', 'cs', 'comn', 'tcl', 'intl', 'insck']
else:
-----Original Message-----
From: Gomez, Daniel
Sent: Monday, November 07, 2005 3:24 PM
To: 'pyt...@ww...'
Subject: 64-bit python sybase module failure
I can report that sybase_OC1251_12655 build fine for python 2.4.2 under
32-bit suse 9.2
Unfortunately it dosn't build for 64-bit. I am using the 64-bit sybase
libraries, but somehow libblk.a complains about incompatibilies.
Any clue as to why this is taking place? thank you.
/usr/bin/ld: skipping incompatible
/local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching
for -lblk
cronus:/local/src/Linux64/python/modules/sybase-0.37 #
/usr/local/packages/python64-2.4.2/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.4
copying Sybase.py -> build/lib.linux-x86_64-2.4
running build_ext
building 'sybasect' extension
creating build/temp.linux-x86_64-2.4
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c blk.c -o
build/temp.linux-x86_64-2.4/blk.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c databuf.c -o
build/temp.linux-x86_64-2.4/databuf.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c cmd.c -o
build/temp.linux-x86_64-2.4/cmd.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c conn.c -o
build/temp.linux-x86_64-2.4/conn.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c ctx.c -o
build/temp.linux-x86_64-2.4/ctx.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c datafmt.c -o
build/temp.linux-x86_64-2.4/datafmt.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c iodesc.c -o
build/temp.linux-x86_64-2.4/iodesc.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c locale.c -o
build/temp.linux-x86_64-2.4/locale.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c msgs.c -o
build/temp.linux-x86_64-2.4/msgs.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c numeric.c -o
build/temp.linux-x86_64-2.4/numeric.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c money.c -o
build/temp.linux-x86_64-2.4/money.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c datetime.c -o
build/temp.linux-x86_64-2.4/datetime.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c sybasect.c -o
build/temp.linux-x86_64-2.4/sybasect.o
/usr/local/packages/gcc-3.4.4/bin/gcc -pthread -shared
-L/usr/local/packages/gcc-3.4.4/lib64
-Wl,-R,/usr/local/packages/gcc-3.4.4/lib64
-I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include
build/temp.linux-x86_64-2.4/blk.o build/temp.linux-x86_64-2.4/databuf.o
build/temp.linux-x86_64-2.4/cmd.o build/temp.linux-x86_64-2.4/conn.o
build/temp.linux-x86_64-2.4/ctx.o build/temp.linux-x86_64-2.4/datafmt.o
build/temp.linux-x86_64-2.4/iodesc.o
build/temp.linux-x86_64-2.4/locale.o build/temp.linux-x86_64-2.4/msgs.o
build/temp.linux-x86_64-2.4/numeric.o
build/temp.linux-x86_64-2.4/money.o
build/temp.linux-x86_64-2.4/datetime.o
build/temp.linux-x86_64-2.4/sybasect.o
-L/usr/local/packages/sybase_OLD/lib -lblk -lct -lcs -lsybtcl -lcomn
-lintl -o build/lib.linux-x86_64-2.4/sybasect.so
/usr/bin/ld: skipping incompatible
/local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching
for -lblk
/usr/bin/ld: cannot find -lblk
collect2: ld returned 1 exit status
error: command '/usr/local/packages/gcc-3.4.4/bin/gcc' failed with exit
status 1
cronus:/local/src/Linux64/python/modules/sybase-0.37 #
_______________________________________________
Python-sybase mailing list
Pyt...@ww...
https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
|
|
From: Andrew M. <an...@ob...> - 2005-11-09 17:28:20
|
>I realize that my problem is because 64-bit sybase libraries are not
>accomodated in the setup.py file for the 64-bit python. Hence here's a
>patch to make it select the right libs.
Thanks! Do you know if this is likely to be true of all linux
distributions (i.e., are the files installed by sybase or the
distribution)?
>(I've never written in python. I am a sysadmin.
I hope it won't be your last venture into Python - it's an excellent
language for system administration.
>I was looking for some internal python variable that would return the bit
>arch, but all I could come up with was a 'uname' command. Not ideal but I
>do use a bedrock command that all linux os should have.)
I think the os.uname() function is the one you're looking for. Can you fire
up the Python interactive mode and show us the output on your system? Eg:
$ python
Python 2.3.5 (#2, Aug 30 2005, 15:50:26)
[GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> os.uname()
('Linux', 'longblack', '2.6.14', '#1 SMP Mon Oct 31 19:45:30 EST 2005', 'i686')
>
>--- sybase-0.37/setup.py 2005-04-06 18:46:43.000000000 -0400
>+++ sybase-0.37.patch/setup.py 2005-11-08 10:44:26.840499000 -0500
>@@ -45,7 +45,12 @@
> # On Linux the Sybase tcl library is distributed as sybtcl
> syb_libs = []
> if os.uname()[0] == 'Linux':
>- lib_names = ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn',
>'intl']
>+ # accomodate 64-bit sybase libraries
>+ arch = os.popen("uname -m").read().splitlines()[0]
>+ if "x86_64" == arch:
>+ lib_names = ['blk64', 'ct64', 'cs64', 'sybtcl64', 'insck64',
>'comn64', 'intl64']
>+ else:
>+ lib_names = ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn',
>+ 'intl']
> elif os.uname()[0] == 'AIX':
> lib_names = ['blk', 'ct', 'cs', 'comn', 'tcl', 'intl', 'insck']
> else:
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
|
|
From: Gomez, D. <dg...@ti...> - 2005-11-09 10:58:27
|
I realize that my problem is because 64-bit sybase libraries are not
accomodated in the setup.py file for the 64-bit python. Hence here's a
patch to make it select the right libs. (I've never written in python. I
am a sysadmin. I was looking for some internal python variable that
would return the bit arch, but all I could come up with was a 'uname'
command. Not ideal but I do use a bedrock command that all linux os
should have.)
--- sybase-0.37/setup.py 2005-04-06 18:46:43.000000000 -0400
+++ sybase-0.37.patch/setup.py 2005-11-08 10:44:26.840499000 -0500
@@ -45,7 +45,12 @@
# On Linux the Sybase tcl library is distributed as sybtcl
syb_libs =3D []
if os.uname()[0] =3D=3D 'Linux':
- lib_names =3D ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn',
'intl']
+ # accomodate 64-bit sybase libraries
+ arch =3D os.popen("uname -m").read().splitlines()[0]
+ if "x86_64" =3D=3D arch:
+ lib_names =3D ['blk64', 'ct64', 'cs64', 'sybtcl64', =
'insck64',
'comn64', 'intl64']
+ else:
+ lib_names =3D ['blk', 'ct', 'cs', 'sybtcl', 'insck', 'comn', =
+ 'intl']
elif os.uname()[0] =3D=3D 'AIX':
lib_names =3D ['blk', 'ct', 'cs', 'comn', 'tcl', 'intl', =
'insck']
else:
-----Original Message-----
From: Gomez, Daniel=20
Sent: Monday, November 07, 2005 3:24 PM
To: 'pyt...@ww...'
Subject: 64-bit python sybase module failure
I can report that sybase_OC1251_12655 build fine for python 2.4.2 under
32-bit suse 9.2
Unfortunately it dosn't build for 64-bit. I am using the 64-bit sybase
libraries, but somehow libblk.a complains about incompatibilies.
Any clue as to why this is taking place? thank you.
/usr/bin/ld: skipping incompatible
/local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching
for -lblk
cronus:/local/src/Linux64/python/modules/sybase-0.37 #
/usr/local/packages/python64-2.4.2/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.4
copying Sybase.py -> build/lib.linux-x86_64-2.4
running build_ext
building 'sybasect' extension
creating build/temp.linux-x86_64-2.4
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c blk.c -o
build/temp.linux-x86_64-2.4/blk.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c databuf.c -o
build/temp.linux-x86_64-2.4/databuf.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c cmd.c -o
build/temp.linux-x86_64-2.4/cmd.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c conn.c -o
build/temp.linux-x86_64-2.4/conn.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c ctx.c -o
build/temp.linux-x86_64-2.4/ctx.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c datafmt.c -o
build/temp.linux-x86_64-2.4/datafmt.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c iodesc.c -o
build/temp.linux-x86_64-2.4/iodesc.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c locale.c -o
build/temp.linux-x86_64-2.4/locale.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c msgs.c -o
build/temp.linux-x86_64-2.4/msgs.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c numeric.c -o
build/temp.linux-x86_64-2.4/numeric.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c money.c -o
build/temp.linux-x86_64-2.4/money.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c datetime.c -o
build/temp.linux-x86_64-2.4/datetime.o
/usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY
-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
-I/usr/local/packages/sybase_OLD/include
-I/usr/local/packages/python64-2.4.2/include/python2.4 -c sybasect.c -o
build/temp.linux-x86_64-2.4/sybasect.o
/usr/local/packages/gcc-3.4.4/bin/gcc -pthread -shared
-L/usr/local/packages/gcc-3.4.4/lib64
-Wl,-R,/usr/local/packages/gcc-3.4.4/lib64
-I/usr/local/packages/gcc-3.4.4/include
-I/usr/local/packages/gcc-3.4.4/include
build/temp.linux-x86_64-2.4/blk.o build/temp.linux-x86_64-2.4/databuf.o
build/temp.linux-x86_64-2.4/cmd.o build/temp.linux-x86_64-2.4/conn.o
build/temp.linux-x86_64-2.4/ctx.o build/temp.linux-x86_64-2.4/datafmt.o
build/temp.linux-x86_64-2.4/iodesc.o
build/temp.linux-x86_64-2.4/locale.o build/temp.linux-x86_64-2.4/msgs.o
build/temp.linux-x86_64-2.4/numeric.o
build/temp.linux-x86_64-2.4/money.o
build/temp.linux-x86_64-2.4/datetime.o
build/temp.linux-x86_64-2.4/sybasect.o
-L/usr/local/packages/sybase_OLD/lib -lblk -lct -lcs -lsybtcl -lcomn
-lintl -o build/lib.linux-x86_64-2.4/sybasect.so
/usr/bin/ld: skipping incompatible
/local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching
for -lblk
/usr/bin/ld: cannot find -lblk
collect2: ld returned 1 exit status
error: command '/usr/local/packages/gcc-3.4.4/bin/gcc' failed with exit
status 1
cronus:/local/src/Linux64/python/modules/sybase-0.37 #
|
|
From: Adam H. <ad...@de...> - 2005-11-09 08:05:03
|
On Tue, 2005-11-08 at 17:18 +0800, Wang King wrote:
> HI,everyone:
> I'd install the Sybase Module for python successful,but I don't know
> how to get the database message returned from Sybase.For example,I
> execute sql "SELECT * FROM TABLE_NOEXIST",I want to get the message
> from database like "TABLE_NOEXIST not found...."but not
> "Sybase.DatabaseError".
>=20
> I'm jackeroo for python.So please give an example for this problem.
That "Sybase.DatabaseError" is an exception; it can be caught and dealt
with. I think you'll find that whenever the table doesn't exist you'll
get the same "Msg" name; so you can parse the error string and handle
the specific case when the the table does not exist. It'll look like
this:
try:
c.execute(sql)
except Sybase.DatabaseError, e:
# See if the error is "table does not exist"
# change 5555 to whichever number that's supposed to be
if "Msg 5555" in str(e):
do_something()
else:
# If it's another error, pretend we didn't catch it
raise
As you can see, the message is found using "str(e)" in the "except"
block. The *actual* string returned by the server is on the second line
-- in str(e).split('\n')[1]. But unless you're writing a generic SQL
client, you'd be far better off looking at the message numbers as I did
above than looking at the string returned by the server. (For instance,
the server's returned string might be French for some servers, but the
number will always be the same.)
Good luck!
--=20
Adam Hooper <ad...@de...>
|
|
From: Wang K. <wan...@gm...> - 2005-11-09 04:18:41
|
HI,everyone: I'd install the Sybase Module for python successful,but I don't know how to get the database message returned from Sybase.For example,I execute sql "SELECT * FROM TABLE_NOEXIST",I want to get the message from database like "TABLE_NOEXIST not found...."but not "Sybase.DatabaseError". I'm jackeroo for python.So please give an example for this problem. Thanks. |
|
From: Adam H. <ad...@de...> - 2005-11-08 18:04:26
|
On Mon, 2005-11-07 at 15:23 -0500, Gomez, Daniel wrote: >=20 > I can report that sybase_OC1251_12655 build fine for python 2.4.2 > under 32-bit suse 9.2 > =20 > Unfortunately it dosn't build for 64-bit. I am using the 64-bit sybase > libraries, but somehow libblk.a complains about incompatibilies. > =20 > Any clue as to why this is taking place? thank you. No clue, but I can report works-for-me on amd64 on Ubuntu with FreeTDS libraries. There was a workaround involved, which I chronicled here:=20 http://www.object-craft.com.au/pipermail/python-sybase/2005-August/000409.h= tml --=20 Adam Hooper <ad...@de...> |
|
From: Gomez, D. <dg...@ti...> - 2005-11-08 15:23:49
|
I can report that sybase_OC1251_12655 build fine for python 2.4.2 under 32-bit suse 9.2 =20 Unfortunately it dosn't build for 64-bit. I am using the 64-bit sybase libraries, but somehow libblk.a complains about incompatibilies. =20 Any clue as to why this is taking place? thank you. =20 =20 /usr/bin/ld: skipping incompatible /local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching for -lblk cronus:/local/src/Linux64/python/modules/sybase-0.37 # /usr/local/packages/python64-2.4.2/bin/python setup.py build running build running build_py creating build creating build/lib.linux-x86_64-2.4 copying Sybase.py -> build/lib.linux-x86_64-2.4 running build_ext building 'sybasect' extension creating build/temp.linux-x86_64-2.4 /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c blk.c -o build/temp.linux-x86_64-2.4/blk.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c databuf.c -o build/temp.linux-x86_64-2.4/databuf.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c cmd.c -o build/temp.linux-x86_64-2.4/cmd.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c conn.c -o build/temp.linux-x86_64-2.4/conn.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c ctx.c -o build/temp.linux-x86_64-2.4/ctx.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c datafmt.c -o build/temp.linux-x86_64-2.4/datafmt.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c iodesc.c -o build/temp.linux-x86_64-2.4/iodesc.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c locale.c -o build/temp.linux-x86_64-2.4/locale.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c msgs.c -o build/temp.linux-x86_64-2.4/msgs.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c numeric.c -o build/temp.linux-x86_64-2.4/numeric.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c money.c -o build/temp.linux-x86_64-2.4/money.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c datetime.c -o build/temp.linux-x86_64-2.4/datetime.o /usr/local/packages/gcc-3.4.4/bin/gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include -fPIC -DWANT_BULKCOPY -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 -I/usr/local/packages/sybase_OLD/include -I/usr/local/packages/python64-2.4.2/include/python2.4 -c sybasect.c -o build/temp.linux-x86_64-2.4/sybasect.o /usr/local/packages/gcc-3.4.4/bin/gcc -pthread -shared -L/usr/local/packages/gcc-3.4.4/lib64 -Wl,-R,/usr/local/packages/gcc-3.4.4/lib64 -I/usr/local/packages/gcc-3.4.4/include -I/usr/local/packages/gcc-3.4.4/include build/temp.linux-x86_64-2.4/blk.o build/temp.linux-x86_64-2.4/databuf.o build/temp.linux-x86_64-2.4/cmd.o build/temp.linux-x86_64-2.4/conn.o build/temp.linux-x86_64-2.4/ctx.o build/temp.linux-x86_64-2.4/datafmt.o build/temp.linux-x86_64-2.4/iodesc.o build/temp.linux-x86_64-2.4/locale.o build/temp.linux-x86_64-2.4/msgs.o build/temp.linux-x86_64-2.4/numeric.o build/temp.linux-x86_64-2.4/money.o build/temp.linux-x86_64-2.4/datetime.o build/temp.linux-x86_64-2.4/sybasect.o -L/usr/local/packages/sybase_OLD/lib -lblk -lct -lcs -lsybtcl -lcomn -lintl -o build/lib.linux-x86_64-2.4/sybasect.so /usr/bin/ld: skipping incompatible /local/platform/packages/sybase_OC1251_12655/lib/libblk.a when searching for -lblk /usr/bin/ld: cannot find -lblk collect2: ld returned 1 exit status error: command '/usr/local/packages/gcc-3.4.4/bin/gcc' failed with exit status 1 cronus:/local/src/Linux64/python/modules/sybase-0.37 # |
|
From: mike <mik...@gm...> - 2005-11-03 04:06:27
|
hi i am using the Sybase connecttion object "execute(sql)" to call an SQL statement to my Sybase ASE here is the statement that i want to execute. basically to change a user password and update a table SQL=3D ''' declare @res int exec @res =3D sp_password 'sapass' ,'userpass', 'user' if @res =3D 0 begin update passwdtable set pswd =3D 'userpass' user_name =3D 'user' select convert(int,1) --to return a int end else begin select convert(int,-1) end ''' In the sybase manual, it says under the "Connections object" execute(sql) ...... The return value is a list of logical results. Each logical result is a lis= t of row tuples. ...... db =3D connect (....., auto_commit=3D1) def exec_stmt(SQL): try: a,b =3D db.execute(SQL) db.commit() db.close() return a,b except Sybase.DatabaseError: return -1 c,d=3D exec_stmt(SQL) when the result is returned, it shows a list of tuples ([(0,)], [(1,)]) . the password is changed and the update is successful by the way. may i know how to interpret this results of tuples? thanks ---------------------------------------------------------------------------= ---------------------------------------------------------- _______________________ Privileged/Confidential information may be contained in this message. If you are not the intended recipient, please notify the sender immediately= . Check out our website at http://www.mpa.gov.sg |
|
From: Chris C. <cc...@gm...> - 2005-11-02 07:24:25
|
Are you talking about a device that is used to store databases? If so, you need to be looking at the Sybase reference manuals. Find the section on "disk init". (Or if you have someone responsible for managing your Sybase databases -- probably called a DBA -- ask them to do it for you. They'll want to anyway.) On 11/1/05, Tom <zy...@gm...> wrote: > > I am a newbie! > > I need create device with python-sybase. > > But I can't find functions about these. > > Please help me! > > Thank you! > _______________________________________________ > Python-sybase mailing list > Pyt...@ww... > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase > -- Nervous passengers are advised to wear a blindfold. |
|
From: Tom <zy...@gm...> - 2005-11-02 07:10:01
|
I am a newbie! I need create device with python-sybase. But I can't find functions about these. Please help me! Thank you! |
|
From: J.Hubbs <jh...@di...> - 2005-11-01 09:54:01
|
Sébastien - Sébastien Arnaud <arnaudsj <at> emedialibrary.org> writes: > > Hi Jeff, > > I encountered somehow the same type of errors in the past on a Gentoo > Server. The problem is that I can't seem to remember exactly what did > it. I actually reinstalled the Sybase python module just a few days > ago, right after upgrading from python 2.3.5 to python 2.4.2 and I > had no issue at all... > > Are you under x86 Gentoo? Yes. > A few things I would try would be to make > sure to set the SYBASE var to /usr and try without -U WANT_BULKCOPY. I tried these both together and independently. The "python setup.py..." commands just respond with "running build_ext" and stop with no other info given. No change when trying to "import Sybase" from python. I also noted what it said at the bottom of http://www.freetds.org/userguide/envvar.htm where it says When you're done, you should see something very like this: $ ls $SYBASE etc include interfaces lib In searching around, I simply had no place like this. /opt/sybase had "interfaces" but "include" and "lib" were under "/opt/sybase/OCS-15_0". I tried symlinking those last two up a level so that /opt/sybase looked kind of right, set SYBASE to that, and tried to resintall the Sybase module, but no improvement. > Also you might want to check if your FreeTDS install is working > correctly by running a quick test using the command line tool tsql. I've seen the man page for tsql and all, but I'm unclear on what to point it at to test it. I suffer from a lack of "big picture" docs. > Finally, you did not specify which version you tried to install. I > believe 0.36 is the one I have installed. It's 0.37. > > Hope this helps. > > Sébastien I very much appreciate your trying. Jeff |
|
From: Robert M. <RMa...@bc...> - 2005-10-31 09:31:48
|
Thanks for the help!
I was able to config a sql.ini file and now I can connect.
Rob M.
_____
From: Grant McDonald [mailto:gmc...@in...]
Sent: Friday, October 28, 2005 9:58 PM
To: Robert Marchetti; pyt...@ww...
Subject: RE: [python-sybase] error trying to connect using latest sybase.py
Since this python module is a wrapper around the Sybase CT library you've
got to use the server name that is defined in your sql.ini for windows or in
your interfaces file on linux.
cat /opt/sybase-12.5.2/interfaces:
dt1_12_5_3_esd1
master tcp ether wol1-db-srv-dt1 5010
query tcp ether wol1-db-srv-dt1 5010
so to connect to wol1-db-srv-dt1 on port 5000 i would use:
db = Sybase.connect("dt1_12_5_3_esd1",user, passwd, database)
-----Original Message-----
From: pyt...@ww...
[mailto:pyt...@ww...]On Behalf Of Robert
Marchetti
Sent: Saturday, 29 October 2005 2:34 AM
To: 'pyt...@ww...'
Subject: [python-sybase] error trying to connect using latest sybase.py
Hello,
I am trying to connect to a SYBASE using Sybase.connect
but it throws an error before I can connect
Example:
# DNS, user, passwd, Database
db = Sybase.connect("10.10.10.10:1600",user, passwd, database)
print db
Traceback (most recent call last):
File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in ?
db = Sybase.connect("10.150.4.103 : 1600",user, passwd, database)
File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in connect
strip, auto_commit, delay_connect, locking)
File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in __init__
self.connect()
File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in connect
status = conn.ct_connect(self.dsn)
File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in
_clientmsg_cb
raise DatabaseError(_fmt_client(msg))
- Ignored:
Sybase.DatabaseError: Layer: 6, Origin: 8
ct_connect(): directory service layer: internal directory control layer
error: Requested server name not found.
I can connect find thru java and Sybase central, but I would like to
python
so I can script some validation tests.
It uses an IP and Port as in the above example
(Actual IP not used in this message)
Any info would be great!
Thanks
Rob
_____
The information contained in this e-mail message and any attachments is
confidential, and is intended only for the use of the party to whom it
is addressed. If you are not the above-named intended recipient, you
are hereby notified that any dissemination, copying or disclosure of
this communication is strictly prohibited. If you have received this
communication in error, please notify Boston Communications Group, Inc.
immediately by reply to this message or by telephoning (781) 904-5000,
and destroy this message and its attachments, without making any copy
or distribution.
Important notice: This message is intended for the individual(s) and
entity(s) addressed. The information contained in this transmission and any
attached, may be confidential and may also be the subject of legal
privilege, public interest immunity or legal professional privilege. Any
review, retransmission, dissemination or other use of, taking of any action
in reliance upon this information by person or entities other than the
recipient is prohibited and requires authorization from the sender. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person) you may not copy or deliver this message to
anyone. In such cases you should destroy this message and kindly notify the
sender by reply email.
WARNING: Although Infocomp has taken reasonable precautions so that no
viruses are present in this e-mail, the company cannot accept responsibility
for any loss or damage arising from the use of e-mail attachments.
|
|
From: <arn...@em...> - 2005-10-29 21:37:10
|
Hi Jeff, I encountered somehow the same type of errors in the past on a Gentoo =20= Server. The problem is that I can't seem to remember exactly what did =20= it. I actually reinstalled the Sybase python module just a few days =20 ago, right after upgrading from python 2.3.5 to python 2.4.2 and I =20 had no issue at all... Are you under x86 Gentoo? A few things I would try would be to make =20 sure to set the SYBASE var to /usr and try without -U WANT_BULKCOPY. =20 Also you might want to check if your FreeTDS install is working =20 correctly by running a quick test using the command line tool tsql. Finally, you did not specify which version you tried to install. I =20 believe 0.36 is the one I have installed. Hope this helps. S=E9bastien On Oct 28, 2005, at 3:43 PM, J.Hubbs wrote: > I'm trying to make queries against a remote MS SQL Server from =20 > Python 2.4.2 on > Gentoo Linux and I understand (for good or ill) that the Sybase =20 > module for > Python is an effective and non-instrusive (as far as the server =20 > side goes) > way to do that. > > I have installed FreeTDS 0.62.3 via Gentoo ebuild and I re-emerged =20 > python > with the freetds and sybase USE flags included. > > I installed the Sybase module for Python as follows, as per > http://www.object-craft.com.au/projects/sybase/install.html: > > python setup.py build_ext -D HAVE_FREETDS=3D62 -U WANT_BULKCOPY > python setup.py install > > Yet, I get this when I try to "import Sybase" in Python: > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.4/site-packages/Sybase.py", line 20, in ? > from sybasect import * > ImportError: /usr/lib/python2.4/site-packages/sybasect.so: undefined > symbol: cs_dt_info > > I've looked at http://tinyurl.com/blvms in in hopes of finding this =20= > problem's > solution but the only thing I've been able to really mess with is =20 > the setting > of the SYBASE environment variable, which I determined I should set to > /opt/sybase/OCS-15_0, which contains > > bin config devlib include lib lib3p sample scripts sybhelp =20= > xappdefaults > > I installed Sybase Express Edition for Linux in hopes of obtaining =20 > this libcs > library, which didn't happen - it's nowhere to be found. > > Is there a way to untangle all this, or would I be better off going =20= > an ODBC > route? > > Thanks, > Jeff > > > _______________________________________________ > Python-sybase mailing list > Pyt...@ww... > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase > |
|
From: Grant M. <gmc...@in...> - 2005-10-29 18:59:06
|
Since this python module is a wrapper around the Sybase CT library you've
got to use the server name that is defined in your sql.ini for windows or in
your interfaces file on linux.
cat /opt/sybase-12.5.2/interfaces:
dt1_12_5_3_esd1
master tcp ether wol1-db-srv-dt1 5010
query tcp ether wol1-db-srv-dt1 5010
so to connect to wol1-db-srv-dt1 on port 5000 i would use:
db = Sybase.connect("dt1_12_5_3_esd1",user, passwd, database)
-----Original Message-----
From: pyt...@ww...
[mailto:pyt...@ww...]On Behalf Of Robert
Marchetti
Sent: Saturday, 29 October 2005 2:34 AM
To: 'pyt...@ww...'
Subject: [python-sybase] error trying to connect using latest sybase.py
Hello,
I am trying to connect to a SYBASE using Sybase.connect
but it throws an error before I can connect
Example:
# DNS, user, passwd, Database
db = Sybase.connect("10.10.10.10:1600",user, passwd, database)
print db
Traceback (most recent call last):
File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in ?
db = Sybase.connect("10.150.4.103 : 1600",user, passwd, database)
File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in connect
strip, auto_commit, delay_connect, locking)
File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in __init__
self.connect()
File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in connect
status = conn.ct_connect(self.dsn)
File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in
_clientmsg_cb
raise DatabaseError(_fmt_client(msg))
- Ignored:
Sybase.DatabaseError: Layer: 6, Origin: 8
ct_connect(): directory service layer: internal directory control layer
error: Requested server name not found.
I can connect find thru java and Sybase central, but I would like to
python
so I can script some validation tests.
It uses an IP and Port as in the above example
(Actual IP not used in this message)
Any info would be great!
Thanks
Rob
_____
The information contained in this e-mail message and any attachments is
confidential, and is intended only for the use of the party to whom it
is addressed. If you are not the above-named intended recipient, you
are hereby notified that any dissemination, copying or disclosure of
this communication is strictly prohibited. If you have received this
communication in error, please notify Boston Communications Group, Inc.
immediately by reply to this message or by telephoning (781) 904-5000,
and destroy this message and its attachments, without making any copy
or distribution.
|
|
From: J.Hubbs <jh...@di...> - 2005-10-29 13:52:16
|
I'm trying to make queries against a remote MS SQL Server from Python 2.4.2 on Gentoo Linux and I understand (for good or ill) that the Sybase module for Python is an effective and non-instrusive (as far as the server side goes) way to do that. I have installed FreeTDS 0.62.3 via Gentoo ebuild and I re-emerged python with the freetds and sybase USE flags included. I installed the Sybase module for Python as follows, as per http://www.object-craft.com.au/projects/sybase/install.html: python setup.py build_ext -D HAVE_FREETDS=62 -U WANT_BULKCOPY python setup.py install Yet, I get this when I try to "import Sybase" in Python: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/Sybase.py", line 20, in ? from sybasect import * ImportError: /usr/lib/python2.4/site-packages/sybasect.so: undefined symbol: cs_dt_info I've looked at http://tinyurl.com/blvms in in hopes of finding this problem's solution but the only thing I've been able to really mess with is the setting of the SYBASE environment variable, which I determined I should set to /opt/sybase/OCS-15_0, which contains bin config devlib include lib lib3p sample scripts sybhelp xappdefaults I installed Sybase Express Edition for Linux in hopes of obtaining this libcs library, which didn't happen - it's nowhere to be found. Is there a way to untangle all this, or would I be better off going an ODBC route? Thanks, Jeff |
|
From: Robert M. <RMa...@bc...> - 2005-10-29 09:33:48
|
Hello,
I am trying to connect to a SYBASE using Sybase.connect
but it throws an error before I can connect
Example:
# DNS, user, passwd, Database
db = Sybase.connect("10.10.10.10:1600",user, passwd, database)
print db
Traceback (most recent call last):
File "C:\eclipse\workspace\GUI_TestCases\DVM.py", line 11, in ?
db = Sybase.connect("10.150.4.103 : 1600",user, passwd, database)
File "C:\Python24\Lib\site-packages\Sybase.py", line 1005, in connect
strip, auto_commit, delay_connect, locking)
File "C:\Python24\Lib\site-packages\Sybase.py", line 867, in __init__
self.connect()
File "C:\Python24\Lib\site-packages\Sybase.py", line 886, in connect
status = conn.ct_connect(self.dsn)
File "C:\Python24\Lib\site-packages\Sybase.py", line 184, in
_clientmsg_cb
raise DatabaseError(_fmt_client(msg))
- Ignored:
Sybase.DatabaseError: Layer: 6, Origin: 8
ct_connect(): directory service layer: internal directory control layer
error: Requested server name not found.
I can connect find thru java and Sybase central, but I would like to
python
so I can script some validation tests.
It uses an IP and Port as in the above example
(Actual IP not used in this message)
Any info would be great!
Thanks
Rob
-----------------------------------------
The information contained in this e-mail message and any attachments is
confidential, and is intended only for the use of the party to whom it
is addressed. If you are not the above-named intended recipient, you
are hereby notified that any dissemination, copying or disclosure of
this communication is strictly prohibited. If you have received this
communication in error, please notify Boston Communications Group, Inc.
immediately by reply to this message or by telephoning (781) 904-5000,
and destroy this message and its attachments, without making any copy
or distribution.
|