pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nordström Thomas <thomas.nordstrom1@saabgroup.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Issues with compiling libpq 9.1.2 with Visual C++
Date: Tue, 18 Sep 2018 10:01:27 -0400
Message-ID: <11609.1537279287@sss.pgh.pa.us> (raw)
In-Reply-To: <e50405d5e33c48ac85929d78b0ac2fd0@CORPAPPL840.corp.saab.se>
References: <e50405d5e33c48ac85929d78b0ac2fd0@CORPAPPL840.corp.saab.se>

=?iso-8859-1?Q?Nordstr=F6m_Thomas?= <thomas.nordstrom1@saabgroup.com> writes:
> Toolset: vc141 (Visual Studio 2017)
> I'm having trouble compiling version 9.1.2 of libpq with Visual C++.

That's going to be ... exciting.  I don't think we promise to support
VS2017 even yet; the latest VS patches I can remember seeing were for
VS2015.  And 9.1.2 came out in 2011, so there wasn't support for
anything newer than VS2008 at the time.

> The reason that I want this particular version is because it's the one included with GDAL version 2.1.3 from GISinternals.com. To be specific, I pulled commit cfd8cf37d20be715e4bb9e382844c79556516824 from GitHub.

I would not take that as a good reason to use an ancient version of libpq.
AFAIK we haven't broken backwards compatibility in libpq, so current
versions ought to work just fine with the GDAL version you want to use.

> What I'm doing is running a powershell script with the following command (of course, I've already run the batch-file included with Visual Studio which sets all the relevant PATH environment variables needed to compile with Visual C++):
> nmake /f "win32.mak" DEBUG=1 USE_SSL=1 SSL_INC="$opensslDir\include" SSL_LIB_PATH="$opensslDir\x86\Debug\lib\"

The recommended way to build PG under VS is to use the project files we
supply.  That will wind up building the whole server not just libpq,
but it'll still take less time than you've already wasted fighting
this tooling version skew.

What I'd try doing is building a PG release that claims to support
VS2015 (9.6 or later), using the recommended process:
https://www.postgresql.org/docs/current/static/install-windows.html
Or you could just grab a prebuilt version from our download pages.
Then point GDAL at the libpq library from that.

			regards, tom lane




view thread (2+ messages)

Message-ID: <11609.1537279287@sss.pgh.pa.us>
Permalink:  ../11609.1537279287@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11609.1537279287@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.nordstrom1@saabgroup.com
  Subject: Re: Issues with compiling libpq 9.1.2 with Visual C++
  In-Reply-To: <11609.1537279287@sss.pgh.pa.us>
  References: <e50405d5e33c48ac85929d78b0ac2fd0@CORPAPPL840.corp.saab.se> <11609.1537279287@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox