Hmm,
I see that sql.h indeed has that define:
605 #if (ODBCVER >= 0x0380)                                                     
     
606 SQLRETURN  SQL_API SQLCancelHandle(SQLSMALLINT HandleType, SQLHANDLE 
InputHandle);
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:
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  
-I../include   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat 
-Werror=format-security -pthread -c -o SQLCancelHandle.lo SQLCancelHandle.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time 
-D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -Wformat -Werror=format-security -pthread -c 
SQLCancelHandle.c  -fPIC -DPIC -o .libs/SQLCancelHandle.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -Wdate-time 
-D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. 
-fstack-protector-strong -Wformat -Werror=format-security -pthread -c 
SQLCancelHandle.c -o SQLCancelHandle.o >/dev/null 2>&1

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
00000000000078f0 T SQLAllocHandle
0000000000007900 T SQLAllocHandleStd
0000000000018620 T SQLFreeHandle
root@b:~# nm -D /usr/lib/x86_64-linux-gnu/libodbc.so.1 | grep -i handle
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-sqlcancelhandle

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1765762

Title:
  Undefined reference to SQLCancelHandle

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unixodbc/+bug/1765762/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to