Re: What generates pg_config.h?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Travis Allison <travisallison(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, floriparob(at)gmail(dot)com, pgsql-general(at)postgresql(dot)org, Christoph Berg <myon(at)debian(dot)org>
Subject: Re: What generates pg_config.h?
Date: 2018-01-05 23:40:06
Message-ID: 52b48b90-159a-0341-23e1-e88e52daa86d@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/05/2018 03:29 PM, Tom Lane wrote:
> Travis Allison <travisallison(at)gmail(dot)com> writes:
>> Tom, where's the -l switch exactly? What command is it attached to? (I'm
>> not sure what to look for.)
>
> Look into the extension's Makefile for something roughly along the lines
> of

Assuming the OP is talking about this:

https://github.com/timescale/timescaledb

I believe there is an intervening step:

# Bootstrap the build system
./bootstrap

If I am following correctly the -I are in:

CMakeLists.txt

# Get PostgreSQL configuration from pg_config
execute_process(
COMMAND ${PG_CONFIG} --includedir
OUTPUT_VARIABLE PG_INCLUDEDIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND ${PG_CONFIG} --includedir-server
OUTPUT_VARIABLE PG_INCLUDEDIR_SERVER
OUTPUT_STRIP_TRAILING_WHITESPACE)

There does seem to be an apt install:

http://docs.timescale.com/v0.8/getting-started/installation/linux/installation-apt

with the following caveats:
"
Note: PostgreSQL 9.6 is required for TimescaleDB on Ubuntu distros.
Releases with PostgreSQL 10 are coming soon
Prerequisites

Ubuntu 16.04 or later

Build & Install

WARNING:If you have another PostgreSQL installation not via apt,
this will likely cause problems. If you wish to maintain your current
version of PostgreSQL outside of apt, we recommend installing from
source. Otherwise please be sure to remove non-apt installations before
using this method.
"

>
> CPPFLAGS = -I/usr/include/postgresql
>
> Very likely there's some amount of macro-ization involved, so it might
> look more like
>
> INCLUDEDIR = /usr/include/postgresql
> ...
> CPPFLAGS = -I$(INCLUDEDIR)
>
> Furthermore, given our current theory, there's going to be more than
> one -I switch on that line, and you want to get rid of just one.
>
> regards, tom lane
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Scalia 2018-01-06 01:07:16 Re: Postgres HA
Previous Message Tom Lane 2018-01-05 23:29:51 Re: What generates pg_config.h?