Dependencies
Use chocolatey for install dependencies for the postgres windows compilation. Use strawberry perl instead of the active state perl as it is easy to setup. Also for know we will prefer the pkgconflite from the choco which is the lighter version of pkg-config and also simple for the setup. The pkg-config which comes with strawberry-perl doesn’t work and get ignored.
Now install meson and ninja. If you have python install you can use the pip manager otherwise just use the msi installer for the windows. https://mesonbuild.com/Getting-meson.html#installing-meson-and-ninja-with-the-msi-installer
Now you need some additional dependencies if you wanna compile the postgres with some additional support like openssl, gsspapi etc. These dependencies is hrd to setup on perl but luckily Dave Page has organized a workflow for these dependencies build. You can just simply download the artifacts all-deps-win64
from the repo. https://github.com/dpage/winpgbuild/actions/
Compilation
Now open the visual studio native x64 developer command line. Set the variable for your installed dependencies first. And then use meson fro the compilation.
I just disabled the gssapi because there is a bug on postgres windows where gssapi and openssl cannot be compiled together. This will be fixed soon. For now just disable it.
If you got stuck some where and want to reconfigure the meson setup from scratch use —wipe
argument with the build dir as input.
For advance setup related to assigning specific compilers to the meson you can use the native ini
file. https://mesonbuild.com/Machine-files.html#
If you are stuck with some error like:
This mean meson cannot find the path to the specific compiler, use the native ini file in this case. Just create a ini file with a name of your choice and mention the path to the cl.exe
After that now just append the argument the the meson setup command
Installation
Now proceed towards the installation.
Now as we have installed postgres with some additional libraries like openssl. We need to bundle the dependencies to the final installation.
Cluster Init
Now Initialize the cluster and enjoy the postgres.
Комментарии