public inbox for [email protected]  
help / color / mirror / Atom feed
From: Mikael Sand <[email protected]>
To: [email protected]
Subject: Re: Annoying build warnings from latest Apple toolchain
Date: Thu, 10 Oct 2024 19:54:13 +0200
Message-ID: <CAAwAxZd-6gPE054S-3920GGAg-AFCwK+GJ+3C-UZdmUYNKS4cg@mail.gmail.com> (raw)

Good day!

I'm encountering a build issue with postgresql 17, I wonder if this was an
intentional consequence of this commit:
https://github.com/postgres/postgres/commit/b6c7cfac88c47a9194d76f3d074129da3c46545a

Or if this was unintentional. Or is there any way to compile pgcommon with
the correct function names statically into libpq?

https://www.postgresql.org/message-id/CAAwAxZf456NwLKD4ZBpyDmPc5GFmGP%3Db5Vw7pTMY0v9R-%3D%2BDTA%40ma...

This works with 16.4 but fails with 17.0:

FROM postgres:16.4-alpine3.20 AS builder
USER root
WORKDIR /app
RUN apk update && apk add --no-cache --update-cache \
    openssl-libs-static \
    libevent-static \
    libxml2-static \
    libedit-static \
    libxslt-static \
    sqlite-static \
    openldap-dev \
    libxslt-dev \
    libxml2-dev \
    libedit-dev \
    openssl-dev \
    zstd-static \
    zlib-static \
    lz4-static \
    e2fsprogs \
    keyutils \
    zstd-dev \
    zlib-dev \
    gdbm-dev \
    clang17 \
    lz4-dev \
    libldap \
    bison \
    curl \
    perl \
    make

COPY <<EOF ./main.cpp
#include<libpq-fe.h>
int main(){return PQconnectdb("")==NULL;}
EOF

ARG KRB5=1.21.3
ARG KRB5MAJMIN=1.21
RUN curl -L https://kerberos.org/dist/krb5/$KRB5MAJMIN/krb5-$KRB5.tar.gz
| tar xzf -
RUN cd krb5-$KRB5/src && \
    ./configure && make && make install && \
    ./configure --disable-shared --enable-static && make && make install

ARG SASL=2.1.28
RUN curl -L https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-$SASL/cyrus-sasl-$SASL.tar.gz
| tar xzf -
RUN cd cyrus-sasl-$SASL && ./configure --enable-static && make && make install

RUN clang++ -static -o main main.cpp \
    -L/usr/local/lib -lpq -lpgcommon -lpgport \
    -lldap -lsasl2 -lssl -lcrypto -llber \
    -lgssapi_krb5 \
    -lkrb5 -lk5crypto -lcom_err -lkrb5support \
    -lgdbm


Best regards
Mikael Sand


view thread (2+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Annoying build warnings from latest Apple toolchain
  In-Reply-To: <CAAwAxZd-6gPE054S-3920GGAg-AFCwK+GJ+3C-UZdmUYNKS4cg@mail.gmail.com>

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

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