Closed tomalrussell closed 6 years ago
The error message comes from https://github.com/postgres/postgres/blob/e3f99e03e2ec65e7ddb1f3056b545f2afa57b2d0/src/interfaces/libpq/fe-connect.c#L1161
It's a block within #ifndef USE_SSL
, which means your libpq was compiled without USE_SSL
.
It's not "your libpq" that's the culprit, it's libpq from mason installed by ./bootstrap.sh
.
You should be able to compile mapnik with just system packages, I'd start with
# add-apt-repository ppa:ubuntugis/ppa
# apt-get update
apt-get -s build-dep mapnik
to see what's missing, some may be optional.
rm mapnik-settings.env config.py #
, to clear stuff from bootstrap;
./configure #
, install what's missing, repeat until satisfied
Thanks for the quick responses - I'll have a go at installing with system packages and update with a :+1: or more questions.
Okay, compiling with system packages seems to work.
Here are my steps (script in details below):
npm install --build-from-source=mapnik
PGSSLMODE=require
environment variable setI learnt that node bundles openssl, and compiling node with ./configure --shared-openssl
fixed a segmentation fault that was being thrown (when running my test script with node index.js
) when I had just installed the linux binaries.
whereis libpq
to find libpqldd /usr/lib/x86_64-linux-gnu/libpq.so | grep ssl
to check libpq ssl versionnode -e 'console.log(process.versions.openssl)'
to check node ssl versionNote that this was for Ubuntu 18.04. Almost the same steps worked on Ubuntu 16.04, though the default boost libraries are only recent enough for mapnik v3.0.x, and libpq was happy with the version of openssl packaged in the node binaries (so compiling node wasn't necessary).
When trying to connect to Postgres with sslmode=require, I get:
Related to https://github.com/mapnik/node-mapnik/issues/755 and https://github.com/mapnik/mapnik/issues/2550, but I'm not on Heroku (so the pgbouncer fix doesn't seem to be relevant), and I'm working with Ubuntu 18.04 (so the mapnik nightly builds don't seem to be available).
My steps so far:
mapnik-config -v
and get3.0.20
make release_base
npm pack
> producesmapnik-3.7.3-svg1.tgz
path/to/mapnik-3.7.3-svg1.tgz
Is there anything obvious I'm missing, or more information that I can provide?