Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v1] rsyslog: fix xtensa/uclibc-ng postgresql linking problem
@ 2015-05-12 19:51 Peter Seiderer
  2015-05-12 20:13 ` Baruch Siach
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seiderer @ 2015-05-12 19:51 UTC (permalink / raw)
  To: buildroot

Add explicit linking with '-lm', fixes missing __isnan while postgresql
configure detection.

Fixes [1]:

checking for pg_config... (cached) /home/seiderer/Work/zeiss/freescale-imx6/build_xtensa_001/host/usr/xtensa-buildroot-linux-uclibc/sysroot/usr/bin/pg_config
checking for PQconnectdb in -lpq... no
configure: error: in `/home/seiderer/Work/zeiss/freescale-imx6/build_xtensa_001/build/rsyslog-8.9.0':
configure: error: PgSQL library is missing

From rsyslog-8.9.0/config.log:

configure:17859: checking for PQconnectdb in -lpq
configure:17885: .../host/usr/bin/xtensa-linux-gcc -std=c99 -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mtext-section-literals  -Os  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c -lpq -L.../host/usr/xtensa-buildroot-linux-uclibc/sysroot/usr/lib
    >&5
.../host/usr/xtensa-buildroot-linux-uclibc/sysroot/usr/lib/libpq.so: undefined reference to `__isnan'

[1] http://autobuild.buildroot.net/results/e76/e769982e3131581b38698c109c9bc5215e3d5b11

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Similare patch(es) to fix the problem (plus additional -lpthread)
from Yann E. MORIN and Bernd Kuhls:

https://patchwork.ozlabs.org/patch/460348/
---
 package/rsyslog/rsyslog.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/rsyslog/rsyslog.mk b/package/rsyslog/rsyslog.mk
index 99e6eba..2998c9f 100644
--- a/package/rsyslog/rsyslog.mk
+++ b/package/rsyslog/rsyslog.mk
@@ -48,6 +48,8 @@ ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
 RSYSLOG_DEPENDENCIES += postgresql
 RSYSLOG_CONF_OPTS += --enable-pgsql
 RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config
+# fix libpq linking problem with xtensa/uclibc-ng toolchain
+RSYSLOG_CONF_ENV += LIBS="-lm"
 else
 RSYSLOG_CONF_OPTS += --disable-pgsql
 endif
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-12 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12 19:51 [Buildroot] [RFC v1] rsyslog: fix xtensa/uclibc-ng postgresql linking problem Peter Seiderer
2015-05-12 20:13 ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox