All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package/rsyslog: Fix linking against postgresql
Date: Sat, 11 Apr 2015 12:05:07 +0200	[thread overview]
Message-ID: <20150411100507.GD4221@free.fr> (raw)
In-Reply-To: <1428738737-3238-2-git-send-email-bernd.kuhls@t-online.de>

Bernd, All,

On 2015-04-11 09:52 +0200, Bernd Kuhls spake thusly:
> Configure misses libm and libpthread when checking for postgresql.
> Patching configure.ac did not fix the problem so we patch configure directly,
> therefore autoreconf is not necessary.

Well, I'd still prefer we do a fix that has a chance to be accepted
upstream...

However...

> Fixes
> http://autobuild.buildroot.net/results/81e/81e6dd9d5bce3ecaa11765fb94ca538991b1e174/
> http://autobuild.buildroot.net/results/0bd/0bdde92bd0e0fa163c4b6579ff69b7f6e61a8b19/
> http://autobuild.buildroot.net/results/cab/cabf2352307de58ff357ee59bf273ee487a2b716/
> http://autobuild.buildroot.net/results/8a3/8a31c815f113f610fb2cdbc4d27e5ade492be354/
> http://autobuild.buildroot.net/results/d0f/d0fe409d23117ea2cea640b8d7ff6dbb7c33943a/
> http://autobuild.buildroot.net/results/3ca/3ca2a7a38cf48e69fed888aecb8782687ad48c99/
> http://autobuild.buildroot.net/results/3d3/3d326ba195682b6650ebabcedbe4b5d4fb5cf116/
> http://autobuild.buildroot.net/results/456/456e75367b3a8e2eb9ad82478f3522e89f658912/
> http://autobuild.buildroot.net/results/1b7/1b745408187b7655ae22942572367d7ed911973b/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/rsyslog/0001-pgsql.patch |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 package/rsyslog/0001-pgsql.patch
> 
> diff --git a/package/rsyslog/0001-pgsql.patch b/package/rsyslog/0001-pgsql.patch
> new file mode 100644
> index 0000000..15b1b93
> --- /dev/null
> +++ b/package/rsyslog/0001-pgsql.patch
> @@ -0,0 +1,12 @@
> +diff -uNr rsyslog-8.9.0.org/configure rsyslog-8.9.0/configure
> +--- rsyslog-8.9.0.org/configure	2015-04-07 15:08:47.000000000 +0200
> ++++ rsyslog-8.9.0/configure	2015-04-11 09:44:23.649214912 +0200
> +@@ -17385,7 +17385,7 @@
> +   $as_echo_n "(cached) " >&6
> + else
> +   ac_check_lib_save_LIBS=$LIBS
> +-LIBS="-lpq -L`$PG_CONFIG --libdir`
> ++LIBS="-lm -lpthread -lpq -L`$PG_CONFIG --libdir`
> +    $LIBS"
> + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> + /* end confdefs.h.  */

... why not this:

diff --git a/package/rsyslog/rsyslog.mk b/package/rsyslog/rsyslog.mk
index c6758eb..8941a2b 100644
--- a/package/rsyslog/rsyslog.mk
+++ b/package/rsyslog/rsyslog.mk
@@ -48,6 +48,7 @@ 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
+RSYSLOG_LIBS += -lm -lpthread
 else
 RSYSLOG_CONF_OPTS += --disable-pgsql
 endif
@@ -59,6 +60,8 @@ else
 RSYSLOG_CONF_OPTS += --disable-uuid
 endif
 
+RSYSLOG_CONF_ENV += LIBS="$(RSYSLOG_LIBS)"
+
 define RSYSLOG_INSTALL_INIT_SYSV
 	$(INSTALL) -m 0755 -D package/rsyslog/S01logging \
 		$(TARGET_DIR)/etc/init.d/S01logging

As far as I could test, it also fixes the issue for us (but is ugly, I
think Thomas does not like this too much...).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2015-04-11 10:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11  7:52 [Buildroot] [PATCH 1/3] package/rsyslog: Autoreconf is not necessary anymore Bernd Kuhls
2015-04-11  7:52 ` [Buildroot] [PATCH 2/3] package/rsyslog: Fix linking against postgresql Bernd Kuhls
2015-04-11 10:05   ` Yann E. MORIN [this message]
2015-04-11 10:42   ` Thomas Petazzoni
2015-04-11 11:38     ` Bernd Kuhls
2015-04-11 12:07       ` Yann E. MORIN
2015-04-11 12:15         ` Thomas Petazzoni
2015-04-11 12:23           ` Yann E. MORIN
2015-08-09 10:55             ` Bernd Kuhls
2015-08-09 11:16               ` Thomas Petazzoni
2015-04-11  7:52 ` [Buildroot] [PATCH 3/3] package/rsyslog: bump version to 8.9.0 Bernd Kuhls
2015-04-11 18:00   ` Thomas Petazzoni
2015-04-11  9:17 ` [Buildroot] [PATCH 1/3] package/rsyslog: Autoreconf is not necessary anymore Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150411100507.GD4221@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.