Skip to contentSkip to conversation

postgresql: avoid AC_TRY_RUN when testing snprintf()

PATCH New Baruch Siach 3 participants 5 messages May 12, 2015 – May 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 postgresql: avoid AC_TRY_RUN when testing snprintf()

A few snprintf() compatibility tests in config/c-library.m4 use AC_TRY_RUN that doesn't work for cross compilation. As a result configure.in decides to build a bundled implementation of snprintf(). This implementation calls isnan(), but -lm is missing. This breaks link with libpq.so. Preseed the correct values to make the configure script happy, and fix rsyslog build.

Fixes:
http://autobuild.buildroot.net/results/e76/e769982e3131581b38698c109c9bc5215e3d5b11/
http://autobuild.buildroot.net/results/2b9/2b9d3edc8341675455bc3b74d1e84c8c0c24c521/
http://autobuild.buildroot.net/results/2a8/2a80357237ed7225823a008b5ff02bab01269814/

and many more.

---
 package/postgresql/postgresql.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/postgresql/postgresql.mk +3 -1
index 1a6aa880286f..eda547c18023 100644
@@ -11,7 +11,9 @@ POSTGRESQL_LICENSE = PostgreSQL
 POSTGRESQL_LICENSE_FILES = COPYRIGHT
 POSTGRESQL_INSTALL_STAGING = YES
 POSTGRESQL_CONFIG_SCRIPTS = pg_config
-POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes
+POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes \
+		      pgac_cv_snprintf_long_long_int_format="%lld" \
+		      pgac_cv_snprintf_size_t_support=yes
 POSTGRESQL_AUTORECONF = YES
 
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 2/2 rsyslog: drop autoreconf

The patches touching configure.ac were dropped in 9d9bbf9b7935 (rsyslog: bump to version 8.8.0, 2015-02-25). Remove autoreconf as well.

---
 package/rsyslog/rsyslog.mk | 2 --
 1 file changed, 2 deletions(-)
package/rsyslog/rsyslog.mk +0 -2
index 99e6eba38dc5..261f59dd35c9 100644
@@ -16,8 +16,6 @@ RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \
 	pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare
 RSYSLOG_CONF_OPTS = --disable-generate-man-pages \
 	$(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x))
-# For mysql and pgsql support patches
-RSYSLOG_AUTORECONF = YES
 
 # Build after BusyBox
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 rsyslog: drop autoreconf

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The patches touching configure.ac were dropped in 9d9bbf9b7935 (rsyslog: bump to version 8.8.0, 2015-02-25). Remove autoreconf as well.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/2 postgresql: avoid AC_TRY_RUN when testing snprintf()

In reply to Baruch Siach
Quoted 6 lines · Baruch Siach

A few snprintf() compatibility tests in config/c-library.m4 use AC_TRY_RUN that doesn't work for cross compilation. As a result configure.in decides to build a bundled implementation of snprintf(). This implementation calls isnan(), but -lm is missing. This breaks link with libpq.so. Preseed the correct values to make the configure script happy, and fix rsyslog build.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/e76/e769982e3131581b38698c109c9bc5215e3d5b11/
http://autobuild.buildroot.net/results/2b9/2b9d3edc8341675455bc3b74d1e84c8c0c24c521/
http://autobuild.buildroot.net/results/2a8/2a80357237ed7225823a008b5ff02bab01269814/

and many more.

by build testing with make rsyslog reproducing the first listed
autobuild crash, and applying the patch to see it finish correctly

Quoted 26 lines
---
 package/postgresql/postgresql.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/postgresql/postgresql.mk +3 -2
index 1a6aa880286f..eda547c18023 100644
@@ -11,7 +11,9 @@ POSTGRESQL_LICENSE = PostgreSQL
 POSTGRESQL_LICENSE_FILES = COPYRIGHT
 POSTGRESQL_INSTALL_STAGING = YES
 POSTGRESQL_CONFIG_SCRIPTS = pg_config
-POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes
+POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes \
+                     pgac_cv_snprintf_long_long_int_format="%lld" \
+                     pgac_cv_snprintf_size_t_support=yes
 POSTGRESQL_AUTORECONF = YES
 
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
--

2.1.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 1/2 postgresql: avoid AC_TRY_RUN when testing snprintf()

In reply to Baruch Siach
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

A few snprintf() compatibility tests in config/c-library.m4 use AC_TRY_RUN that doesn't work for cross compilation. As a result configure.in decides to build a bundled implementation of snprintf(). This implementation calls isnan(), but -lm is missing. This breaks link with libpq.so. Preseed the correct values to make the configure script happy, and fix rsyslog build.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/e76/e769982e3131581b38698c109c9bc5215e3d5b11/
http://autobuild.buildroot.net/results/2b9/2b9d3edc8341675455bc3b74d1e84c8c0c24c521/
http://autobuild.buildroot.net/results/2a8/2a80357237ed7225823a008b5ff02bab01269814/

and many more.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard