Make it possible to link to unixODBC on darwin

Leo Liu <[email protected]> Mon, 20 Apr 2015 15:06:58 +0800
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
Hi there,

I thought Erlang is linked to unixODBC on my mac since `brew info
erlang' prints:

  erlang: stable 17.5 (bottled), HEAD
  http://www.erlang.org
  /usr/local/Cellar/erlang/17.5 (7398 files, 283M) *
    Poured from bottle
  From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/erlang.rb
  ==> Dependencies
  Build: autoconf ✔, automake ✔, libtool ✔
  Required: openssl ✔, unixodbc ✔

Took me about 20 minutes to install mysql and mysql-connector-odbc,
configure and connect to mysql using odbc (via isql). but the Erlang
odbc app keeps failing:

        {error,"[iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded SQLSTATE IS: IM002 Connection to database failed."}

So now I am investigating this iodbc and discovered erlang actually
linked to /usr/lib/libiodbc.2.dylib which seems to be an awfully
outdated lib that apple no longer maintains. Besides that file I have no
idea what else are provided to work with iODBC.

I think it makes a lot of sense to allow compiling erlang with another
ODBC lib (unixODBC takes about 1.7 seconds to install on the mac).

Thanks,
Leo

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs