My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 68: compilation fails in ubuntu
1 person starred this issue and may be notified of changes. Back to list
Status:  Investigating
Owner:  ----


 
Reported by steger.j...@gmail.com, Aug 26, 2009
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
Are you sure Ubuntu doesn't ship with unixODBC also?

I might have to use a dynamic search or something to find them...

Thanks for the patch.  I'm concerned this would break other distros though.  I'll do 
some testing and research.
Status: Investigating
Sep 8, 2009
#2 steger.j...@gmail.com
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
Project Member #3 mkleehammer
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
#4 chris...@gmail.com
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. 

Powered by Google Project Hosting