Dagobert Michelsen wrote:
The error lies in #72 in your configure.ac

Thanks for helping to debug it. configure.ac is itself OK; the problem is that build-aux/git-version-gen is a shell script that uses the construct ${v#-g*} in line 170, and Solaris 10 /bin/sh does not understand that construct.

It seems to me that the Buildbot configuration is still at fault here, because the code in question runs before 'configure' is invoked. We do not attempt to be portable to arbitrary development environments in the pre-configure stage of the build, as it is reasonable to assume that developers are running recent-enough versions of Autoconf, M4, Git, etc., and it's not necessary to run these tools to build from distribution tarballs.

Because there is an easy fix in Gnulib I installed the attached patch. However, in the long run if you want to continue to build on Solaris 10 I expect you will need to fix the Buildbot procedure so that it does only './configure; make' on Solaris 10. That is what I do, when I test on Solaris 10.
From f9fb6188dc5ec974a74df5bf5af7423271b47698 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sun, 20 Aug 2017 17:03:55 -0700
Subject: [PATCH] git-version-gen: port to Solaris 10

Problem reported by Dagobert Michelsen in:
http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html
* build-aux/git-version-gen (v_from_git):
Use expr instead of shell substitution.
---
 ChangeLog                 | 8 ++++++++
 build-aux/git-version-gen | 5 +++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb71b1a..4c34008 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-08-20  Paul Eggert  <egg...@cs.ucla.edu>
+
+	git-version-gen: port to Solaris 10
+	Problem reported by Dagobert Michelsen in:
+	http://lists.gnu.org/archive/html/grep-devel/2017-08/msg00002.html
+	* build-aux/git-version-gen (v_from_git):
+	Use expr instead of shell substitution.
+
 2017-08-19  Bruno Haible  <br...@clisp.org>
 
 	host-cpu-c-abi: Improve detection of MIPS ABI.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index a8818b2..b41f891 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2017-08-07.06; # UTC
+scriptversion=2017-08-20.18; # UTC
 
 # Copyright (C) 2007-2017 Free Software Foundation, Inc.
 #
@@ -167,7 +167,8 @@ then
     # tag or the previous older version that did not?
     #   Newer: v6.10-77-g0f8faeb
     #   Older: v6.10-g0f8faeb
-    case ${v#-g*} in
+    vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
+    case $vprefix in
         *-*) : git describe is probably okay three part flavor ;;
         *)
             : git describe is older two part flavor
-- 
2.7.4

Reply via email to