Compiling Postgres with UUID to use in asdf
Lately I started using asdf, which is a great version manager for nearly anything (ruby, elixir, node, postgres...) . At my work I sometimes have to switch between different postgres versions, so I was happy that there also is a postgres plugin for asdf. But as soon as I was working on a project that uses UUIDs as primary keys in postgres I ran into postgres not being build with the uuid extension.
ERROR: could not open extension control file "...some-asdf-path.../uuid-ossp.control": No such file or directory
Also apperantly on Mac systems, there is some trouble with ossp-uuid not being able to compile.
As I ran into some trouble trying to compile this, I just looked into the compile flags brew is using, since the default brew installation always seemed to work.
$ POSTGRES_EXTRA_CONFIGURE_OPTIONS="--enable-dtrace --with-bonjour --with-gssapi --with-ldap --with-libxml --with-libxslt --with-uuid=e2fs --with-pam --with-perl --with-python --with-tcl" asdf install postgres 9.6.1
Hope that anyone running into similar trouble finds this to be of some use.