Compiling PostgreSQL on FreeBSD: readline header not foundLong story short: when issueing a
configurein your PostgreSQL source tree you got:
checking for readline.h... no configure: error: readline header not found
readlinelibrary is installed on the system:
So what is going wrong? Simple: the
% pkg info readline readline-7.0.3_1 Name : readline Version : 7.0.3_1 Installed on : Thu May 31 13:39:23 2018 CEST ...
configurescript is not searching for in the correct include path, that on FreeBSD is
/usr/local/include. The problem can be easily fixed adding
configurecommand line, and in particular the following is the line I use to compile PostgreSQL (e.g., 11 beta 1):
% ./configure --prefix=/opt/pg11b1 --with-perl --with-python --with-openssl --with-libraries=/usr/local/lib --with-includes=/usr/local/include/
--with-includes=/usr/local/include/fixes the error on readline.