Skip to contentSkip to conversation

New: packatges/postgresql/postgresql.mk contains wrong POSTGRESQL_CONF_ENV

Buildroot bugzilla at busybox.net 1 participant 3 messages Nov 28, 2016 – Nov 30, 2016

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=9451

Bug ID: 9451
Summary: packatges/postgresql/postgresql.mk contains wrong
POSTGRESQL_CONF_ENV
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: dde at innovaphone.com
CC: buildroot at uclibc.org
Target Milestone: ---

I'm building with the current build buildroot-2016.11-rc2.tar.gz and we experience an issue while executing the resulting PostgreSQL binary pg_dump, when we try to export a database which contains sequences:

ERROR LINE 1: ...nt_by, CASE WHEN increment_by > 0 AND max_value = %lldd THEN...

Look at the %lldd inside the query, which is wrongly built within pg_dump.

After some research I found this piece of code inside the PostgreSQL sources
(https://github.com/postgres/postgres/blob/master/config/c-library.m4):

AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER], [AC_MSG_CHECKING([snprintf length modifier for long long int]) AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_modifier, [for pgac_modifier in 'll' 'q' 'I64'; do AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> #include <string.h>
typedef long long int ac_int64;
#define INT64_FORMAT "%${pgac_modifier}d"

You see that the defined parameter pgac_cv_snprintf_long_long_int_modifier of the postgresql.mk is used here inside "%${pgac_modifier}d" which then results in:
%%lldd. After used with _snprintf, this results in %lldd, which is no valid parameter for _snprintf.

If I define pgac_cv_snprintf_long_long_int_modifier="ll" instead and rebuild the postgresql package, everything works fine!

Greetings,
Daniel

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 9451] packatges/postgresql/postgresql.mk contains wrong POSTGRESQL_CONF_ENV

https://bugs.busybox.net/show_bug.cgi?id=9451

Peter Seiderer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |ps.report at gmx.net
|.org |

--- Comment #1 from Peter Seiderer <[email protected]> --- Hello Daniel,

thanks for the bug report (and specially for the detailed analysis).

Bug should be fixed (soon) with proposed patch (see [1])...

Regards,
Peter

[1] https://patchwork.ozlabs.org/patch/700115/

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 9451] packatges/postgresql/postgresql.mk contains wrong POSTGRESQL_CONF_ENV

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=9451

Peter Seiderer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from Peter Seiderer <[email protected]> --- Fixed with
https://git.buildroot.net/buildroot/commit/?id=e64ee501a0c8a8700c9a5f0e03e2f6979a0f810d

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.