Undefined reference to SQLCancelHandle
Bug #1765762 reported by
Guillaume
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unixodbc (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
The header file of the package got the definition of the SQLCancelHandle function but the linkable library doesn't implement it.
To post a comment you must log in.
Hmm, (SQLSMALLINT HandleType, SQLHANDLE InputHandle);
I see that sql.h indeed has that define:
605 #if (ODBCVER >= 0x0380)
606 SQLRETURN SQL_API SQLCancelHandle
607 #endif·
And while makefile as well as DriverManager/ SQLCancelHandle .c look as if they'd provide that they don't.
On build it is compiled and linked: prefix- map=/<< PKGBUILDDIR> >=. -fstack- protector- strong -Wformat -Werror= format- security -pthread -c -o SQLCancelHandle.lo SQLCancelHandle.c prefix- map=/<< PKGBUILDDIR> >=. -fstack- protector- strong -Wformat -Werror= format- security -pthread -c SQLCancelHandle.c -fPIC -DPIC -o .libs/SQLCancel Handle. o prefix- map=/<< PKGBUILDDIR> >=. -fstack- protector- strong -Wformat -Werror= format- security -pthread -c SQLCancelHandle.c -o SQLCancelHandle.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-
I never used this lib on my own, so I might something trivial as "this has to be used differently" that I miss.
It is not shown in the symbols file either.
Wait - doesn't this depend on the target actually supporting it.
I think you can run "SQLGetFunctions" to list if that is supposed to work after you have set up your connection.
Let me fall back ignoring myself trying to understand.
Just checking the lib indeed does not list the function.
root@b:~# nm -D /usr/lib/ x86_64- linux-gnu/ libodbc. so.2 | grep -i handle x86_64- linux-gnu/ libodbc. so.1 | grep -i handle
00000000000078f0 T SQLAllocHandle
0000000000007900 T SQLAllocHandleStd
0000000000018620 T SQLFreeHandle
root@b:~# nm -D /usr/lib/
00000000000078f0 T SQLAllocHandle
0000000000007900 T SQLAllocHandleStd
0000000000018620 T SQLFreeHandle
Also with debug symbols installed and objdump -dgS on the .so I can't find it.
So yes, it is defined but not there.
But since I lack to see yet why (as it is built and linked) I fail to suggest a good solution.
I found [1] which calls it a bug as well in Ubuntu/Debian - hmm.
But there is no clear call what should be different.
And OTOH some comments refer to driver dependencies as well as need to set odbc version.
Per Name I'd assume that is your entry there - which "better deb packages" do you mean.
As by checking what is different there we could derive what is wrong.
So which other .deb did you mean?
[1]: https:/ /stackoverflow. com/questions/ 49771613/ undefined- reference- to-sqlcancelhan dle