Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old October 25th, 2006, 07:40 AM
John
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
DBD::Sybase + FreeTDS (0.64 + daily patch applied) errors

Hello all,

I have the following configuration:
- CS 4.4
- FreeTDS (0.64 stable + daily patch)
- DBD::Sybase 1.07

I want to compile the DBD::Sybase module and I get the following errors:

<snip>
[root@app5 DBD-Sybase-1.07]# make
cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
cp Sybase.pm blib/lib/DBD/Sybase.pm
/usr/bin/perl -p -e "s/~DRIVER~/Sybase/g" / Sybase.xsi
/usr/bin/perl / -typemap / Sybase.xs Sybase.xsc && mv Sybase.xsc Sybase.c
gcc -c -I/usr/local/freetds/include -DNTHREADS -DSYB_LP64 -D_REENTRANT -D_GNU_SURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SURCE -D_FILEFFSET_BITS=64 -I/usr/include/gdbm -g -pipe -m64 -DVERSIN=\"1.07\" -DXS_VERSIN=\"1.07\" -fPIC "" Sybase.c
gcc -c -I/usr/local/freetds/include -DNTHREADS -DSYB_LP64 -D_REENTRANT -D_GNU_SURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SURCE -D_FILEFFSET_BITS=64 -I/usr/include/gdbm -g -pipe -m64 -DVERSIN=\"1.07\" -DXS_VERSIN=\"1.07\" -fPIC "" dbdimp.c
dbdimp.c: In function `syb_init':
dbdimp.c:752: error: `BLK_VERSIN_150' undeclared (first use in this function)
dbdimp.c:752: error: (Each undeclared identifier is reported only once
dbdimp.c:752: error: for each function it appears in.)
dbdimp.c:756: error: `BLK_VERSIN_125' undeclared (first use in this function)
dbdimp.c:760: error: `BLK_VERSIN_120' undeclared (first use in this function)
dbdimp.c: In function `alloc_datatype':
dbdimp.c:3365: error: `CS_DATE' undeclared (first use in this function)
dbdimp.c:3366: error: `CS_TIME' undeclared (first use in this function)
dbdimp.c:3369: error: `CS_BIGINT' undeclared (first use in this function)
dbdimp.c:3370: error: `CS_USMALLINT' undeclared (first use in this function)
dbdimp.c:3372: error: `CS_UBIGINT' undeclared (first use in this function)
dbdimp.c: In function `_dbd_rebind_ph':
dbdimp.c:4779: warning: passing arg 2 of `to_binary' from incompatible pointer type
make: [dbdimp.o] Error 1
</snip>

I can compile DBD::Sybase using the stable version of FreeTDS (0.64), but it doesn't work with FreeTDS 0.64 + daily patch.
You can get the daily patch from:
I'm not sure if this problem is FreeTDS or DBD::Sybase related, so I'm writing on both lists.

Any help will be appreciated.

Thanks in advance,
John.

FreeTDS mailing list
FreeTDS (AT) lists (DOT) ibiblio.org

Reply With Quote
  #2  
Old October 26th, 2006, 03:20 PM
John
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
DBD::Sybase + FreeTDS (0.64 + daily patch applied)errors

Thanks Michael.

I added the folowing before syb_init() function in dbdimp.c file and
everything is fine.

#undef CS_VERSIN_150
#undef CS_VERSIN_125
#undef CS_VERSIN_120
#undef CS_DATE_TYPE
#undef CS_BIGINT_TYPE

Monday, September 18, 2006, 3:29:35 PM, you wrote:


It looks like the include files aren't fully compatible with the ASE 15.0 versions.

The offending code in DBD::Sybase:

#if defined(CS_VERSIN_150)
* * if(cs_ver == CS_VERSIN_150)
* * * * BLK_VERSIN = BLK_VERSIN_150;
#endif

So it appears that FreeTDS defines CS_VERSIN_150, but not BLK_VERSIN_150

and

#if defined(CS_DATE_TYPE)
* * case CS_DATE_TYPE: bytes = sizeof(CS_DATE); break;
* * case CS_TIME_TYPE: bytes = sizeof(CS_TIME); break;
#endif
#if defined(CS_BIGINT_TYPE)
* * case CS_BIGINT_TYPE: bytes = sizeof(CS_BIGINT); break;
* * case CS_USMALLINT_TYPE: bytes = sizeof(CS_USMALLINT); break;
* * case CS_UINT_TYPE: bytes = sizeof(CS_UINT); break;
* * case CS_UBIGINT_TYPE: bytes = sizeof(CS_UBIGINT); break;
#endif

