# python, freetds, undefined symbol libiconv_open



## hal8080 (May 5, 2011)

Hi,

I am trying to use python to connect to MS SQL server. I installed freetds (dev. 0.82) with unixODBC enabled. I also installed py-odbc from ports.

When I try


```
import pyodbc
conn = pyodbc.connect("DSN=mydsn;UID=user;PWD=pass")
```
I got error message saying,

```
"libexec/ld-elf.so.1: /usr/local/lib/libtdsodbc.so: Undefined symbol "libiconv_open"
```
Strange thing is that I can connect to MS SQL server if I use 
	
	



```
isql mydsn user pass
```
 It works perfectly.

Also, if I make freetds with "--disable-libiconv", it works.

I'm guessing that there is a problem with python and libiconv. Can anybody help me with this? I'm using FreeBSD 8.2R and python 2.71

Thank you for reading this.

Jeff


----------



## SirDice (May 6, 2011)

How did you install freetds? There is a port for it: databases/freetds.


----------



## hal8080 (May 6, 2011)

I installed it from the port. I tried databases/freetds but it didn't work (even with "isql") so I used databases/freetds-devel. I searched the web for this problem but I couldn't find the solution yet. Many of the examples on the web recommend to use --disable-libiconv but no bug report or solution. Is there any way to test if Python works with libiconv? Just wondering...


----------

