Re: What generates pg_config.h? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: What generates pg_config.h?
Date
Msg-id 52b48b90-159a-0341-23e1-e88e52daa86d@aklaver.com
Whole thread Raw
In response to Re: What generates pg_config.h?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: What generates pg_config.h?  (Travis Allison <travisallison@gmail.com>)
List pgsql-general
On 01/05/2018 03:29 PM, Tom Lane wrote:
> Travis Allison <travisallison@gmail.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.klaver@aklaver.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: What generates pg_config.h?
Next
From: Travis Allison
Date:
Subject: Re: What generates pg_config.h?