From 736ecae2096f84587eac2bc669b548c86702efac Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Fri, 21 Aug 2015 09:20:05 +0200 Subject: [PATCH 1/3] postgresql: add missing librt dependency fixes build error with uclibc Signed-off-by: Dirk Neukirchen --- libs/postgresql/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index 33cb010ab..dd4b28ef6 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -42,7 +42,7 @@ endef define Package/pgsql-cli SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+libpq + DEPENDS:=+libpq @USE_UCLIBC:+librt TITLE:=Command Line Interface (CLI) to PostgreSQL databases URL:=http://www.postgresql.org/ SUBMENU:=database @@ -55,7 +55,7 @@ endef define Package/pgsql-server SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+libpq + DEPENDS:=+libpq @USE_UCLIBC:+librt TITLE:=PostgreSQL databases Server URL:=http://www.postgresql.org/ SUBMENU:=database From b19dc5496efba9ef61bfd2874dc36278222b1b06 Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Fri, 21 Aug 2015 09:53:39 +0200 Subject: [PATCH 2/3] postgresql: fix uclibc locale.h bug reported in forum: https://forum.openwrt.org/viewtopic.php?id=59137 issue was discovered and fixed already in buildroot git commit id: f5e4ca10220e2325d3a34c0a423388e40b27dbdf Signed-off-by: Dirk Neukirchen --- libs/postgresql/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index dd4b28ef6..ebec6cad0 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -66,9 +66,21 @@ define Package/pgsql-server/description PostgreSQL databases Server. endef +ifeq ($(CONFIG_USE_UCLIBC),y) +# PostgreSQL does not build against uClibc with locales +# enabled, due to an uClibc bug, see +# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html +# so overwrite automatic detection and disable locale support +PGSQL_CONFIG_VARS+= \ + pgac_cv_type_locale_t=no +endif + +TARGET_CONFIGURE_OPTS+=$(PGSQL_CONFIG_VARS) + # Need a native ecpg ,pg_config, and zic for build define Build/Configure (cd $(PKG_BUILD_DIR); rm -f config.cache; \ + $(PGSQL_CONFIG_VARS) \ ./configure \ --prefix=/usr \ --exec-prefix=/usr \ From bf119cb33bfe732aecf08ff03d41e5bbc7e63b58 Mon Sep 17 00:00:00 2001 From: Dirk Neukirchen Date: Fri, 21 Aug 2015 09:59:27 +0200 Subject: [PATCH 3/3] postgresql: fix potential snprintf issue adopt buildroot commit: 3d3f70b567718ae308b5704ddd7d107c4849309e spotted while reviewing buildroot changes to postgresql Signed-off-by: Dirk Neukirchen --- libs/postgresql/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index ebec6cad0..5ab9a582e 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -66,6 +66,10 @@ define Package/pgsql-server/description PostgreSQL databases Server. endef +PGSQL_CONFIG_VARS:= \ + pgac_cv_snprintf_long_long_int_format="%lld" \ + pgac_cv_snprintf_size_t_support=yes + ifeq ($(CONFIG_USE_UCLIBC),y) # PostgreSQL does not build against uClibc with locales # enabled, due to an uClibc bug, see