The osql command uses host to resolve hostnames. Reproducible: Always gentoo ~ # osql -S Server -U User -P TestPassword checking shared odbc libraries linked to isql for default directories... strings: '': No such file trying /tmp ... no trying /sql ... no trying /tmp ... no trying /sql ... no trying /etc ... no trying /uni ... no trying /tmp/sql.log ... no trying /home ... no trying /.odbc.ini ... no trying /etc/unixODBC ... OK checking odbc.ini files reading /root/.odbc.ini [Server] found in /root/.odbc.ini found this section: [Server] Driver = FreeTDS Server = 10.0.0.1 TDS_Version = 7.2 Port = 1433 Database = Example looking for driver for DSN [Server] in /root/.odbc.ini found driver line: " Driver = FreeTDS" driver "FreeTDS" found for [Server] in .odbc.ini found driver named "FreeTDS" "FreeTDS" is not an executable file looking for entry named [FreeTDS] in /etc/unixODBC/odbcinst.ini found driver line: " Driver = /usr/lib/libtdsodbc.so" found driver /usr/lib/libtdsodbc.so for [FreeTDS] in odbcinst.ini /usr/lib/libtdsodbc.so is an executable file "Server" found, not using freetds.conf Server is "10.0.0.1" looking up hostname for ip address 10.0.0.1 /usr/bin/osql: line 339: host: command not found osql: warning: no DNS hostname found for "10.0.0.1" /usr/bin/osql: line 348: host: command not found osql: no IP address found for "" gentoo ~ # host bash: host: command not found
Thanks for the report! I've fixed this. commit 687155c48b374959c4be6171ed1807ee72924612 Author: Michael Orlitzky <mjo@gentoo.org> Date: Sat Jul 30 23:08:24 2016 -0400 dev-db/freetds: new version 1.00.13. This new version fixes some bugs and adds a few new features. At some point, the upstream project added support for compiling with -Werror=format-security, so that takes care of our bug 521270. The ebuild now has support for GnuTLS, OpenSSL/LibreSSL (bug 490554), and iconv. These were all present upstream, but missing from the ebuild until now. It also adds a runtime dependency on bind-tools, which is used by the "osql" script (bug 487176). Gentoo-Bug: 487176 Gentoo-Bug: 490554 Gentoo-Bug: 521270 Package-Manager: portage-2.2.28 dev-db/freetds/Manifest | 1 + dev-db/freetds/freetds-1.00.13.ebuild | 73 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+)