Search code examples
rubytiny-tds

Unable to install tiny_tds on mac


I am trying to set up a new mac and have been unable to get tiny_tds to compile. I am running OSX Mojave (10.14.6) and have ruby 2.4.5 installed via asdf. When I try to bundle, installing tiny_tds fails and the logs show:

Undefined symbols for architecture x86_64:
  "_dbanydatecrack", referenced from:
      _t in conftest-f13825.o
ld: symbol(s) not found for architecture x86_64

I have searched for this and largely the only solutions I have found suggested are to brew install freetds which I've already done, and to try and run it with:

sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds

Which does not work either.

I'm open to any suggestions, I had tiny_tds installed fine on my last mac and I'm not sure what's different here. From my memory, all I've ever had to do was brew install freetds and then bundle.


Solution

  • So in the end, it turned out that the machine I received was not wiped clean from a previous user and all of my problems are due to there being another gcc as well as ancient tds libraries in /usr/local. Blowing away all that stuff has resolved my issues.