PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
22.92k stars 1.01k forks source link

Windows release 12.0.2 is linked against external DLLs, but doesn't bundle them or provide instructions on how to get them #3136

Open develop7 opened 7 months ago

develop7 commented 7 months ago

Environment

Description of issue

postgrest.exe --help should output help text to the console; instead it doesn't start complaining this or that DLL is missing (6 of them total)

Reproducing:

  1. Install Windows 10 to a VM, wait for the "App Installer" app to update (provides winget command),
  2. Install PostgreSQL (I've used winget install PostgreSQL.PostgreSQL)
  3. Deploy PostgREST:
  4. run postgrest.exe --help

Notes

I've copied required DLLs out of the pgAdmin bundled with PostgreSQL, so here's the listing of a directory with working PostgREST:

PS C:\Users\vboxuser\Downloads\postgrest-v12.0.2-windows-x64\artifacts\postgrest-windows-x64> ls

    Directory: C:\Users\vboxuser\Downloads\postgrest-v12.0.2-windows-x64\artifacts\postgrest-windows-x64

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           11/8/2023 12:36 PM        4566016 libcrypto-3-x64.dll
-a---           11/8/2023 12:36 PM        1851113 libiconv-2.dll
-a---           11/8/2023 12:36 PM         475769 libintl-9.dll
-a---           11/8/2023 12:22 PM         326144 libpq.dll
-a---           11/8/2023 12:36 PM         773120 libssl-3-x64.dll
-a---           11/8/2023 12:36 PM          52736 libwinpthread-1.dll
-a---          12/20/2023 11:46 PM       58726400 postgrest.exe
locktarr commented 3 months ago

Faced the same problem. The DLL files was found in the following paths: ..\PostgreSQL\15\bin

..\PostgreSQL\15\lib

Just copy this DLLs in folder with postgrest.exe and it works as intended. This need to be fixed for sure, but I hope this helps to use it right now

steve-chavez commented 3 months ago

Is it the same with chocolatey? https://community.chocolatey.org/packages/postgrest

I thought scoop/chocolatey handled dependencies.

develop7 commented 3 months ago

Scoop package was definitely affected, probably is still.

steve-chavez commented 3 months ago

Nix on Windows making progress! https://github.com/NixOS/nix/pull/8901. Maybe there's a future where we can get a static binary for Windows too.

cc @wolfgangwalther