Menu

#175 Compiling with PostgreSQL Driver fails due to syntax error when checking PostgreSQL version

GIT
open
nobody
None
5
2020-08-21
2020-08-21
No

Compiling with the PostgreSQL Driver doesn't work. It fails due to a syntax error when checking PostgreSQL version.

I guess the output of the version command changed syntax.

With an Ubuntu 20.04 based image:

checking for PostgreSQL client version >= 8.1.0... expr: syntax error: unexpected argument '(Ubuntu'
expr: syntax error: unexpected argument '(Ubuntu'
expr: syntax error: unexpected argument '(Ubuntu'
expr: syntax error: unexpected argument '1000000'
expr: syntax error: unexpected argument '8001000'
no
configure: error: Required version of libpq not found

This is in an Ubuntu 20.04 based Docker container.

If I switch to one based on 18.04:

checking for PostgreSQL client version >= 8.1.0... expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
no
configure: error: Required version of libpq not found

If I drop all the way down to a container based on Ubuntu 16.04, compilation succeeds.

My Dockerfile:

FROM ubuntu:20.04
MAINTAINER David Reagan <david@reagannetworks.com>

# Install needed PostgreSQL libraries.
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
         build-essential \
         autoconf automake libtool \
         postgresql-server-dev-all \
    && rm -rf /var/lib/apt/lists/*
COPY src /opt/src
WORKDIR /opt/src
RUN chmod +x autogen.sh \
    && ./autogen.sh
RUN ./configure \
      --enable-domain-scale \
      --with-storage-driver=pgsql_drv \
      --with-pgsql-libraries=/usr/lib/postgresql \
      --with-pgsql-includes=/usr/include/postgresql \
      --enable-virtual-users \
      --enable-debug

My c/c++ experience is from a few basic college courses, from around 8 - 10 years ago....

Anyone have any idea where you could adjust the version check?

Discussion


Log in to post a comment.