To inform you - libdbi compiles fine on solaris 10x86 by performing the
following:
./configure --with-sqlite3
gmake
-- FAILS on Documentation build
./configure --disable-docs --with-sqlite3
gmake
gmake check
-- FAILS with
test_dbi: fatal: relocation error: file
/export/src/libdbi-drivers-0.8.3/drivers/sqlite3/.libs/libdbdsqlite3.so: symbol
_dbi_internal_error_handler: referenced symbol not found
line 734
_dbi_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME);
changed to
_dbd_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME);
diff -u dbd_sqlite3.c dbd_sqlite3.new.c >dbd_sqlite3.patch
patch dbd_sqlite3.c < dbd_sqlite3.patch
--- dbd_sqlite3.c Thu Jan 27 01:51:41 2011
+++ dbd_sqlite3.new.c Thu Jan 27 01:51:51 2011
@@ -731,7 +731,7 @@
&errmsg);
if (query_res || !table_numrows) {
- _dbi_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME);
+ _dbd_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME);
/* printf("field not found\n"); */
return 0;
}
corrects and allows proper build again, however there is an issue with the make
check that causes a segfault.
Test 8: Retrieve data:
libdbi: [query] SELECT * from test_datatypes
Got result, try to access rows
this should cause a column type mismatch...
type mismatch errflag=-7: The requested variable type does not match what
libdbi thinks it should be
this should cause a bad name error...
bad name errflag=-5: An invalid name was passed to libdbi
/bin/bash: line 1: 12871 Segmentation Fault (core dumped) ${dir}$tst
gdb backtrace
#0 0xd1625a6c in strlen () from /lib/libc.so.1
(gdb) bt
#0 0xd1625a6c in strlen () from /lib/libc.so.1
#1 0xd1680522 in _ndoprnt () from /lib/libc.so.1
#2 0xd16831e0 in printf () from /lib/libc.so.1
#3 0x080558fc in test_retrieve_data (ptr_cinfo=0x8047894,
ptr_tinfo=0x8047874, conn=0x806b478) at test_dbi.c:1804
#4 0x0805234a in main (argc=1, argv=0x8047d88) at test_dbi.c:180
At Line 1836 of test_dbi.c in the tests folder I made the following change:
string_to_quote?string_to_quote:"(NULL)",
the_driver_string?the_driver_string:"(NULL)",
string_to_quote?string_to_quote:"(NULL)",
the_quoted_string?the_quoted_string:"(NULL)",
string_to_quote?string_to_quote:"(NULL)",
the_quoted_string_copy?the_quoted_string_copy:"(NULL)",
string_to_escape?string_to_escape:"(NULL)",
the_escaped_string?the_escaped_string:"(NULL)",
string_to_escape?string_to_escape:"(NULL)",
the_escaped_string_copy?the_escaped_string_copy:"(NULL)",
the_empty_string?the_empty_string:"(NULL)",
the_null_string?the_null_string:"(NULL)",
diff -u test_dbi.c test_dbi.new.c >test_dbi.patch
patch test_dbi.c < test_dbi.patch
test_dbi.patch
--- test_dbi.c Wed Feb 6 11:22:44 2008
+++ test_dbi.new.c Thu Jan 27 02:03:13 2011
@@ -1833,18 +1833,18 @@
the_ulonglong,
the_float,
the_double,
- string_to_quote,
- the_driver_string,
- string_to_quote,
- the_quoted_string,
- string_to_quote,
- the_quoted_string_copy,
- string_to_escape,
- the_escaped_string,
- string_to_escape,
- the_escaped_string_copy,
- the_empty_string,
- the_null_string,
+ string_to_quote?string_to_quote:"(NULL)",
+ the_driver_string?the_driver_string:"(NULL)",
+ string_to_quote?string_to_quote:"(NULL)",
+ the_quoted_string?the_quoted_string:"(NULL)",
+ string_to_quote?string_to_quote:"(NULL)",
+ the_quoted_string_copy?the_quoted_string_copy:"(NULL)",
+ string_to_escape?string_to_escape:"(NULL)",
+ the_escaped_string?the_escaped_string:"(NULL)",
+ string_to_escape?string_to_escape:"(NULL)",
+ the_escaped_string_copy?the_escaped_string_copy:"(NULL)",
+ the_empty_string?the_empty_string:"(NULL)",
+ the_null_string?the_null_string:"(NULL)",
year_dt,
mon_dt,
day_dt,
This enables the strings to be properly handled as NULL as the standard libs on
solaris do not support this by default.
SUCCESS! All done, disconnecting and shutting down libdbi. Have a nice day.
PASS: test_dbi
Thanks,
Tim Tessier
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Libdbi-drivers-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel