So I'm trying to build Erlang/OTP 18.3 on OS X 10.9 Mavericks, and seem to be running into a problem where odbc libraries/headers aren't being found.
The first time I tried running configure
I got the message:
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
odbc : ODBC library - header check failed
I went looking for any information I could find about ODBC libraries on OS X, and found an earlier question/answer which noted "Since OS X 10.9 (Mavericks) Apple stopped including the iODBC SQL header files", suggesting that might be the key issue.
So I grabbed libiodbc from iodbc.org, built the OS X version, and tried again:
odbc : ODBC library - header check failed
Hmmm. OK, apparently building for OS X drops the libraries/headers into /Library/Frameworks by default. Maybe the configuration process for OTP doesn't know to look there? So I tried building libiodbc again, this time with --prefix=/usr/local. And:
odbc : ODBC library - header check failed
I can verify that /usr/local/include contains iodbcext.h, iodbcunix.h, isqlext.h, sql.h, sqltypes.h, iodbcinst.h, isql.h, isqltypes.h, odbcinst.h, sqlext.h, sqlucode.h, so it definitely seems like the headers should be discoverable.
I looked around for any earlier discussion on the erlang-questions mailing list about odbc and builds, and found an old message which suggests there was a time when the configuration process didn't recognize iodbc searches on OS X... but quick check of lib/odbc/configure.in under the erlang source director seems to show a patch suggested in that message was folded in and this should no longer be an issue.
What am I missing? Is there another way to tell configure where it should be looking for libiodbc? Something else needed?
Failing that -- can I debug/alter the configuration process in some way?
Edit
At the suggestion of @legoscia, I peeked inside lib/odbc/config.log
. There's a lot in there, so I'll link the full file rather than posting it, but there are two errors that seem relevant:
conftest.c:29:10: fatal error: 'sql.h' file not found
...
conftest.c:29:10: fatal error: 'sqlext.h' file not found
This is odd, because as I said earlier, I can verify that /usr/local/include contains these files. I'm using --with-odbc=/usr/local
. And later in config.log, under the Output Variables
header, it also specifies it knows ODBC_INCLUDE='-I/usr/local/include'
. It seems to know where to look, and the files are in that location, but something doesn't see them.