theory/pgenv

What package dependencies do I need to install to have uuid-ossp

Opened this issue · 3 comments

bolek commented

I keep running into this on new macbooks, went through all the issues here related to uuid and still cannot get it to work.

Recently it has been with Postgres 16.2.

Here is my config:

export LDFLAGS="-L/opt/homebrew/opt/libxml2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libxml2/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"

export PGENV_CONFIGURE_OPTIONS=(
  --with-uuid=e2fs
  --with-openssl
  'CMAKE_PREFIX_PATH=/opt/homebrew/opt/icu4c'
  'PKG_CONFIG_PATH=/opt/homebrew/opt/icu4c/lib/pkgconfig'

  'CFLAGS=-I/opt/homebrew/Cellar/openssl@3/3.2.1/include'
  'LDFLAGS=-L/opt/homebrew/Cellar/openssl@3/3.2.1/lib'
)

I am not seeing any errors, but the compiled postgres version does not come with ossp-uuid extension :(

Any ideas what I am doing wrong? Am I missing some dependencies? macos should be coming with libuuid and support e2fs.

Try moving those exports to PGENV_CONFIGURE_OPTIONS:

export PGENV_CONFIGURE_OPTIONS=(
  --with-uuid=e2fs
  --with-openssl
  'CMAKE_PREFIX_PATH=/opt/homebrew/opt/icu4c'
  'PKG_CONFIG_PATH=/opt/homebrew/opt/icu4c/lib/pkgconfig'

  'CFLAGS=-I/opt/homebrew/Cellar/openssl@3/3.2.1/include'
  'LDFLAGS=-L/opt/homebrew/Cellar/openssl@3/3.2.1/lib -L/opt/homebrew/opt/libxml2/lib'

  'CPPFLAGS="-I/opt/homebrew/opt/libxml2/include"'
  'PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c/lib/pkgconfig"'
)

Although I don't see that they specify where to find ossp-uuid. Note that you need to create that extension to use it:

CREATE EXTENSION "uuid-ossp";
bolek commented

Very much appreciate the quick response!

Will give that shot.

When I try to create the extension in postgres I get:

CREATE EXTENSION "uuid-ossp";

** (Postgrex.Error) ERROR 0A000 (feature_not_supported) extension "uuid-ossp" is not available

    hint: The extension must first be installed on the system where PostgreSQL is running.

Could not open extension control file "/Users/silvia/.pgenv/pgsql-16.2/share/extension/uuid-ossp.control": No such file or directory.

I am not seeing uuid-ossp amongst the installed extensions. Which led me that think that during the build postgres is not finding the libraries. Yet then I am not seeing anything in the logs related to uuid-ossp.

I am aware this is probably more of a postgres problem rather than pgenv.
Just thought that folks might have ran into this here.

historical related issues: #30

what is the output of the configuration step?