Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew, FreeTDS, tiny_tds. Why can't I install tiny_tds after successfully installing FreeTDS?

This issue led me to this question.

I expected that to solve my issue, a couple of the answers there detail some config params that can help with the installation. The paths weren't quite right for me so I modified them and ended up with this:

gem install tiny_tds -- --with-freetds-include=/usr/local/Cellar/freetds/0.95.21/include   
    --with-freetds-lib=/usr/local/Cellar/freetds/0.95.21/lib
    --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include
    --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib

However, running that has resulted in the same error I was getting earlier. As follows:

Console error

I previously installed libiconv and FreeTDS using brew.

Has anyone encountered and solved this issue on OS X El Capitan?

If you'd like any more information please just ask.

like image 502
gdgr Avatar asked Sep 27 '22 05:09

gdgr


1 Answers

Hallelujah!

After trying absolutely everything I could think of, including reading the mkmf.log file and a plethora of different installation parameters, I've arrived at a solution that worked for me.

In the end, the solution was relatively straight-forward, though difficult to figure out. The issue was that it was trying to build with the wrong architecture in mind (32-bit). Using the flag ARCHFLAGS to explicitly specify 64-bit, the installation worked immediately, as follows:

sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds

I hope somebody finds this useful--I didn't find anything anywhere saying this was a solution.

like image 51
gdgr Avatar answered Sep 30 '22 08:09

gdgr