[ZBX-13398] configure script fails with PostgreSQL on Debian GNU/Linux buster/sid Created: 2018 Jan 25  Updated: 2024 Apr 10  Resolved: 2018 Feb 26

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: 3.0.14
Fix Version/s: 3.0.16rc1, 3.4.8rc1, 4.0.0alpha5, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Andris Mednis Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: configure
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian/testing (Debian GNU/Linux buster/sid)


Team: Team A
Team: Team A
Sprint: Sprint 26, Sprint 27, Sprint 28
Story Points: 0.25

 Description   
 ./configure --enable-server --with-postgresql
...
checking for PostgreSQL libraries... yes
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
checking if PostgreSQL version is >= 8.1... expr: syntax error
no
configure: error: PostgreSQL version mismatch


 Comments   
Comment by Andris Mednis [ 2018 Jan 25 ]

configure script finds PostgreSQL version as

POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`

On Debian stable it produces 9.4.10.
On Debian testing it now produces 10.1 (Debian 10.1-3) and fails with 'expr' syntax error.
Previously it produced only a number, e.g. 10.1 and worked.
One possible fix is

Index: m4/ax_lib_postgresql.m4
===================================================================
--- m4/ax_lib_postgresql.m4	(revision 77198)
+++ m4/ax_lib_postgresql.m4	(working copy)
@@ -120,7 +120,7 @@
             unset _save_postgresql_libs
 
             if test "x$found_postgresql" = "xyes"; then
-                POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
+                POSTGRESQL_VERSION=`$PG_CONFIG --version | cut -d' ' -f2`
             fi
         fi
     fi

Thanks to dimir for proposed fix

As of portability, the 'cut' command is also used in ax_lib_mysql.m4, jabber.m4, libcurl.m4, libxml2.m4 and netsnmp.m4.

Comment by Viktors Tjarve [ 2018 Jan 31 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-13398

Comment by Viktors Tjarve [ 2018 Feb 26 ]

Released in:

  • 3.0.16rc1 r78040
  • 3.4.8rc1 r78042
  • 4.0.0alpha5 r78046
Generated at Fri Apr 19 14:59:55 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.