-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEFINE_CURSOR_LIB_VER
never defined, causes PHP's odbc_connect
to fail in certain configurations
#201
Comments
hughmcmaster
changed the title
DEFINE_CURSOR_LIB_VER never defined, causes PHP's
Dec 13, 2024
odbc_connect
to fail in certain configurationsDEFINE_CURSOR_LIB_VER
never defined, causes PHP's odbc_connect
to fail in certain configurations
On 13/12/2024 12:21, Hugh McMaster wrote:
While looking into Debian bug 1089695
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089695> (Ubuntu
bug 2085815), it is clear |DEFINE_CURSOR_LIB_VER| is never defined at
compile-time or build-time and the |#define| is not used anywhere else.
The |#ifdef| guard seems to serve no purpose in the source. Removing
the guard and building resolves the first half of the bug.
Alternatively, |configure.ac| could be patched to achieve the same
thing via |config.h|.
It also brings to mind the usefulness of |#ifndef CURSOR_LIB_VER| in
DriverManager/SQLConnect.c. Wouldn't it be simpler to always |#define
CURSOR_LIB_VER 2|?
—
Reply to this email directly, view it on GitHub
<#201>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYK62OBNPFYE5C4B37TNGL2FLGNVAVCNFSM6AAAAABTR35MBSVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZTQMRXGIZTQMQ>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
Maybe, I guess it depends if the build builds libodbccur.so or
libodbccur.so.2. Not sure exactly what libodbc2 or variants are in this
context (looking at the bug). But yes, we could add a
--cursor-lib-version to configure if that would help.
|
Debian builds libodbc.so.2 and libodbccr.so.2 by default. The libodbc*.so symlinks are only installed in the unixodbc-dev development package. When CURSOR_LIB_VER is not defined (and it isn't in the current Debian package due to the guard against DEFINE_CURSOR_LIB_VER), the driver tries to Do you want me to prepare a patch with your suggested configure flag? |
On 13/12/2024 13:15, Hugh McMaster wrote:
Debian builds libodbc.so.2 and libodbccr.so.2 by default.
The libodbc*.so symlinks are only installed in the unixodbc-dev
development package.
When CURSOR_LIB_VER is not defined (and it isn't in the current Debian
package due to the guard against DEFINE_CURSOR_LIB_VER), the driver
tries to |dlopen| libodbccr.so and fails.
Do you want me to prepare a patch with your suggested configure flag?
—
Reply to this email directly, view it on GitHub
<#201 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYK62JT4SRTOL26JZTKYRD2FLMVRAVCNFSM6AAAAABTR35MBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBRGQ2DANBYGE>.
You are receiving this because you commented.Message ID:
***@***.***>
If you have the time then yes, that would be great (likely you are in
the best place to test it as well). If not, I will do it when I have chance.
|
hughmcmaster
added a commit
to hughmcmaster/unixODBC
that referenced
this issue
Dec 16, 2024
This patch modifies configure.ac so DEFINE_CURSOR_LIB_VER can be defined in config.h. Doing so subsequently defines CURSOR_LIB_VER, allowing a versioned cursor library to be accessed via dlopen in DriverManager/SQLConnect.c. This new configure switch is not enabled by default, so existing behaviour is retained. Closes lurcher#201.
lurcher
pushed a commit
that referenced
this issue
Dec 16, 2024
This patch modifies configure.ac so DEFINE_CURSOR_LIB_VER can be defined in config.h. Doing so subsequently defines CURSOR_LIB_VER, allowing a versioned cursor library to be accessed via dlopen in DriverManager/SQLConnect.c. This new configure switch is not enabled by default, so existing behaviour is retained. Closes #201.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While looking into Debian bug 1089695 (Ubuntu bug 2085815), it is clear
DEFINE_CURSOR_LIB_VER
is never defined at compile-time or build-time and the#define
is not used anywhere else.The
#ifdef
guard seems to serve no purpose in the source. Removing the guard and building resolves the first half of the bug. Alternatively,configure.ac
could be patched to achieve the same thing viaconfig.h
.It also brings to mind the usefulness of
#ifndef CURSOR_LIB_VER
in DriverManager/SQLConnect.c. Wouldn't it be simpler to always#define CURSOR_LIB_VER 2
?The text was updated successfully, but these errors were encountered: