Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

build problems when multiple postgresql versions are installed #58

Open
anneb opened this issue Apr 20, 2021 · 2 comments
Open

build problems when multiple postgresql versions are installed #58

anneb opened this issue Apr 20, 2021 · 2 comments

Comments

@anneb
Copy link

anneb commented Apr 20, 2021

When multiple postgresql versions are installed, it seems you can only build for the newest version.
Did I overlook something obvious?

I found the following last/newest(?) installed postgresql version dependent settings:

files:
debian/rules:

  PGVERSION=`pg_buildext supported-versions $(CURDIR) | tail -l` || exit $$?;

Makefile:

  EXTDIR=$(shell pg_config --sharedir)

icutranslit/Makefile
pg_config is used twice (always linked to newest or last installed version?)

kanjitranscript/Makefile
pg_config is used twice

I was able to build for other versions as follows:
file debian/pgversions
replace 9.6+ by version number you wish to build for, example: 12

file Makefile:

PGVERSION=12
PG_CONFIG=/usr/lib/postgresql/$(PGVERSION)/bin/pg_config
EXTDIR=$(shell $(PG_CONFIG) --sharedir)

file icutranslit/Makefile

PGVERSION=12
PG_CONFIG=/usr/lib/postgresql/$(PGVERSION)/bin/pg_config
PGPATH=$(shell $(PG_CONFIG) --includedir-server)
...
install -D -m 644 osml10n_translit.so $(DESTDIR)$(shell $(PG_CONFIG) --pkglibdir)/osml10n_translit.so

file kanjitranscript/Makefile

PGVERSION=12
PG_CONFIG=/usr/lib/postgresql/$(PGVERSION)/bin/pg_config
PGPATH=$(shell $(PG_CONFIG) --includedir-server)
..
install -D -m 644 osml10n_kanjitranscript.so $(DESTDIR)$(shell $(PG_CONFIG) --pkglibdir)/osml10n_kanjitranscript.so

now I was able to override the postgres version number as follows:

  1. update the version number in debian/pgversions to XX
  2. make PGVERSION=XX deb
    where XX is the version number you want to build for.
@alexandervlpl
Copy link

Thanks @anneb , that actually works! There should really be a way to do this out of the box. Easy enough to add support for PGVERSION in the Makefiles, but any idea what to do with debian/pgversions?

@giggls
Copy link
Owner

giggls commented May 15, 2022

Just to make sure that this is known:
I am currently working at deprecating this approach altogether
see https://github.com/giggls/osml10n for details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants