Currently if /lib64/ld-linux-x86-64.so.2 is not set, then the program won't use embedded postgres: here. To fix this, I propose an environment variable EMBEDDED_POSTGRES_INTERPRETER_PATH. If this is set, then the hardcoded check is skipped, and the interpreter path is provided to the embedded postgres config. Additionally, EMBEDDED_POSTGRES_LD_LIBRARY_PATH env variable would be passed into the config as the LD_LIBRARY_PATH environment variable.
From a Nix packaging perspective, a wrapper can provide patchelf in the path, set the postgres interpreter environment variable to the correct path, and provide libstdc++.so.6 for the library path. These configurations would be hidden from the end user.
Side note, the error message should clarify that /lib64/ld-linux-x86-64.so.2 is required by embedded-postgres binaries, not "missing". This caused confusion for me as I had no idea what embedded-postgres was and thought it was just a hardcoded check without thought for platforms like nix.
Currently if
/lib64/ld-linux-x86-64.so.2
is not set, then the program won't use embedded postgres: here. To fix this, I propose an environment variableEMBEDDED_POSTGRES_INTERPRETER_PATH
. If this is set, then the hardcoded check is skipped, and the interpreter path is provided to the embedded postgres config. Additionally,EMBEDDED_POSTGRES_LD_LIBRARY_PATH
env variable would be passed into the config as theLD_LIBRARY_PATH
environment variable.Depends on: https://github.com/fergusstrange/embedded-postgres/pull/109
From a Nix packaging perspective, a wrapper can provide patchelf in the path, set the postgres interpreter environment variable to the correct path, and provide
libstdc++.so.6
for the library path. These configurations would be hidden from the end user.Side note, the error message should clarify that
/lib64/ld-linux-x86-64.so.2
is required by embedded-postgres binaries, not "missing". This caused confusion for me as I had no idea what embedded-postgres was and thought it was just a hardcoded check without thought for platforms like nix.