`make: *** No rule to make target '/contrib/contrib-global.mk'. Stop.`
I tried to clone the repo and run make and this is what I got.
As it turns out. This needs to be built within the PostgreSQL source tree. Yes! You need to clone the PostgreSQL SOURCE CODE, which sounds insane but this is what is actually expected. (I am using PostgreSQL 17.4 here)
cd
mkdir -p repos
cd repos
git clone --depth 1 --single-branch -b REL_17_4 https://github.com/postgres/postgres.git
cd postgres/contrib
git clone <this repository> pldebugger
cd ../..
./configure
cd contrib/pldebugger
make
make install
Running .config within the PostgreSQL source tree might require many packages to be installed:
sudo apt install build-essential pkg-config postgresql-server-dev-17 libicu-dev bison libbison-dev flex libfl-dev libreadline-dev
After that you will have the dynamic library plugin_debugger.so installed.
TODO: update build instructions in the README.md file
Seems this has been discussed before https://github.com/EnterpriseDB/pldebugger/issues/15
Also seems there is a better way to do this not requiring the PostgreSQL source which would have saved me a lot of time.
I am assigning this to myself, to make the documentation clearer when it comes to building and installing.