Skip Menu |

This queue is for tickets about the DBD-Sybase CPAN distribution.

Report information
The Basics
Id: 34411
Status: resolved
Priority: 0/
Queue: DBD-Sybase

People
Owner: mpeppler [...] peppler.org
Requestors: sales [...] minixel.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.08
Fixed in: (no value)



Subject: Fails to compile on RHEL 64
I compiled DBD-Sybase 1.08 using DBI 1.604, and the perl Makefile.PL works fine, but then when I do a make I get this Sybase.xsi:275: error: invalid lvalue in assignment Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: Sybase.xsi:334: error: invalid lvalue in assignment make: *** [Sybase.o] Error 1
Subject: DBD_sybase_error.txt
gcc -c -I/usr/local/include -DNO_THREADS -DSYB_LP64 -DNO_BLK=1 -I/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.08\" -DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" Sybase.c In file included from Sybase.h:50, from Sybase.xs:14: dbdimp.h:32: error: expected specifier-qualifier-list before âCS_BIGINTâ Sybase.c: In function âXS_DBD__Sybase__db__isdeadâ: Sybase.c:103: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__db__date_fmtâ: Sybase.c:121: warning: unused variable âixâ Sybase.xs: In function âXS_DBD__Sybase__db_pingâ: Sybase.xs:83: warning: implicit declaration of function âsyb_pingâ Sybase.xs: In function âXS_DBD__Sybase__st_cancelâ: Sybase.xs:95: warning: implicit declaration of function âsyb_st_cancelâ Sybase.c:157: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_get_dataâ: Sybase.c:175: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_data_infoâ: Sybase.c:205: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_send_dataâ: Sybase.c:240: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_prepare_sendâ: Sybase.c:260: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_finish_sendâ: Sybase.c:278: warning: unused variable âixâ Sybase.xsi: In function âXS_DBD__Sybase__db_disconnectâ: Sybase.xsi:275: error: invalid lvalue in assignment Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: Sybase.xsi:334: error: invalid lvalue in assignment make: *** [Sybase.o] Error 1
On Mon Mar 24 20:19:06 2008, falves1 wrote: Show quoted text
> I compiled DBD-Sybase 1.08 using DBI 1.604, and the perl Makefile.PL > works fine, but then when I do a make I get this > Sybase.xsi:275: error: invalid lvalue in assignment > Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: > Sybase.xsi:334: error: invalid lvalue in assignment > make: *** [Sybase.o] Error 1
This is a problem with FreeTDS. The issue is that FreeTDS defines CS_UINT_TYPE, but not CS_BIGINT_TYPE, and Sybase never defines one without the other. The fix is to edit dbdimp.h and comment out the CS_BIGINT declaration around line 32.
Subject: RE: [rt.cpan.org #34411] Fails to compile on RHEL 64
Date: Tue, 25 Mar 2008 03:00:29 -0400
To: <bug-DBD-Sybase [...] rt.cpan.org>
From: "Federico Alves" <sales [...] minixel.com>
Dear Michel I did this: CS_CHAR *c; CS_INT i; #if defined(CS_UINT_TYPE) CS_UINT ui; /*CS_BIGINT bi;*/ CS_UBIGINT ubi; #endif But it still fails like this: Sybase.c:260: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_finish_sendâ: Sybase.c:278: warning: unused variable âixâ Sybase.xsi: In function âXS_DBD__Sybase__db_disconnectâ: Sybase.xsi:275: error: invalid lvalue in assignment Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: Sybase.xsi:334: error: invalid lvalue in assignment make: *** [Sybase.o] Error 1 Please let me know if I did something wrong. Yours Federico Show quoted text
-----Original Message----- From: Michael Peppler via RT [mailto:bug-DBD-Sybase@rt.cpan.org] Sent: Tuesday, March 25, 2008 2:09 AM To: sales@minixel.com Subject: [rt.cpan.org #34411] Fails to compile on RHEL 64 <URL: http://rt.cpan.org/Ticket/Display.html?id=34411 > On Mon Mar 24 20:19:06 2008, falves1 wrote:
> I compiled DBD-Sybase 1.08 using DBI 1.604, and the perl Makefile.PL > works fine, but then when I do a make I get this > Sybase.xsi:275: error: invalid lvalue in assignment > Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: > Sybase.xsi:334: error: invalid lvalue in assignment > make: *** [Sybase.o] Error 1
This is a problem with FreeTDS. The issue is that FreeTDS defines CS_UINT_TYPE, but not CS_BIGINT_TYPE, and Sybase never defines one without the other. The fix is to edit dbdimp.h and comment out the CS_BIGINT declaration around line 32.
Try this: Edit dbdimp.h, and near the top, add #if !defined(CS_BIGINT_TYPE) #define CS_BIGINT_TYPE CS_INT_TYPE #endif
Subject: RE: [rt.cpan.org #34411] Fails to compile on RHEL 64
Date: Tue, 25 Mar 2008 15:27:43 -0400
To: <bug-DBD-Sybase [...] rt.cpan.org>
From: "Federico Alves" <sales [...] minixel.com>
Dear Michel I did follow your instructions and it still blows up. If you don't mind spending a minute in this, please login via SSH to my box at 66.28.190.219, root, pwd=dbdisgood and go to /usr/src/DBD-Sybase-1.08. I take full responsibility and you are not liable for any reason while accepting my invitation. Once you make it work, maybe we can post the changes to the community? Yours Federico Sybase.c: In function âXS_DBD__Sybase__db__isdeadâ: Sybase.c:103: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__db__date_fmtâ: Sybase.c:121: warning: unused variable âixâ Sybase.xs: In function âXS_DBD__Sybase__db_pingâ: Sybase.xs:83: warning: implicit declaration of function âsyb_pingâ Sybase.xs: In function âXS_DBD__Sybase__st_cancelâ: Sybase.xs:95: warning: implicit declaration of function âsyb_st_cancelâ Sybase.c:157: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_get_dataâ: Sybase.c:175: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_data_infoâ: Sybase.c:205: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_send_dataâ: Sybase.c:240: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_prepare_sendâ: Sybase.c:260: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_finish_sendâ: Sybase.c:278: warning: unused variable âixâ Sybase.xsi: In function âXS_DBD__Sybase__db_disconnectâ: Sybase.xsi:275: error: invalid lvalue in assignment Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: Sybase.xsi:334: error: invalid lvalue in assignment make: *** [Sybase.o] Error 1 Show quoted text
-----Original Message----- From: Michael Peppler via RT [mailto:bug-DBD-Sybase@rt.cpan.org] Sent: Tuesday, March 25, 2008 3:19 PM To: sales@minixel.com Subject: [rt.cpan.org #34411] Fails to compile on RHEL 64 <URL: http://rt.cpan.org/Ticket/Display.html?id=34411 > Try this: Edit dbdimp.h, and near the top, add #if !defined(CS_BIGINT_TYPE) #define CS_BIGINT_TYPE CS_INT_TYPE #endif
Here is a patch that appears to solve the problem when building with the current version of FreeTDS. To build, make sure that -DFREETDS is set.
Index: dbdimp.c =================================================================== RCS file: /usr/local/cvsroot/DBD-Sybase/dbdimp.c,v retrieving revision 1.96 diff -c -r1.96 dbdimp.c *** dbdimp.c 19 Apr 2007 18:31:19 -0000 1.96 --- dbdimp.c 26 Mar 2008 19:17:51 -0000 *************** *** 3494,3501 **** --- 3494,3507 ---- #endif #if defined(CS_BIGINT_TYPE) case CS_BIGINT_TYPE: bytes = sizeof(CS_BIGINT); break; + #endif + #if defined(CS_USMALLINT_TYPE) case CS_USMALLINT_TYPE: bytes = sizeof(CS_USMALLINT); break; + #endif + #if defined(CS_UINT_TYPE) case CS_UINT_TYPE: bytes = sizeof(CS_UINT); break; + #endif + #if defined(CS_UBIGINT_TYPE) case CS_UBIGINT_TYPE: bytes = sizeof(CS_UBIGINT); break; #endif default: warn("alloc_datatype: unkown type: %d", datatype); return NULL; Index: dbdimp.h =================================================================== RCS file: /usr/local/cvsroot/DBD-Sybase/dbdimp.h,v retrieving revision 1.38 diff -c -r1.38 dbdimp.h *** dbdimp.h 11 Apr 2007 17:27:29 -0000 1.38 --- dbdimp.h 26 Mar 2008 19:17:51 -0000 *************** *** 17,22 **** --- 17,36 ---- */ #define MAX_CHAR_BUF 1024 + #if defined(FREETDS) + #undef CS_UINT_TYPE + #undef CS_DATE_TYPE + + #define CS_BIGINT CS_INT + #define CS_UBIGINT CS_INT + #define CS_USMALLINT CS_SMALLINT + /*#define CS_UINT_TYPE CS_INT_TYPE*/ + + #define BLK_VERSION_150 BLK_VERSION + #define BLK_VERSION_125 BLK_VERSION + #define BLK_VERSION_120 BLK_VERSION + #endif + typedef struct _col_data { *************** *** 29,35 **** --- 43,53 ---- CS_INT i; #if defined(CS_UINT_TYPE) CS_UINT ui; + #endif + #if defined(CS_BIGINT_TYPE) CS_BIGINT bi; + #endif + #if defined(CS_UBIGINT_TYPE) CS_UBIGINT ubi; #endif CS_FLOAT f;
Subject: RE: [rt.cpan.org #34411] Fails to compile on RHEL 64
Date: Wed, 26 Mar 2008 17:03:35 -0400
To: <bug-DBD-Sybase [...] rt.cpan.org>
From: "Federico Alves" <sales [...] minixel.com>
Dear Michel I applied the patch but I still have the same error. Maybe it is because I don't know what to do with this portion from your email: " To build, make sure that -DFREETDS is set" Would you be so kind to take a look? patch -p0 < ../freetds.patch patching file dbdimp.c patching file dbdimp.h Hunk #1 succeeded at 21 (offset 4 lines). [root@sipserver DBD-Sybase-1.08]# make gcc -c -I/usr/local/include -DNO_THREADS -DSYB_LP64 -DNO_BLK=1 -I/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"1.08\" -DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" Sybase.c In file included from Sybase.h:50, from Sybase.xs:14: dbdimp.h:52: error: expected specifier-qualifier-list before âCS_BIGINTâ Sybase.c: In function âXS_DBD__Sybase__db__isdeadâ: Sybase.c:103: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__db__date_fmtâ: Sybase.c:121: warning: unused variable âixâ Sybase.xs: In function âXS_DBD__Sybase__db_pingâ: Sybase.xs:83: warning: implicit declaration of function âsyb_pingâ Sybase.xs: In function âXS_DBD__Sybase__st_cancelâ: Sybase.xs:95: warning: implicit declaration of function âsyb_st_cancelâ Sybase.c:157: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_get_dataâ: Sybase.c:175: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_data_infoâ: Sybase.c:205: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_send_dataâ: Sybase.c:240: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_prepare_sendâ: Sybase.c:260: warning: unused variable âixâ Sybase.c: In function âXS_DBD__Sybase__st_ct_finish_sendâ: Sybase.c:278: warning: unused variable âixâ Sybase.xsi: In function âXS_DBD__Sybase__db_disconnectâ: Sybase.xsi:275: error: invalid lvalue in assignment Sybase.xsi: In function âXS_DBD__Sybase__db_DESTROYâ: Sybase.xsi:334: error: invalid lvalue in assignment make: *** [Sybase.o] Error 1 Show quoted text
-----Original Message----- From: Michael Peppler via RT [mailto:bug-DBD-Sybase@rt.cpan.org] Sent: Wednesday, March 26, 2008 3:24 PM To: sales@minixel.com Subject: [rt.cpan.org #34411] Fails to compile on RHEL 64 <URL: http://rt.cpan.org/Ticket/Display.html?id=34411 > Here is a patch that appears to solve the problem when building with the current version of FreeTDS. To build, make sure that -DFREETDS is set.
You can fix your problem temporarily by editing dbdimp.h, and adding #define FREETDS 1 near the top of the file.
Fixed in 1.11.