postgrest icon indicating copy to clipboard operation
postgrest copied to clipboard

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

Open develop7 opened this issue 1 year ago • 4 comments

Environment

  • PostgreSQL version: N/A
  • PostgREST version: 12.0.2
  • Operating system: Windows 10

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:
    • Download https://github.com/PostgREST/postgrest/releases/download/v12.0.2/postgrest-v12.0.2-windows-x64.zip, unpack it somewhere.
    • OR, having scoop installed, run scoop install 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

develop7 avatar Dec 26 '23 16:12 develop7

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

  • libcrypto-3-x64.dll
  • libiconv-2.dll
  • libintl-9.dll
  • libssl-3-x64.dll
  • libwinpthread-1.dll

..\PostgreSQL\15\lib

  • libpq.dll

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

locktarr avatar Apr 24 '24 14:04 locktarr

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

I thought scoop/chocolatey handled dependencies.

steve-chavez avatar Apr 24 '24 16:04 steve-chavez

Scoop package was definitely affected, probably is still.

develop7 avatar Apr 24 '24 16:04 develop7

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

steve-chavez avatar Apr 25 '24 18:04 steve-chavez