-
Notifications
You must be signed in to change notification settings - Fork 562
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
4.0.34 manylinux wheels include old libodbc.so and libltdl.so libraries #1082
Comments
cc: @keitherskine, @hugovk @abitrolly Unfortunately, I cannot test the Mac wheels. |
FWIW, if I python -m pip wheel . it produces a file named |
@gordthompson I believe you need https://pypi.org/project/auditwheel/ to include
Wheels are built using pyodbc/.github/workflows/ubuntu_build.yml Lines 206 to 209 in b7e944a
These old versions should be native Debian packages. In that case either build
I don't have Mac, so no help for it from me either. |
Hi @abitrolly . Thanks for the pointers. I've just been reading up on this and, yes, it appears that auditwheel (specifically https://pypi.org/project/auditwheel/ " So that's what is happening now. The problem is that the ODBC DM (Driver Manager, unixODBC in this case) is a "system thing" and, IMO, individual apps should not be overriding the system libs for something like that. Not only might that lead to strange errors (as we have seen), but it could also be a support headache: Omitting the libs from the wheel files would require that users install unixODBC separately (which, BTW, would happen automatically if they installed "ODBC Driver 17/18 for SQL Server") but at least they wouldn't have to install build tools (e.g. |
https://cibuildwheel.readthedocs.io/en/stable/ should contain info how to avoid copying libs. There is probably a good reason why wheels are copying tested version of libs instead of expecting that system ones are available. |
So https://pypi.org/project/auditwheel/ also says … "auditwheel is a command line tool to facilitate the creation of Python wheel packages for Linux (containing pre-compiled binary extensions) that are compatible with a wide variety of Linux distributions, consistent with the PEP 600 manylinux_x_y, PEP 513 manylinux1, PEP 571 manylinux2010 and PEP 599 manylinux2014 platform tags." (emphasis mine) … which sort of makes me wonder if we should be generating manylinux wheels at all. If we build "generic" Linux wheels as described above (that require a separate unixODBC install) and they don't work for a particular distro then the workaround for those users would be
to build from source, as with previous versions. |
It seems to me that the right way is compile against latest version of |
It doesn't matter which version of unixODBC you compile with as long as it is >= 2.3.1 since they share the same ABI. The problem is with redistributing it, which shouldn't be done because on different Linux distros the DM may be configured slightly differently. |
I don't understand why configuration depends on binary if ABI is the same. |
This is my understanding of the situation with the wheels in the current (4.0.34) distribution. Release 4.0.34 is the first distribution with wheels that were generated using GitHub Actions (using cibuildwheel). Windows
Linux
MacOS
Questions for everybody:
All feedback welcome. |
I was an occasional user of Therefore I assume that if people choose wheels, they need |
@abitrolly - We certainly appreciate your contribution! We just need to get "the devil in the details" sorted out.
If by "people" you mean end-users, the problem is that they don't choose wheels. pip chooses a wheel for them if a suitable one is available. (But I'm sure you knew that.) If by "people" you mean the pyodbc maintainers, then that's why we're having this discussion. 😄
The repositories for a given distro will undoubtedly have packages that are optimized for installation on that distro. The problem is that the repos often contain versions that are old – sometimes really old. On Ubuntu 20.24, Also worth mentioning that installing "ODBC Driver 17/18 for SQL Server"
FWIW, I just tried using the "generic" wheel file I created from my ~/git/pyodbc folder on Ubuntu 20.24 via
to install pyodbc on Oracle Linux 9 (based on RHEL) and it seems to have worked fine. No errors from the current version of pip, and Python 3.9 has no complaints about |
@gordthompson well, I certainly think that maintainers are people too. :D For me the best strategy is to ship wheels with the latest version |
TBH, I don't know how much "manylinux" contributes to avoiding
I didn't find anything in the cibuildwheel docs (or any docs per se for auditwheel), but I did find this: https://stackoverflow.com/questions/67326886/can-i-exclude-libraries-from-auditwheel-repair |
Why not to compile newer |
Different Linux distros may configure unixODBC differently. One of the more obvious differences that comes to mind is that SuSE puts odbcinst.ini and odbc.ini in /etc/unixODBC/ instead of /etc. If you ship a version with pyODBC that looks in /etc , then other ODBC drivers on a system where it is in a different place will not be found. This is just one of the confusions that can occur. Look in unixODBC's configure script for the other differences in which it can be configured. Thus my answers to Keith's questions 3 and 5 are a strong No. |
@v-chojas why not standardize lookup location to remove configuration mess, instead of adding more mess? As a DevOps, rather than caring about matrix of configuration locations across Linux versions, then incompatibilities between |
What do you mean "standardize lookup location"? You are free to try to convince all the Linux distros to configure unixODBC in the same way, but I don't think that's going to help the immediate issue either. ODBC was meant to be a system-wide component. Even disregarding the legal issues with redistribution, packaging ODBC drivers would be even worse, as that would cause certain drivers to be visible only to pyODBC and not the other ODBC applications on the system, or vice-versa. That causes massive confusion when debugging (e.g. how do you isolate pyODBC as being the cause, when trying to use the driver or DM from elsewhere doesn't work?) ODBC drivers often have their own dependencies too, which could conflict with those of the OS; do you propose to put those in there as well? Or pull the rest of the OS into it too...? No. |
Now the trend in DevOps is to isolate all components into containers and virtual environments. To reduce compatibility hell and configuration hassle.
For other ways to access databases, it is completely normal for Python drivers like If I would need to debug connection problems with Python app, I would use the information on Python level that
I believe https://github.com/pypa/auditwheel already detects which libs are needed and puts them into wheel to avoid any conflicts.
I hope we still understand that the context is Linux, and Linux is kernel and packages, and if your database driver is bloatware that requires total OS to be packaged, instead of relying on standard |
If you want a container, then use a container.
That's not how ODBC is intended to work.
Then why do you not think pyODBC should rely on the system unixODBC? After all, didn't your idea already lead to several problems reported where there was not any before? For every one who makes an issue here, there are probably many others who either haven't upgraded to '34 yet, or encountered this issue and immediately went back. |
Which in both cases is effectively "packaging an OS (environment)" and so the argument becomes somewhat circular. When you deploy that environment you can ensure that it has the required components (specifically, the ODBC DM). Also, unixODBC is not the only DM out there: iODBC is another option, and apparently some ODBC drivers are built to use that DM specifically. (But I must confess near-complete ignorance when it comes to iODBC.)
"spyware"? That seems a bit … paranoid. And the irony is that Windows includes the ODBC DM "out of the box", making this a non-issue on that platform. |
I didn't say that I think that
Then why don't you ask them if they want to rollback #966, so that everybody had to install |
I never answered my own questions from above. Here are my thoughts:
Anyway, those are my thoughts. If anybody wants to see more of the builds that cibuildwheel can do, have a look at the artifacts here: https://github.com/keitherskine/pyodbc/actions/runs/2735953171 |
CentOS 7 is the older one, so you will get wider compatibility if you build on it. In general, backwards-compatibility means that binaries built on an older system will work on a newer one, but not vice-versa; on the other hand, in contrast to Windows, it is much more difficult to do the opposite. |
Fixed in version 4.0.35 of pyodbc. Linux wheels no longer include any libs. |
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah <nirmisha@amazon.com>
…lfish-for-postgresql#845) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Author: Nirmit Shah <nirmisha@amazon.com> Signed-off-by: Shalini Lohia <lshalini@amazon.com>
#851) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Author: Nirmit Shah nirmisha@amazon.com Signed-off-by: Shalini Lohia lshalini@amazon.com
…lfish-for-postgresql#845) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah <nirmisha@amazon.com>
…lfish-for-postgresql#845) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah <nirmisha@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah nirmisha@amazon.com
…lfish-for-postgresql#854) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah nirmisha@amazon.com
…lfish-for-postgresql#854) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah nirmisha@amazon.com
#880) Description The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah nirmisha@amazon.com
…lfish-for-postgresql#854) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah nirmisha@amazon.com
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: HarshLunagariya <40052763+HarshLunagariya@users.noreply.github.com> Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
…lfish-for-postgresql#845) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah <nirmisha@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version.
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: Kuntal Ghosh <kuntalgh@amazon.com>
…l#909) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: HarshLunagariya <40052763+HarshLunagariya@users.noreply.github.com> Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
…l#950) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: Kuntal Ghosh <kuntalgh@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: Kuntal Ghosh <kuntalgh@amazon.com>
The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 We're running the github actions on ubuntu-latest. Previously, it was ubuntu-20.04, but in any recently created fork, it's pointing to ubuntu-22.04. This is causing dependency/build failure in the github actions running in the fork. So, let's fix the os version. Task: BABEL-OSS Authored-by: HarshLunagariya <40052763+HarshLunagariya@users.noreply.github.com> Signed-off-by: Rishabh Tanwar <ritanwar@amazon.com>
…lfish-for-postgresql#845) The Github Actions for Python Framework and Upgrade Validation framework started Failing Due to new release of Pyodbc. There is a diff in expected output file due to this version Change More details about the issue can be found here - mkleehammer/pyodbc#1082 Task: BABEL-OSS Signed-off-by: Nirmit Shah <nirmisha@amazon.com>
Environment
Issue
With 4.0.34 we started building manylinux wheel files. Unfortunately, they include rather old versions of libodbc.so and libltdl.so that override the system versions, leading to errors as described in #1079 and #1081.
pyodbc 4.0.34
Note:
pyodbc 4.0.32
Note:
Action Needed
Build wheels without including those libraries.
Workarounds for the time being
Pin pyodbc at version 4.0.32, or
The text was updated successfully, but these errors were encountered: