Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syxMs-003HW1-HY for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Oct 2024 17:54:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1syxMr-004WMu-P4 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Oct 2024 17:54:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1syxMr-004WMe-9D for pgsql-hackers@lists.postgresql.org; Thu, 10 Oct 2024 17:54:29 +0000 Received: from mail-yb1-xb32.google.com ([2607:f8b0:4864:20::b32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1syxMn-000Enn-M9 for pgsql-hackers@lists.postgresql.org; Thu, 10 Oct 2024 17:54:28 +0000 Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-e02c4983bfaso1294379276.2 for ; Thu, 10 Oct 2024 10:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seaber.io; s=google; t=1728582865; x=1729187665; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=aIlDSr9XqP727wWIxvjRIVqa8W2/X99m/7dOb23AZJE=; b=pwlAhNajiFD/xvzSixCGpjDxL2V4Ei6AzJQMU2zDvkPFUW2RQ+iul+ein/OeTOqopp P2AlTw3U0xfJx1+HcPvCkcmPv/2hNtPyyfQUiAnARqjF18L8D8q171o7H0Yup9FcJefl xSce82AX74ocTLqHQYbSMJWEEpXq7JQt3SbdPKqCkPRm/zv7asIWszslgob9PFb7ORb4 /P/ZABvnmvYBFUjHj/vfsWdqLBqZVVW2rLeUkqqyJC0/tmbzN4+dgv64EsnYV9gXDO1T DHgFbvbCT080m3cD4sSUOJQiiWzt3lfilW1wn8U3pCjsJ2KOe1MwTuW5KZz+55zPNULT ErZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728582865; x=1729187665; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aIlDSr9XqP727wWIxvjRIVqa8W2/X99m/7dOb23AZJE=; b=FLpdVQbsQA6PIzJyCoQU6/mKuzp6fJJ5R5z1Gwqyn2E4pR7+dRuQDy+5ZKZOqA/PHq CJTvg2d1cLQEgJDZhiEt6YD5pOGu+wKHD7LFszjS1ZKaWLVKDx0V+vMuThm9o7CZU7E+ 2T/HdCPXRCkzhCupSBmZXE531oXdW14lJEwxWTfWgbxKBZSPW6iiD7VDkil1eZZrVpzL fNFxLQLWHPToPrgACkORqIrb1bVM5w9FqIADE6PK+vt548gXtASFeul1k2nJICo6Ke9r 2epVZinhy3swecTTvvnaPO7c9B8ookX3IKCkwns75ViH44nAo3is9kfmUcCqv18l1DqR i9pA== X-Gm-Message-State: AOJu0Yw75GatxD/CdHqeMopSqN05m6LcNE76DAszioI5Pt2ofWfUIwKW nQ9ecDfgZ1J0Ks/rkelJP85ZmHpLMoeSHIJtSCYT4g8wG4RSJKl02PbgzD75aCHkcAKUr7RW2PH nOFg4AQHd5pbXp2ZEaY7Drds9kJTJWxY3ECEuedaGd5WTdG86n5xqXA== X-Google-Smtp-Source: AGHT+IG7qKvABFdriBmsyXtVXcr1a1wdJ1cc3LsHHfYSaVGqs32KYrTS3oenFpoL3hGQPPk6+RSecKFpG3viN8kjeA4= X-Received: by 2002:a25:d64e:0:b0:e29:9ca:bb41 with SMTP id 3f1490d57ef6-e2916a187dfmr416724276.37.1728582864572; Thu, 10 Oct 2024 10:54:24 -0700 (PDT) MIME-Version: 1.0 From: Mikael Sand Date: Thu, 10 Oct 2024 19:54:13 +0200 Message-ID: Subject: Re: Annoying build warnings from latest Apple toolchain To: pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009badd20624230f48" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009badd20624230f48 Content-Type: text/plain; charset="UTF-8" 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%40mail.gmail.com 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 < 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 --0000000000009badd20624230f48 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Good day!

I'm encountering a build = issue with postgresql 17, I wonder if this was an intentional consequence o= f this commit:=C2=A0https://github.com/postgres/postg= res/commit/b6c7cfac88c47a9194d76f3d074129da3c46545a

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

https://www.postgresql.org/message-id/CAAwAxZf456NwLKD4= ZBpyDmPc5GFmGP%3Db5Vw7pTMY0v9R-%3D%2BDTA%40mail.gmail.com

This works with 16.4 but fails with 17.0:

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

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

ARG KRB5=3D1.21.3
ARG KRB5MAJMIN=3D1= .21
RUN curl -L https://kerberos.org/d= ist/krb5/$KRB5MAJMIN/krb5-$KRB5.tar.gz | tar xzf -
RUN cd krb5-$KRB5/= src && \
<= span style=3D"color:rgb(0,115,191)">./configure
&& make= && make install && \
./co= nfigure --disable-shared = --enable-static && = make && make install

ARG SASL=3D2.1.28
RUN curl -L https:<= span style=3D"color:rgb(0,51,179)">//g= ithub.com/cyrusimap/cyrus-sasl/releases/download<= span style=3D"color:rgb(0,51,179)">/cyrus-sasl-$SASL/cyrus-sasl-$SASL.tar.gz | tar xzf -
RUN cd c= yrus-sasl-$SASL && ./configure = --enable-static && make && make install

RUN clang++ -static -o main main.= cpp \
-L/usr/l= ocal/lib -lpq -lpgcom= mon -lpgport \
-lldap -lsasl2 -lssl -lcrypto -llber \
-lgssa= pi_krb5 \
-lkrb5 -lk5crypto -lcom_err -lkrb5su= pport \
-lgdbm
<= /div>

Best regards
Mikael Sand
--0000000000009badd20624230f48--