This would seem to imply that freetds defines the CS_DATE_TYPE
macro, but not the CS_DATE typedef.

You can probably fix the problem by adding something like:

#undef CS_VERSIN_150
#undef CS_DATE_TYPE
#undef CS_BIGINT_TYPE

right before the first function definition in dbdimp.c

Michael


Michael





Internet
ionutz22 (AT) gmail (DOT) com (AT) lists (DOT) ibiblio.org - 18.09.2006 14:20
* Please respond to ionutz22 (AT) gmail (DOT) com; Please respond to freetds (AT) lists (DOT) ibiblio.org
Sent by: * * * *freetds-bounces (AT) lists (DOT) ibiblio.org
To: * * * *sybperl-l
cc: * * * *freetds
Subject: * * * *[freetds] DBD::Sybase + FreeTDS (0.64 + daily patch applied) errors


Hello all,

I have the following configuration:
- CS 4.4
- FreeTDS (0.64 stable + daily patch)
- DBD::Sybase 1.07

I want to compile the DBD::Sybase module and I get the following errors:

<snip>
[root@app5 DBD-Sybase-1.07]# make
cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod
cp Sybase.pm blib/lib/DBD/Sybase.pm
/usr/bin/perl -p -e "s/~DRIVER~/Sybase/g"
/ Sybase.xsi
/usr/bin/perl / *-typemap
/ *Sybase.xs Sybase.xsc && mv Sybase.xsc Sybase.c
gcc -c *-I/usr/local/freetds/include -DNTHREADS *-DSYB_LP64

-D_REENTRANT -D_GNU_SURCE -DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SURCE -D_FILEFFSET_BITS=64
-I/usr/include/gdbm -g -pipe -m64 * -DVERSIN=\"1.07\"
-DXS_VERSIN=\"1.07\" -fPIC
"" * Sybase.c
gcc -c *-I/usr/local/freetds/include -DNTHREADS *-DSYB_LP64

-D_REENTRANT -D_GNU_SURCE -DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SURCE -D_FILEFFSET_BITS=64
-I/usr/include/gdbm -g -pipe -m64 * -DVERSIN=\"1.07\"
-DXS_VERSIN=\"1.07\" -fPIC
"" * dbdimp.c
dbdimp.c: In function `syb_init':
dbdimp.c:752: error: `BLK_VERSIN_150' undeclared (first use in this function)
dbdimp.c:752: error: (Each undeclared identifier is reported only once
dbdimp.c:752: error: for each function it appears in.)
dbdimp.c:756: error: `BLK_VERSIN_125' undeclared (first use in this function)
dbdimp.c:760: error: `BLK_VERSIN_120' undeclared (first use in this function)
dbdimp.c: In function `alloc_datatype':
dbdimp.c:3365: error: `CS_DATE' undeclared (first use in this function)
dbdimp.c:3366: error: `CS_TIME' undeclared (first use in this function)
dbdimp.c:3369: error: `CS_BIGINT' undeclared (first use in this function)
dbdimp.c:3370: error: `CS_USMALLINT' undeclared (first use in this function)
dbdimp.c:3372: error: `CS_UBIGINT' undeclared (first use in this function)
dbdimp.c: In function `_dbd_rebind_ph':
dbdimp.c:4779: warning: passing arg 2 of `to_binary' from incompatible pointer type
make: [dbdimp.o] Error 1
</snip>

I can compile DBD::Sybase using the stable version of FreeTDS
(0.64), but it doesn't work with FreeTDS 0.64 + daily patch.
You can get the daily patch from:

I'm not sure if this problem is FreeTDS or DBD::Sybase related, so I'm writing on both lists.

Any help will be appreciated.

Thanks in advance,
John.

FreeTDS mailing list
FreeTDS (AT) lists (DOT) ibiblio.org

This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.



Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.



--
Best regards,
John mailto:ionutz22 (AT) gmail (DOT) com


FreeTDS mailing list
FreeTDS (AT) lists (DOT) ibiblio.org

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Development > DBD::Sybase + FreeTDS (0.64 + daily patch applied) errors


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek