From: | Mikael Sand <msand(at)seaber(dot)io> |
---|---|
To: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding' |
Date: | 2024-10-10 10:56:17 |
Message-ID: | CAAwAxZeEEEANSKTna2xo85f7xG9UqzK+UX3AC9xxRuqwMJ5f7g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
E.g. this fails to compile:
FROM chainguard/git:latest-dev AS builder
USER root
RUN apk update && apk add --no-cache --update-cache clang-19
postgresql-17-dev openssl-dev
COPY <<EOF ./main.cpp
#include<libpq-fe.h>
int main(){return PQconnectdb("")==NULL;}
EOF
RUN clang++ -static -o main main.cpp -lpq -lpgcommon -lpgport -lssl -lcrypto
On Thu, Oct 10, 2024 at 12:16 PM Aleksander Alekseev <
aleksander(at)timescale(dot)com> wrote:
> Hi Mikael,
>
> Please use the "Reply to All" button - send your emails to the mailing
> list, not to me directly.
>
> > The official packages and the original source tar both fail to compile,
> the patch enables it to compile.
>
> I just run:
>
> ```
> docker run -e POSTGRES_PASSWORD=foo postgres:17.0-alpine3.20
> ```
>
> ... on my spare Raspberry Pi and it works just fine. Also PostgreSQL
> is tested on Alpine [1].
>
> It means that your custom Dockerfile is wrong. I suggest comparing it
> with the one published on hub.docker.com [2]. Also I would recommend
> reading the documentation section about compiling PostgreSQL from
> source code [3]. I have a few scripts [4] that may help you correct
> the Dockerfile as well [4].
>
> All this of course assumes that you really want your custom Dockerfile
> instead of using "official" / well regarded 17.0-alpine3.20 one.
>
> [1]: https://buildfarm.postgresql.org/cgi-bin/show_status.pl
> [2]:
> https://github.com/docker-library/postgres/blob/172544062d1031004b241e917f5f3f9dfebc0df5/17/alpine3.20/Dockerfile
> [3]: https://www.postgresql.org/docs/current/installation.html
> [4]: https://github.com/afiskon/pgscripts/
>
> --
> Best regards,
> Aleksander Alekseev
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ebru Aydin Gol | 2024-10-10 11:20:14 | Re: RFC: Additional Directory for Extensions |
Previous Message | Mikael Sand | 2024-10-10 10:31:36 | Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding' |