ng-galien / idea-plpgdebugger

A plugin to debug PL/pg in Intellij
MIT License
49 stars 8 forks source link

Docker build on postgres:16 requires pkg-config and ICU libs #214

Closed Tommi2Day closed 7 months ago

Tommi2Day commented 7 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. try docker build with build-arg TAG=16
  2. See error

6 216.4 checking whether the C compiler still works... yes

6 216.5 checking how to run the C preprocessor... gcc -E

#6 216.5 checking for pkg-config... no

6 216.5 checking allow thread-safe client libraries... yes

6 216.5 checking whether to build with ICU support... yes

6 216.5 checking for icu-uc icu-i18n... no

#6 216.5 configure: error: ICU library not found

6 216.5 If you have ICU already installed, see config.log for details on the

6 216.5 failure. It is possible the compiler isn't looking in the proper directory.

6 216.5 Use --without-icu to disable ICU support.

6 ERROR: process "/bin/sh -c apt --yes update && apt --yes upgrade && apt --yes install git build-essential libreadline-dev zlib1g-dev bison libkrb5-dev flex $PG_LIB && cd /usr/src/ && git clone -b $PG_BRANCH --single-branch https://github.com/postgres/postgres.git && cd postgres && ./configure && cd /usr/src/postgres/contrib && git clone -b $PLUGIN_BRANCH --single-branch https://github.com/ng-galien/pldebugger.git && cd pldebugger && make clean && make USE_PGXS=1 && make USE_PGXS=1 install && rm -r /usr/src/postgres && apt --yes remove --purge git build-essential libreadline-dev zlib1g-dev bison libkrb5-dev flex $PG_LIB && apt --yes autoremove && apt --yes clean" did not complete successfully: exit code: 1

Expected behavior docker build runs without errors

possible solution Add pkg-config and libicu-dev to the apt install/purge commands in Dockerfile

ng-galien commented 7 months ago

Hi @Tommi2Day, did you check the Dockerfile in the extension repository? It builds several docker images, including pg16 last month.

https://github.com/ng-galien/pldebugger/tree/print-vars/docker

https://github.com/ng-galien/pldebugger/actions/runs/8400004388

Tommi2Day commented 7 months ago

Oh, i wasnt aware of it. Means the docker directory in this project will be dropped if released for IJ 2024.1?

in the mean time i created an enhanced version with more extensions here: https://github.com/Tommi2Day/postgresql-debugger

ng-galien commented 7 months ago

Yes, I will keep only one Dockerfile in the debugger repo. It will be great if my build can benefit from your enhancements.

Tommi2Day commented 7 months ago

OK, i will then close this issue as is not related anymore to this project.

You may take whatever you want from my project.(https://github.com/Tommi2Day/postgresql-debugger). I rewrote your docker to archive: