The project was failing because the Postgresql installation was missing server header files, which are necessary to compile MADlib. I've sent a PR to your `check_madlib` repo that adds `apt-get` installation of the server headers. 

Unfortunately, CMake gave a pretty poor error message for those missing files. I've created a JIRA asking to give a better message. 

On Thu, Feb 9, 2017 at 11:41 AM, Frank McQuillan <> wrote:
Thanks for the suggestion Nikolay.

I created a new JIRA to support standard Linux and OSX package managers

This looks like a great community project for folk(s) who work with package management on a regular basis, if someone would like to pick it up.

We will still look at 
to address the initial issue from this thread.


On Thu, Feb 9, 2017 at 4:23 AM, Nikolay Samokhvalov <> wrote:
Thank you Rahul,

but I insist that this issue is more general than a lack of ability to install via some manual play with cmake options . 

On one the most popular server Linux platforms, Ubuntu (in that case it was 12.04 LTS), the latest Postgres version (9.6.1) installed from official package is not detected by MADlib. I would be awesome if anyone could install MADlib with "apt-get install .." only OR with "make && sudo make install", w/o option puzzles...

Otherwize, this issue might significantly minimize possible audience of the project.

I would love to help somehow, but I didn't work with cmake.

On Wed, Feb 8, 2017 at 5:15 PM, Rahul Iyer <> wrote:
The way cmake has been setup, it decides which version to compile for using that variable (if defined). If the variable is not defined, it locates pg_config and deduces version from it. 
We could add a default PG_CONFIG variable that links to the latest supported version. Created a JIRA for this.  

On Wed, Feb 8, 2017 at 3:10 PM, Jim Nasby <> wrote:
On 2/8/17 10:18 AM, Rahul Iyer wrote:
add `-DPOSTGRESQL_9_6_PG_CONFIG=/path/to/pg_config' with the `cmake ...`

Does that variable need to include the version number? Couldn't it just be called PG_CONFIG ?
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble!
855-TREBLE2 (855-873-2532)