postgresql: enable uclibc build
PATCH 1/3 postgresql: enable uclibc build
Build with uclibc and locale support failes with the following error message:
regc_pg_locale.c: In function ?pg_wc_isdigit?:
regc_pg_locale.c:312:6: error: dereferencing pointer to incomplete type
isdigit_l((unsigned char) c, pg_regex_locale));
This can be fixed by overwriting the HAVE_LOCALE_T detection (thanks to Alex Potapenko <[email protected]> for the hint [1]).
[1] http://lists.busybox.net/pipermail/buildroot/2015-March/121088.html
---
Tested with the following buildroot defonfig:
BR2_arm=y
BR2_arm1176jzf_s=y
BR2_JLEVEL=1
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="246530ff8a4f302b8666c6d9cf509407d8c1257a" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi/linux-3.18-rpi-dt.defconfig" BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y
BR2_PACKAGE_POSTGRESQL=y
--- package/postgresql/Config.in | 7 ------- package/postgresql/postgresql.mk | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-)
package/postgresql/Config.in +0 -7
@@ -1,9 +1,5 @@ config BR2_PACKAGE_POSTGRESQL bool "postgresql" - # 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. - depends on BR2_TOOLCHAIN_USES_GLIBC help PostgreSQL is a powerful, open source object-relational database system.
@@ -16,6 +12,3 @@ config BR2_PACKAGE_POSTGRESQL archives with pg_dump and pg_restore. http://www.postgresql.org - -comment "postgresql needs a toolchain w/ glibc" - depends on !BR2_TOOLCHAIN_USES_GLIBC
package/postgresql/postgresql.mk +8 -0
@@ -13,6 +13,14 @@ POSTGRESQL_LICENSE_FILES = COPYRIGHT POSTGRESQL_INSTALL_STAGING = YES POSTGRESQL_CONFIG_SCRIPTS = pg_config +ifeq ($(BR2_TOOLCHAIN_USES_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 +POSTGRESQL_CONF_ENV += pgac_cv_type_locale_t=no +endif + ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) POSTGRESQL_CONF_OPTS += --disable-thread-safety endif
Signature · 1 line
2.1.4
PATCH 2/3 postgresql: fix IPv6 detection for uclibc compile
Assist configure IPv6 support detection for uclibc, fixes the following uclibc compile failure:
auth.c: In function ?CheckRADIUSAuth?:
auth.c:2379:24: error: ?in6addr_any? undeclared (first use in this function)
localaddr.sin6_addr = in6addr_any;
---
Tested with the following buildroot defonfig:
BR2_arm=y
BR2_arm1176jzf_s=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.18" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y BR2_TARGET_GENERIC_GETTY_PORT="tty1"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://github.com/raspberrypi/linux.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="246530ff8a4f302b8666c6d9cf509407d8c1257a" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/raspberrypi/linux-3.18-rpi-dt.defconfig" BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS=y
BR2_PACKAGE_POSTGRESQL=y
--- package/postgresql/postgresql.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/postgresql/postgresql.mk +6 -0
@@ -14,6 +14,12 @@ POSTGRESQL_INSTALL_STAGING = YES POSTGRESQL_CONFIG_SCRIPTS = pg_config ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# overwrite IPV6 detection +ifeq ($(BR2_INET_IPV6),y) +POSTGRESQL_CONF_ENV += ac_cv_type_struct_sockaddr_in6=yes +else +POSTGRESQL_CONF_ENV += ac_cv_type_struct_sockaddr_in6=no +endif # 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
Signature · 1 line
2.1.4
PATCH 3/3 postgresql: enable bfin compile
In reply to Peter Seiderer- overwrite platform support with linux template
- disable spinlock support
--- package/postgresql/postgresql.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
package/postgresql/postgresql.mk +6 -1
@@ -13,6 +13,11 @@ POSTGRESQL_LICENSE_FILES = COPYRIGHT POSTGRESQL_INSTALL_STAGING = YES POSTGRESQL_CONFIG_SCRIPTS = pg_config +# unsupported platform, overwrite manually +ifeq ($(BR2_bfin),y) +POSTGRESQL_CONF_OPTS += --with-template=linux +endif + ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) # overwrite IPV6 detection ifeq ($(BR2_INET_IPV6),y)
@@ -31,7 +36,7 @@ ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) POSTGRESQL_CONF_OPTS += --disable-thread-safety endif -ifeq ($(BR2_microblazeel)$(BR2_microblazebe)$(BR2_nios2),y) +ifeq ($(BR2_bfin)$(BR2_microblazebe)$(BR2_microblazeel)$(BR2_nios2),y) POSTGRESQL_CONF_OPTS += --disable-spinlocks endif
Signature · 1 line
2.1.4
PATCH 1/3 postgresql: enable uclibc build
In reply to Peter SeidererHi Peter,
package/postgresql/Config.in line 6
Quoted 11 lines · Peter Seiderer
package/postgresql/Config.in +0
-4@@ -1,9 +1,5 @@ config BR2_PACKAGE_POSTGRESQL bool "postgresql" - # 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. - depends on BR2_TOOLCHAIN_USES_GLIBC
Please also remove the BR2_TOOLCHAIN_USES_GLIBC dependency from packages selecting BR2_PACKAGE_POSTGRESQL.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -