Skip to content

Instantly share code, notes, and snippets.

@ejlp12
Last active November 19, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ejlp12/74cdcde11ca01188cbf7 to your computer and use it in GitHub Desktop.
Save ejlp12/74cdcde11ca01188cbf7 to your computer and use it in GitHub Desktop.

unixODBC is a ODBC implementation for non MS Windows platforms

unixODBC Installation

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:~
| => brew install unixodbc
==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.2_1.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring unixodbc-2.3.2_1.yosemite.bottle.1.tar.gz
🍺  /usr/local/Cellar/unixodbc/2.3.2_1: 31 files, 1.0M

FreeTDS Installation (Optional)

FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases.

Technically speaking, FreeTDS is an open source implementation of the TDS (Tabular Data Stream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and three APIs to access it.

FreeTDS has many possible uses. It has been used by Unix/Linux webservers to present data stored in SQL Server to the web, to port SQL Server database code from NT to Unix, to import data into SQL Server from a Unix source, and to provide database access on platforms (such as realtime systems) that have no native drivers.

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:~
| => brew install freetds --with-unixodbc
==> Installing dependencies for freetds: pkg-config, openssl
==> Installing freetds dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.28.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.28.yosemite.bottle.2.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.28: 10 files, 612K
==> Installing freetds dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2d_1.yosemite.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
🍺  /usr/local/Cellar/openssl/1.0.2d_1: 464 files, 18M
==> Installing freetds
==> Downloading ftp://ftp.freetds.org/pub/freetds/stable/freetds-0.95.19.tar.gz

curl: (6) Could not resolve host: ftp.freetds.org
Trying a mirror...
==> Downloading https://fossies.org/linux/privat/freetds-0.95.19.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/freetds/0.95.19 --with-tdsver=7.1 --mandir=/usr/local/Cellar/freetds/0.95.19/share/man --with-openssl=/usr/local/opt/openssl --with-unixodbc=/usr/local/opt/unixodbc
==> make
==> make install
🍺  /usr/local/Cellar/freetds/0.95.19: 2820 files, 28M, built in 102 seconds

Install PostgreSQL ODBC Driver

Check http://www.postgresql.org/ftp/odbc/versions/src/ Download https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-09.03.0400.tar.gz

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK
| => tar zxvf psqlodbc-09.03.0400.tar.gz
x psqlodbc-09.03.0400/
x psqlodbc-09.03.0400/config/
x psqlodbc-09.03.0400/docs/
[...]

You need to have PostgreSQL installed in your maching, since psqlodbc will need some library from PostgreSQL installation. Find the library required:

ejlp-macbook:~ root# locate libpq-fe.h
/Library/PostgreSQL/9.4/include/libpq-fe.h

ejlp-macbook:~ root# locate pg_config
/Library/PostgreSQL/9.4/bin/pg_config
/Library/PostgreSQL/9.4/include/ecpg_config.h
/Library/PostgreSQL/9.4/include/pg_config.h
/Library/PostgreSQL/9.4/include/pg_config_ext.h
/Library/PostgreSQL/9.4/include/pg_config_i386.h
/Library/PostgreSQL/9.4/include/pg_config_manual.h
/Library/PostgreSQL/9.4/include/pg_config_os.h
/Library/PostgreSQL/9.4/include/pg_config_x86_64.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config_ext.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config_i386.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config_manual.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config_os.h
/Library/PostgreSQL/9.4/include/postgresql/server/pg_config_x86_64.h
/Library/PostgreSQL/9.4/share/man/man1/pg_config.1

From root user start install psqlodbc

ejlp-macbook:~ root# env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Library/PostgreSQL/9.4/bin/pg_config
Building native extensions with: '--with-pg-config=/Library/PostgreSQL/9.4/bin/pg_config'
This could take a while...
Successfully installed pg-0.18.3
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.18.3
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/pg-0.18.3/pg_ext.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/pg_ext.bundle, skipping
Installing ri documentation for pg-0.18.3
1 gem installed

Run command ./configure with specified libpq directory location (--with-libpq)

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => ./configure --with-libpq=/Library/PostgreSQL/9.4
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking -Wall is a valid compile option... yes
checking for odbc_config... /usr/local/bin/odbc_config
configure: using /usr/local/Cellar/unixodbc/2.3.2_1/include /usr/local/Cellar/unixodbc/2.3.2_1/lib
checking for pg_config... /Library/PostgreSQL/9.4/bin/pg_config
checking build system type... i686-apple-darwin14.3.0
checking host system type... i686-apple-darwin14.3.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-apple-darwin14.3.0 file names to i686-apple-darwin14.3.0 format... func_convert_file_noop
checking how to convert i686-apple-darwin14.3.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin14.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for library containing SQLGetPrivateProfileString... -lodbcinst
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking for PQconnectdb in -lpq... yes
checking for SSL_read in -lssl... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking size of long... 0
checking size of void *... 0
checking for long long... yes
checking for signed char... yes
checking for ssize_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct addrinfo... yes
checking for an ANSI C-conforming const... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strtoul... yes
checking for strtoll... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for poll... yes
checking for iswascii... yes
checking for localtime_r... yes
checking for strtok_r... yes
checking for pthread_mutexattr_settype... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Run make command, I got error running as following:

odbcapi.c:1154:6: error: unknown type name 'SQLROWSETSIZE'
                                 SQLROWSETSIZE *pcrow,
                                 ^
1 error generated.
make[1]: *** [odbcapi.lo] Error 1
make: *** [all] Error 2

Trying to figure it out but I got no luck. Then I try to reinstall PostgreSQL using brew I started bystopping the existing PostgreSQL(that installed not using brew)

ejlp-macbook:bin root# su - postgres
ejlp-macbook:~ postgres$ cd /Library/PostgreSQL/9.4/bin/
ejlp-macbook:bin postgres$ ./pg_ctl -D /Library/PostgreSQL/9.4/data/ stop
waiting for server to shut down.... done
server stopped
ejlp-macbook:bin postgres$ exit
logout
ejlp-macbook:bin root# exit
logout

Install PostgreSQL database using brew:

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => brew install postgres
==> Installing dependencies for postgresql: readline
==> Installing postgresql dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-6.3.8.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺  /usr/local/Cellar/readline/6.3.8: 40 files, 2.1M
==> Installing postgresql
==> Downloading https://homebrew.bintray.com/bottles/postgresql-9.4.5.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring postgresql-9.4.5.yosemite.bottle.tar.gz
==> /usr/local/Cellar/postgresql/9.4.5/bin/initdb /usr/local/var/postgres
==> Caveats
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
you may need to remove the previous version first. See:
  https://github.com/Homebrew/homebrew/issues/2510

To migrate existing data from a previous major version (pre-9.4) of PostgreSQL, see:
  https://www.postgresql.org/docs/9.4/static/upgrading.html

To have launchd start postgresql at login:
  ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Or, if you don't want/need launchctl, you can just run:
  postgres -D /usr/local/var/postgres
==> Summary
🍺  /usr/local/Cellar/postgresql/9.4.5: 3021 files, 40M

Go to ODBC source again and run ./configure, make then make install .. I'am lucky now. It successfully installed without any error

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Library/PostgreSQL/9.4/bin
| => cd /Servers/POC_PAJAK/psqlodbc-09.03.0400
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking -Wall is a valid compile option... yes
checking for odbc_config... /usr/local/bin/odbc_config
configure: using /usr/local/Cellar/unixodbc/2.3.2_1/include /usr/local/Cellar/unixodbc/2.3.2_1/lib
checking for pg_config... /usr/local/bin/pg_config
checking build system type... i686-apple-darwin14.3.0
checking host system type... i686-apple-darwin14.3.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-apple-darwin14.3.0 file names to i686-apple-darwin14.3.0 format... func_convert_file_noop
checking how to convert i686-apple-darwin14.3.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin14.3.0 dyld
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for library containing SQLGetPrivateProfileString... -lodbcinst
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lpthread... yes
checking for PQconnectdb in -lpq... yes
checking for SSL_read in -lssl... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking size of long... 8
checking size of void *... 8
checking for long long... yes
checking for signed char... yes
checking for ssize_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct addrinfo... yes
checking for an ANSI C-conforming const... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strtoul... yes
checking for strtoll... yes
checking for strlcat... yes
checking for strlcpy... yes
checking for poll... yes
checking for iswascii... yes
checking for localtime_r... yes
checking for strtok_r... yes
checking for pthread_mutexattr_settype... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => make
/Library/Developer/CommandLineTools/usr/bin/make  all-am
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT info.lo -MD -MP -MF .deps/info.Tpo -c -o info.lo info.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT info.lo -MD -MP -MF .deps/info.Tpo -c info.c  -fno-common -DPIC -o .libs/info.o
mv -f .deps/info.Tpo .deps/info.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT bind.lo -MD -MP -MF .deps/bind.Tpo -c -o bind.lo bind.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT bind.lo -MD -MP -MF .deps/bind.Tpo -c bind.c  -fno-common -DPIC -o .libs/bind.o
mv -f .deps/bind.Tpo .deps/bind.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT columninfo.lo -MD -MP -MF .deps/columninfo.Tpo -c -o columninfo.lo columninfo.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT columninfo.lo -MD -MP -MF .deps/columninfo.Tpo -c columninfo.c  -fno-common -DPIC -o .libs/columninfo.o
mv -f .deps/columninfo.Tpo .deps/columninfo.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT connection.lo -MD -MP -MF .deps/connection.Tpo -c -o connection.lo connection.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT connection.lo -MD -MP -MF .deps/connection.Tpo -c connection.c  -fno-common -DPIC -o .libs/connection.o
mv -f .deps/connection.Tpo .deps/connection.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT convert.lo -MD -MP -MF .deps/convert.Tpo -c -o convert.lo convert.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT convert.lo -MD -MP -MF .deps/convert.Tpo -c convert.c  -fno-common -DPIC -o .libs/convert.o
convert.c:889:25: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
                                                rgbValueBindRow = '\0';
                                                                  ^~~~
1 warning generated.
mv -f .deps/convert.Tpo .deps/convert.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT drvconn.lo -MD -MP -MF .deps/drvconn.Tpo -c -o drvconn.lo drvconn.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT drvconn.lo -MD -MP -MF .deps/drvconn.Tpo -c drvconn.c  -fno-common -DPIC -o .libs/drvconn.o
mv -f .deps/drvconn.Tpo .deps/drvconn.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT environ.lo -MD -MP -MF .deps/environ.Tpo -c -o environ.lo environ.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT environ.lo -MD -MP -MF .deps/environ.Tpo -c environ.c  -fno-common -DPIC -o .libs/environ.o
mv -f .deps/environ.Tpo .deps/environ.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT execute.lo -MD -MP -MF .deps/execute.Tpo -c -o execute.lo execute.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT execute.lo -MD -MP -MF .deps/execute.Tpo -c execute.c  -fno-common -DPIC -o .libs/execute.o
mv -f .deps/execute.Tpo .deps/execute.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT lobj.lo -MD -MP -MF .deps/lobj.Tpo -c -o lobj.lo lobj.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT lobj.lo -MD -MP -MF .deps/lobj.Tpo -c lobj.c  -fno-common -DPIC -o .libs/lobj.o
mv -f .deps/lobj.Tpo .deps/lobj.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT md5.lo -MD -MP -MF .deps/md5.Tpo -c -o md5.lo md5.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT md5.lo -MD -MP -MF .deps/md5.Tpo -c md5.c  -fno-common -DPIC -o .libs/md5.o
mv -f .deps/md5.Tpo .deps/md5.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c -o misc.lo misc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT misc.lo -MD -MP -MF .deps/misc.Tpo -c misc.c  -fno-common -DPIC -o .libs/misc.o
mv -f .deps/misc.Tpo .deps/misc.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT options.lo -MD -MP -MF .deps/options.Tpo -c -o options.lo options.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT options.lo -MD -MP -MF .deps/options.Tpo -c options.c  -fno-common -DPIC -o .libs/options.o
mv -f .deps/options.Tpo .deps/options.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT pgtypes.lo -MD -MP -MF .deps/pgtypes.Tpo -c -o pgtypes.lo pgtypes.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT pgtypes.lo -MD -MP -MF .deps/pgtypes.Tpo -c pgtypes.c  -fno-common -DPIC -o .libs/pgtypes.o
mv -f .deps/pgtypes.Tpo .deps/pgtypes.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT psqlodbc.lo -MD -MP -MF .deps/psqlodbc.Tpo -c -o psqlodbc.lo psqlodbc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT psqlodbc.lo -MD -MP -MF .deps/psqlodbc.Tpo -c psqlodbc.c  -fno-common -DPIC -o .libs/psqlodbc.o
mv -f .deps/psqlodbc.Tpo .deps/psqlodbc.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT qresult.lo -MD -MP -MF .deps/qresult.Tpo -c -o qresult.lo qresult.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT qresult.lo -MD -MP -MF .deps/qresult.Tpo -c qresult.c  -fno-common -DPIC -o .libs/qresult.o
mv -f .deps/qresult.Tpo .deps/qresult.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT results.lo -MD -MP -MF .deps/results.Tpo -c -o results.lo results.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT results.lo -MD -MP -MF .deps/results.Tpo -c results.c  -fno-common -DPIC -o .libs/results.o
mv -f .deps/results.Tpo .deps/results.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT socket.lo -MD -MP -MF .deps/socket.Tpo -c -o socket.lo socket.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c  -fno-common -DPIC -o .libs/socket.o
socket.c:706:6: warning: 'SSL_read' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        n = SSL_read(sock->ssl, buffer, len);
            ^
/usr/include/openssl/ssl.h:1509:6: note: 'SSL_read' has been explicitly marked deprecated here
int     SSL_read(SSL *ssl,void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
socket.c:707:8: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        err = SSL_get_error(sock->ssl, len);
              ^
/usr/include/openssl/ssl.h:1517:5: note: 'SSL_get_error' has been explicitly marked deprecated here
int     SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
socket.c:750:6: warning: 'SSL_write' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        n = SSL_write(sock->ssl, buffer, len);
            ^
/usr/include/openssl/ssl.h:1511:6: note: 'SSL_write' has been explicitly marked deprecated here
int     SSL_write(SSL *ssl,const void *buf,int num) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
socket.c:751:8: warning: 'SSL_get_error' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        err = SSL_get_error(sock->ssl, len);
              ^
/usr/include/openssl/ssl.h:1517:5: note: 'SSL_get_error' has been explicitly marked deprecated here
int     SSL_get_error(const SSL *s,int ret_code) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
        ^
4 warnings generated.
mv -f .deps/socket.Tpo .deps/socket.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT parse.lo -MD -MP -MF .deps/parse.Tpo -c -o parse.lo parse.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT parse.lo -MD -MP -MF .deps/parse.Tpo -c parse.c  -fno-common -DPIC -o .libs/parse.o
mv -f .deps/parse.Tpo .deps/parse.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT statement.lo -MD -MP -MF .deps/statement.Tpo -c -o statement.lo statement.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT statement.lo -MD -MP -MF .deps/statement.Tpo -c statement.c  -fno-common -DPIC -o .libs/statement.o
mv -f .deps/statement.Tpo .deps/statement.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT tuple.lo -MD -MP -MF .deps/tuple.Tpo -c -o tuple.lo tuple.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT tuple.lo -MD -MP -MF .deps/tuple.Tpo -c tuple.c  -fno-common -DPIC -o .libs/tuple.o
mv -f .deps/tuple.Tpo .deps/tuple.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT dlg_specific.lo -MD -MP -MF .deps/dlg_specific.Tpo -c -o dlg_specific.lo dlg_specific.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT dlg_specific.lo -MD -MP -MF .deps/dlg_specific.Tpo -c dlg_specific.c  -fno-common -DPIC -o .libs/dlg_specific.o
mv -f .deps/dlg_specific.Tpo .deps/dlg_specific.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT loadlib.lo -MD -MP -MF .deps/loadlib.Tpo -c -o loadlib.lo loadlib.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT loadlib.lo -MD -MP -MF .deps/loadlib.Tpo -c loadlib.c  -fno-common -DPIC -o .libs/loadlib.o
loadlib.c:105:6: warning: unused variable 'libpqlib' [-Wunused-const-variable]
CSTR    libpqlib = "libpq";
        ^
loadlib.c:109:6: warning: unused variable 'gssapilib' [-Wunused-const-variable]
CSTR    gssapilib = "gssapi32";
        ^
loadlib.c:112:6: warning: unused variable 'checkproc1' [-Wunused-const-variable]
CSTR    checkproc1 = "PQconnectdbParams";
        ^
loadlib.c:114:6: warning: unused variable 'checkproc2' [-Wunused-const-variable]
CSTR    checkproc2 = "PQconninfoParse";
        ^
4 warnings generated.
mv -f .deps/loadlib.Tpo .deps/loadlib.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT multibyte.lo -MD -MP -MF .deps/multibyte.Tpo -c -o multibyte.lo multibyte.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT multibyte.lo -MD -MP -MF .deps/multibyte.Tpo -c multibyte.c  -fno-common -DPIC -o .libs/multibyte.o
mv -f .deps/multibyte.Tpo .deps/multibyte.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT odbcapi.lo -MD -MP -MF .deps/odbcapi.Tpo -c -o odbcapi.lo odbcapi.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT odbcapi.lo -MD -MP -MF .deps/odbcapi.Tpo -c odbcapi.c  -fno-common -DPIC -o .libs/odbcapi.o
mv -f .deps/odbcapi.Tpo .deps/odbcapi.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT descriptor.lo -MD -MP -MF .deps/descriptor.Tpo -c -o descriptor.lo descriptor.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT descriptor.lo -MD -MP -MF .deps/descriptor.Tpo -c descriptor.c  -fno-common -DPIC -o .libs/descriptor.o
mv -f .deps/descriptor.Tpo .deps/descriptor.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT odbcapi30.lo -MD -MP -MF .deps/odbcapi30.Tpo -c -o odbcapi30.lo odbcapi30.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT odbcapi30.lo -MD -MP -MF .deps/odbcapi30.Tpo -c odbcapi30.c  -fno-common -DPIC -o .libs/odbcapi30.o
mv -f .deps/odbcapi30.Tpo .deps/odbcapi30.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT pgapi30.lo -MD -MP -MF .deps/pgapi30.Tpo -c -o pgapi30.lo pgapi30.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT pgapi30.lo -MD -MP -MF .deps/pgapi30.Tpo -c pgapi30.c  -fno-common -DPIC -o .libs/pgapi30.o
mv -f .deps/pgapi30.Tpo .deps/pgapi30.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT info30.lo -MD -MP -MF .deps/info30.Tpo -c -o info30.lo info30.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT info30.lo -MD -MP -MF .deps/info30.Tpo -c info30.c  -fno-common -DPIC -o .libs/info30.o
mv -f .deps/info30.Tpo .deps/info30.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT mylog.lo -MD -MP -MF .deps/mylog.Tpo -c -o mylog.lo mylog.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT mylog.lo -MD -MP -MF .deps/mylog.Tpo -c mylog.c  -fno-common -DPIC -o .libs/mylog.o
mylog.c:289:28: warning: format specifies type 'unsigned long' but the argument has type 'pthread_t' (aka 'struct _opaque_pthread_t *') [-Wformat]
                fprintf(MLOGFP, "[%lu]", pthread_self());
                                  ~~~    ^~~~~~~~~~~~~~
mylog.c:331:28: warning: format specifies type 'unsigned long' but the argument has type 'pthread_t' (aka 'struct _opaque_pthread_t *') [-Wformat]
                fprintf(MLOGFP, "[%lu]", pthread_self());
                                  ~~~    ^~~~~~~~~~~~~~
2 warnings generated.
mv -f .deps/mylog.Tpo .deps/mylog.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT odbcapi30w.lo -MD -MP -MF .deps/odbcapi30w.Tpo -c -o odbcapi30w.lo odbcapi30w.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT odbcapi30w.lo -MD -MP -MF .deps/odbcapi30w.Tpo -c odbcapi30w.c  -fno-common -DPIC -o .libs/odbcapi30w.o
mv -f .deps/odbcapi30w.Tpo .deps/odbcapi30w.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT odbcapiw.lo -MD -MP -MF .deps/odbcapiw.Tpo -c -o odbcapiw.lo odbcapiw.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT odbcapiw.lo -MD -MP -MF .deps/odbcapiw.Tpo -c odbcapiw.c  -fno-common -DPIC -o .libs/odbcapiw.o
mv -f .deps/odbcapiw.Tpo .deps/odbcapiw.Plo
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include  -g -O2 -Wall -MT win_unicode.lo -MD -MP -MF .deps/win_unicode.Tpo -c -o win_unicode.lo win_unicode.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/local/Cellar/unixodbc/2.3.2_1/include -I/usr/local/Cellar/postgresql/9.4.5/include -g -O2 -Wall -MT win_unicode.lo -MD -MP -MF .deps/win_unicode.Tpo -c win_unicode.c  -fno-common -DPIC -o .libs/win_unicode.o
mv -f .deps/win_unicode.Tpo .deps/win_unicode.Plo
/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -module -no-undefined -avoid-version -L/usr/local/Cellar/unixodbc/2.3.2_1/lib -L/usr/local/Cellar/postgresql/9.4.5/lib -o psqlodbcw.la -rpath /usr/local/lib info.lo bind.lo columninfo.lo connection.lo convert.lo drvconn.lo environ.lo execute.lo lobj.lo md5.lo misc.lo options.lo pgtypes.lo psqlodbc.lo qresult.lo results.lo socket.lo parse.lo statement.lo tuple.lo dlg_specific.lo loadlib.lo multibyte.lo odbcapi.lo descriptor.lo odbcapi30.lo pgapi30.lo info30.lo mylog.lo odbcapi30w.lo odbcapiw.lo win_unicode.lo  -lssl -lpq -lpthread -lodbcinst
libtool: link: gcc  -o .libs/psqlodbcw.so -bundle  .libs/info.o .libs/bind.o .libs/columninfo.o .libs/connection.o .libs/convert.o .libs/drvconn.o .libs/environ.o .libs/execute.o .libs/lobj.o .libs/md5.o .libs/misc.o .libs/options.o .libs/pgtypes.o .libs/psqlodbc.o .libs/qresult.o .libs/results.o .libs/socket.o .libs/parse.o .libs/statement.o .libs/tuple.o .libs/dlg_specific.o .libs/loadlib.o .libs/multibyte.o .libs/odbcapi.o .libs/descriptor.o .libs/odbcapi30.o .libs/pgapi30.o .libs/info30.o .libs/mylog.o .libs/odbcapi30w.o .libs/odbcapiw.o .libs/win_unicode.o   -L/usr/local/Cellar/unixodbc/2.3.2_1/lib -L/usr/local/Cellar/postgresql/9.4.5/lib -lssl -lpq -lpthread -lodbcinst  -O2
libtool: link: ( cd ".libs" && rm -f "psqlodbcw.la" && ln -s "../psqlodbcw.la" "psqlodbcw.la" )
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => make install
test -z "/usr/local/lib" || config/install-sh -c -d "/usr/local/lib"
 /bin/sh ./libtool   --mode=install /usr/bin/install -c  'psqlodbcw.la' '/usr/local/lib/psqlodbcw.la'
libtool: install: /usr/bin/install -c .libs/psqlodbcw.so /usr/local/lib/psqlodbcw.so
libtool: install: /usr/bin/install -c .libs/psqlodbcw.lai /usr/local/lib/psqlodbcw.la
make[1]: Nothing to be done for `install-data-am'.

Start PostgreSQL database

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => postgres -D /usr/local/var/postgres &
[1] 47652

Create database user

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => createuser -P -s -e -d postgres
Enter password for new role:
Enter it again:
CREATE ROLE postgres PASSWORD 'md53175bce1d3201d16594cebf9d7eb3f9d' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;

Configure odbc.ini file and odbcinst.ini

________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => vi ~/.odbc.ini
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
[PostgreSQL Unicode]
| => vi /usr/local/etc/odbcinst.ini
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => isql -v postgresdb
[S1000][unixODBC]The database does not exist on the server
or user authentication failed.
[ISQL]ERROR: Could not SQLConnect

Working after changing the protocol version in ~/.odbc.ini to 6.4 or 7.4+

[ejlp12db]
Driver      = PostgreSQL Unicode
ServerName  = localhost
Port        = 5432
Database    = ejlp12db
Username    = postgres
Password    = postgres
Protocol    = 7.4+
Debug       = 1
________________________________________________________________________________
| ejlp12 @ ejlp-macbook:/Servers/POC_PAJAK/psqlodbc-09.03.0400
| => isql -v ejlp12db
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select * from test
+-----------------------------------------------------------------------------------------------------+
| name                                                                                                |
+-----------------------------------------------------------------------------------------------------+
| hello                                                                                               |
+-----------------------------------------------------------------------------------------------------+
SQLRowCount returns 1
1 rows fetched
SQL> quit
Protocol: Note that when using SSL connections this setting is ignored.
 
* 6.2: Forces driver to use PostgreSQL 6.2(V0) protocol, which had different byte ordering, protocol, and other semantics.
* 6.3: Use the 6.3(V1) protocol. This is compatible with both V1(6.3) and V2(6.4 to 7.3) backends.
* 6.4+: Use the 6.4(V2) protocol. This is only compatible with 6.4 and higher backends.
* 7.4+: Use the 7.4(V3) protocol. This is only compatible with 7.4 and higher backends.

See this link psqlODBC Configuration Options

Reference

http://www.boriel.com/en/2013/01/16/postgresql-odbc-connection-from-mac-os-x/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment