Unable to use custom drivers with pyodbc
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
Start by inspecting the packaged libodbc.so.2 and the unixODBC configuration paths reported by odbcinst -j. Compare those paths with Lambda's writable locations and verify that custom odbc.ini and odbcinst.ini files can discover a driver without relying on /etc or unavailable system libraries.
Written by the indexing model from the issue text.
Description
the libodbc.so.2 from #73 appears to be using unixODBC's defaults which means odbcinst -j produces
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
but since /etc/ isn't modifiable in Lambda, we're stuck with the default MySQL and PostgreSQL drivers. If I wanted to add another driver, I'm out of luck.
After recompiling unixODBC with ./configure --prefix=/var/task/unixODBC, I was able to:
vi /var/task/unixODBC/etc/odbc.ini
vi /var/task/unixODBC/etc/odbcinst.ini
ln -s /var/task/unixODBC/lib/libodbc.so.2.0.0 /var/task/libodbc.so.2
and everything seems to be in order.
I'm a little confused how this package ever worked though, given that with the default configuration:
# Driver from the postgresql-odbc package
# Setup from the unixODBC package
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1
# Driver from the mysql-connector-odbc package
# Setup from the unixODBC package
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1
none of these files exist in Lambda and neither /usr/lib/ /usr/lib64/ are writable.
@FlipperPA, can you provide any insight here? I'd like to pinpoint what's going on before I submit a PR addressing the issue.
- Dominant language
- Shell
- Stars
- 728
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Miserlou/lambda-packages
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Miserlou/lambda-packages#116 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Miserlou/lambda-packages#115 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Miserlou/lambda-packages#114 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Miserlou/lambda-packages#111 · 1 comment · 8 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Miserlou/lambda-packages#110 ·
All issues in Miserlou/lambda-packages
Similar issues
-
align on terminology Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
CycloneDX/transparency-exchange-api#393 · 1 comment ·
-
module/agent platform/macos type/bug/regression
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
CachyOS/cachyos-aur-derived#754 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
CrowdStrike/falcon-scripts#528 ·
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100