I'm trying to compile Erlang on FreeBSD, and I want to include the odbc licenses.
On Ubuntu, if you add the unixodbc-dev package, that ensures that odbc gets compiled with Erlang, however, I can't find a package that works equivalently with FreeBSD.
I've tried installing the unixODBC package, and the libodbc++ with libiodbc packages. Neither of these work.
I've also tried download unixodbc from unixodbc.org and installing that, to no avail.
So if there's a package I can use, or if there's something I should download from source and compile, I've so far been unsuccessful in finding the solution.
Any ideas on what packages need to be installed or what steps need to be taken to ensure ODBC gets compiled with Erlang?
Note: this is with FreeBSD 9.1-Release, and Erlang R16B02
From looking at the package file list,
unixODBC
should be the correct package.Look inside
lib/odbc/config.log
from where you compiled Erlang. Mine says (on Debian):The "standard locations" are
/usr/local/odbc /usr/local /usr/odbc /usr /opt/local/pgm/odbc /usr/local/pgm/odbc
, and the configure script looks forinclude/sql.h
below one of those directories. If yours is installed in a different directory, try specifying--with-odbc=/some/path
to the configure script.Erlang can use unixODBC or libiodbc.
It should work when you install Erlang from ports. First, make sure your ports tree is up to date, e.g. with
portsnap
.Login or
su
to root. Then go to/usr/ports/lang/erlang
, and runmake config
. You should then see the following screen:Select either the IOBDC or the UNIXODBC option. Then run the command
make install clean
as root. That should build and install Erlang and all its dependencies.Edit: if you don't want to use ports, make sure you have either
databases/unixODBC
ordatabases/libiodbc
installed before compiling erlang, and then use the--with-odbc
option with erlang'sconfigure
, it should work fine. That is what the port does.