| Issue 68: | compilation fails in ubuntu | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hello,
I have iodbc library on my system instead of odbc, which makes pyodbc.so
linkage failat the end of compilation.
What steps will reproduce the problem?
1. git clone git://github.com/mkleehammer/pyodbc.git
2. python setup.py build
The following patch helps in my case please consider:
steger@kisagy:/tmp/pyodbc$ git diff
diff --git a/setup.py b/setup.py
index 4a96a0e..caf806f 100755
--- a/setup.py
+++ b/setup.py
@@ -47,8 +47,8 @@ def main():
# OS name not windows, but still on Windows
libraries.append('odbc32')
- elif sys.platform == 'darwin':
- # OS/X now ships with iODBC.
+ elif sys.platform == 'darwin' or sys.platform == 'linux2':
+ # OS/X and Ubuntu now ships with iODBC.
libraries.append('iodbc')
else:
Bests,
Józsi
Sep 5, 2009
Project Member
#1
mkleehammer
Status:
Investigating
Sep 8, 2009
Unfortunately this is not an Ubuntu specific issue. I checked and saw that in Debian Lenny both libiodbc2-dev and unixodbc-dev are installable from distribution packages (they conflict each other of course). And in either case the sys.platform has 'linux2' value...
Dec 31, 2009
Am still not sure this is a good idea. Can you check out the comments on the Building page? https://code.google.com/p/pyodbc/wiki/Building There are a couple that discuss building on Ubuntu.
Dec 15, 2010
Building should allow you to specify which on the command line. UnixODBC is usually the default, but iodbc is very common. Maybe even have UnixODBC as default and try iodbc on failure. |