Problem building native extensions for pg 0.15.1

15 views
Skip to first unread message

Jack Royal-Gordon

unread,
Oct 5, 2020, 8:01:47 PM10/5/20
to ruby-pg
Migrating from Rails 4.1 - 4.2 (yeah, I know, it's old but I'm working my way up to supported versions), and 4.2 apparently requires pg 0.15.1 (was previously using 0.13.2). Trying to build the native extensions for 0.15.1 gives an error checking for the presence of "PQconnectionUsedPassword". So I updated my Postgres 9.2 installation, replacing it with a multi-version installation running 10.0. I verified that 10.0 has a declaration of "PQconnectionUsedPassword" in a header file (libpq-fe.h to be precise), but the native extensions build still dies with the same error. I'm looking at the Rakefile (which guides the procedure) and I see that in the test before the failing one, it is calling "have_library" for several libraries and referencing "libpq-fe.h" as the header file to use. But in the "have_func" call that is failing, there is no reference to a header file (honestly, I don't know if there should be one, as they are different calls with different parameter lists). So I'm trying to figure out if I need to somehow point the process at my 10.0 installation, and if so then how?

Jack Royal-Gordon

unread,
Oct 5, 2020, 8:39:41 PM10/5/20
to ruby-pg
Output from pg_config:

BINDIR = /Applications/Postgres.app/Contents/Versions/10/bin

DOCDIR = /Applications/Postgres.app/Contents/Versions/10/share/doc/postgresql

HTMLDIR = /Applications/Postgres.app/Contents/Versions/10/share/doc/postgresql

INCLUDEDIR = /Applications/Postgres.app/Contents/Versions/10/include

PKGINCLUDEDIR = /Applications/Postgres.app/Contents/Versions/10/include/postgresql

INCLUDEDIR-SERVER = /Applications/Postgres.app/Contents/Versions/10/include/postgresql/server

LIBDIR = /Applications/Postgres.app/Contents/Versions/10/lib

PKGLIBDIR = /Applications/Postgres.app/Contents/Versions/10/lib/postgresql

LOCALEDIR = /Applications/Postgres.app/Contents/Versions/10/share/locale

MANDIR = /Applications/Postgres.app/Contents/Versions/10/share/man

SHAREDIR = /Applications/Postgres.app/Contents/Versions/10/share/postgresql

SYSCONFDIR = /Applications/Postgres.app/Contents/Versions/10/etc/postgresql

PGXS = /Applications/Postgres.app/Contents/Versions/10/lib/postgresql/pgxs/src/makefiles/pgxs.mk

CONFIGURE = '--prefix=/Applications/Postgres.app/Contents/Versions/10' '--with-includes=/Applications/Postgres.app/Contents/Versions/10/include' '--with-libraries=/Applications/Postgres.app/Contents/Versions/10/lib' '--enable-thread-safety' '--with-openssl' '--with-gssapi' '--with-bonjour' '--with-libxml' '--with-libxslt' '--with-perl' '--with-python' '--with-readline' '--with-uuid=e2fs' '--with-icu' 'CFLAGS= -mmacosx-version-min=10.7' 'PKG_CONFIG_LIBDIR=/Applications/Postgres.app/Contents/Versions/10/lib/pkgconfig' 'ICU_CFLAGS=-I/Applications/Postgres.app/Contents/Versions/10/share/icu' 'ICU_LIBS=-licui18n -licuuc'

CC = gcc

CPPFLAGS = -I/Applications/Postgres.app/Contents/Versions/10/share/icu -I/Applications/Postgres.app/Contents/Versions/10/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/10/include

CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument  -mmacosx-version-min=10.7

CFLAGS_SL = 

LDFLAGS = -L/Applications/Postgres.app/Contents/Versions/10/lib -L/Applications/Postgres.app/Contents/Versions/10/lib -Wl,-dead_strip_dylibs

LDFLAGS_EX = 

LDFLAGS_SL = 

LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm 

VERSION = PostgreSQL 10.14



Reply all
Reply to author
Forward
0 new messages