All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Code to allow cros-compilation on chromeOS
       [not found] <CAMHSBOXjP4QOGmM2HxygY0r+ML93XyEmLEfwGz6KvS0S0sjuCA@mail.gmail.com>
@ 2017-03-24 23:48 ` Gwendal Grignou
  2017-03-27 11:35   ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-03-24 23:48 UTC (permalink / raw)
  To: eguan; +Cc: fstests

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified compiling in chromeOS chroot works as well.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 Makefile             |   4 +-
 acinclude.m4         |  30 ++++++
 aclocal.m4           |  50 ----------
 configure.ac         |   3 +-
 include/builddefs.in |   7 ++
 install-sh           | 259 ---------------------------------------------------
 6 files changed, 41 insertions(+), 312 deletions(-)
 create mode 100644 acinclude.m4
 delete mode 100644 aclocal.m4
 delete mode 100755 install-sh

diff --git a/Makefile b/Makefile
index 30d8747d..64fcf3ee 100644
--- a/Makefile
+++ b/Makefile
@@ -76,8 +76,8 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 configure: configure.ac
-	autoheader
-	autoconf
+	autoreconf
+	libtoolize -i
 
 include/builddefs include/config.h: configure
 	./configure \
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..666f4069
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,30 @@
+dnl Copyright (C) 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
+  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
+    AC_SUBST(have_fiemap)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
+  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
+    AC_SUBST(have_prctl)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
+  [ AC_CHECK_HEADER([linux/fs.h])
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
+  [ AC_MSG_CHECKING([for fallocate])
+    AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h> ],
+      [ fallocate(0, 0, 0, 0); ],
+      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
+      [ have_fallocate=false; AC_MSG_RESULT(no) ])
+    AC_SUBST(have_fallocate)
+  ])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index f3412e19..00000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
-  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
-    AC_SUBST(have_fiemap)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
-  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
-    AC_SUBST(have_prctl)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
-  [ AC_CHECK_HEADER([linux/fs.h])
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_TRY_LINK([
-#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include <fcntl.h>
-#include <linux/falloc.h> ],
-      [ fallocate(0, 0, 0, 0); ],
-      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
-      [ have_fallocate=false; AC_MSG_RESULT(no) ])
-    AC_SUBST(have_fallocate)
-  ])
-m4_include([m4/multilib.m4])
-m4_include([m4/package_acldev.m4])
-m4_include([m4/package_aiodev.m4])
-m4_include([m4/package_attrdev.m4])
-m4_include([m4/package_dmapidev.m4])
-m4_include([m4/package_gdbmdev.m4])
-m4_include([m4/package_globals.m4])
-m4_include([m4/package_ssldev.m4])
-m4_include([m4/package_utilies.m4])
-m4_include([m4/package_uuiddev.m4])
-m4_include([m4/package_xfslibs.m4])
diff --git a/configure.ac b/configure.ac
index fa48d2f8..59b1479b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([xfstests], [1.1.1])
-AC_PREREQ(2.50)
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT
 AC_CONFIG_SRCDIR([src/xfsctl.c])
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
diff --git a/include/builddefs.in b/include/builddefs.in
index 24f838f5..48d35311 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -7,6 +7,8 @@
 ifndef _BUILDDEFS_INCLUDED_
 _BUILDDEFS_INCLUDED_ = 1
 
+top_builddir=$(TOPDIR)
+
 DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
@@ -35,7 +37,12 @@ PKG_DISTRIBUTION= @pkg_distribution@
 PKG_SBIN_DIR    = @sbindir@
 # A bit of a hack; by rights only state should probably go here
 # But for now ...
+ifdef DESTDIR
+PKG_LIB_DIR     = $(DESTDIR)/usr/local/@pkg_name@
+else
 PKG_LIB_DIR     = /var/lib/@pkg_name@
+endif
+
 
 CC              = @cc@
 AWK             = @awk@
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 58e7b586..00000000
--- a/install-sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-#                  information in the following format:
-#                  File     :  f mode owner group src target
-#                  Directory:  d mode owner group target
-#                  Symlink  :  l linkval target
-#
-# $DIST_ROOT     - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
-# -----------------------------+--------------------------
-#       not set       not set  |    yes        no
-#       not set       set      |    yes        no
-#       set           not set  |    no         yes
-#       set           set      |    yes        yes
-#
-_usage() {
-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-    echo "or     $prog -S file target  (creates \"target\" symlink)"
-    echo ""
-    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-    echo "behaviour of this command - see comments in the script."
-    echo "The -D flag is only available for the second usage, and causes"
-    echo "the target directory to be created before installing the file."
-    echo ""
-    exit 1
-}
-
-_chown ()
-{
-    _st=255
-    if [ $# -eq 3 ] ; then
-	chown $1:$2 $3
-	_st=$?
-	if [ $_st -ne 0 ] ; then
-	    if [ $REAL_UID != '0' ] ; then
-		if [ ! -f $DIST_ROOT/.chown.quite ] ; then
-		    echo '==============================================='
-		    echo Ownership of files under ${DIST_ROOT:-/}
-		    echo cannot be changed
-		    echo '==============================================='
-		    if [ -n "$DIST_ROOT" ] ; then
-			touch $DIST_ROOT/.chown.quite
-		    fi
-		fi
-	       _st=0
-	    fi     
-	fi
-    fi
-
-    return $_st
-}
-
-
-_manifest ()
-{ 
-    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:" c $*
-do
-   case $c in
-   c)
-	;;
-   g)
-	GROUP=$OPTARG
-	;;
-   o)
-	OWNER=$OPTARG
-	;;
-   m)
-	DIRMODE=`expr $OPTARG`
-	FILEMODE=$DIRMODE
-	;;
-   D) 
-	Dflag=true
-	;;
-   S) 
-	symlink=$OPTARG
-	Sflag=true
-	;;
-   d) 
-	dir=$DIST_ROOT/$OPTARG
-	dflag=true
-	;;
-   *)
-   	_usage
-	;;
-   esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
-    #
-    # first usage
-    #
-    $MKDIR -p $dir 
-    status=$?
-    if [ $status -eq 0 ]
-    then
-	$CHMOD $DIRMODE $dir
-	status=$?
-    fi
-    if [ $status -eq 0 ]
-    then
-	$CHOWN $OWNER $GROUP $dir
-	status=$?
-    fi
-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
-    #
-    # fourth usage (symlink)
-    #
-    if [ $# -ne 1 ]
-    then
-    	_usage
-    else
-    	target=$DIST_ROOT/$1
-    fi
-    $LN -s -f $symlink $target
-    status=$?
-    $MANIFEST l $symlink ${target#$DIST_ROOT} 
-else
-    list=""
-    dir=""
-    if [ $# -eq 2 ]
-    then
-	#
-	# second usage
-	#
-	f=$1
-	dir=$DIST_ROOT/$2
-	if $Dflag
-	then
-	    mkdir -p `dirname $dir`
-	fi
-	$CP $f $dir
-	status=$?
-	if [ $status -eq 0 ]
-	then 
-	    if [ -f $dir/$f ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    else
-		$CHMOD $FILEMODE $dir
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-	    fi
-	fi
-    else
-	#
-	# third usage
-	#
-	n=1
-	while [ $# -gt 0 ]
-	do
-	    if [ $# -gt 1 ]
-	    then
-		list="$list $1"
-	    else
-		dir=$DIST_ROOT/$1
-	    fi
-	    shift
-	done
-
-	# echo DIR=$dir list=\"$list\"
-	for f in $list
-	do
-	    $CP $f $dir
-	    status=$?
-	    if [ $status -eq 0 ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    fi
-	    [ $status -ne 0 ] && break
-	done
-    fi
-fi
-
-exit $status
-- 
2.12.1.578.ge9c3154ca4-goog

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=4FuLYnucFEgNa8Fxc3iBUYB7hIEZNGDEgBOE4qOdExI&s=-BWOgIUveU-j4ikT_kYVeqfGGgj9AZjz3IgwBF1Ps-Y&e= 

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

* Re: [PATCH v2] Code to allow cros-compilation on chromeOS
  2017-03-24 23:48 ` [PATCH v2] Code to allow cros-compilation on chromeOS Gwendal Grignou
@ 2017-03-27 11:35   ` Eryu Guan
  2017-04-04 17:37     ` [PATCH v3] " Gwendal Grignou
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2017-03-27 11:35 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: fstests

On Fri, Mar 24, 2017 at 04:48:00PM -0700, Gwendal Grignou wrote:
> - Request LIBTOOL to be used
> - Set topbuildir based on a Makefile variable to call libtool
> - Use /usr/local instead of /var for xfstest final location
> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> 
> The regular way of compiling xfstests - make - remains.
> But it now runs autoreconf and libtoolize -i to produce a valid
> configure.
> Verified compiling in chromeOS chroot works as well.

This works for me now, thanks!

But I noticed that the "/usr/local" location is only used if DESTDIR is
defined, otherwise it defaults to /var/lib, this seems inconsistent. Is
it possible, e.g. to define another var, to control the location and
make "/var/lib" as the default?

And again, I really appreciate if someone else with more packaging
experience could help review this patch!

Thanks,
Eryu
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=ukLPNj4j4uFJyDwWW7Eu3T83sCjYPH-2y0Pk7dzkaBc&s=YFXsKIOjJ40JxbMAtZHJFLRCc_nS_pISTYYzZBM5lRw&e= 

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

* [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-03-27 11:35   ` Eryu Guan
@ 2017-04-04 17:37     ` Gwendal Grignou
  2017-04-06 11:18       ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-04 17:37 UTC (permalink / raw)
  To: eguan; +Cc: fstests

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified with 'make install --dry-run' that files are installed at the
same place.
Verified compiling in chromeOS chroot works as well.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---

Changes in v2:
Removal of instal-sh, use of autoreconf

Changes in v3:
Use of @exec_prefix@ variable, unify installation location.

 Makefile             |   7 +-
 acinclude.m4         |  30 ++++++
 aclocal.m4           |  50 ----------
 configure.ac         |   3 +-
 include/builddefs.in |   9 +-
 install-sh           | 259 ---------------------------------------------------
 6 files changed, 41 insertions(+), 317 deletions(-)
 create mode 100644 acinclude.m4
 delete mode 100644 aclocal.m4
 delete mode 100755 install-sh

diff --git a/Makefile b/Makefile
index 30d8747d..994a36ca 100644
--- a/Makefile
+++ b/Makefile
@@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 configure: configure.ac
-	autoheader
-	autoconf
+	autoreconf
+	libtoolize -i
 
 include/builddefs include/config.h: configure
 	./configure \
-                --libexecdir=/usr/lib
+                --libexecdir=/usr/lib \
+                --exec_prefix=/var/lib
 
 aclocal.m4::
 	aclocal --acdir=`pwd`/m4 --output=$@
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..666f4069
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,30 @@
+dnl Copyright (C) 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
+  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
+    AC_SUBST(have_fiemap)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
+  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
+    AC_SUBST(have_prctl)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
+  [ AC_CHECK_HEADER([linux/fs.h])
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
+  [ AC_MSG_CHECKING([for fallocate])
+    AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h> ],
+      [ fallocate(0, 0, 0, 0); ],
+      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
+      [ have_fallocate=false; AC_MSG_RESULT(no) ])
+    AC_SUBST(have_fallocate)
+  ])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index f3412e19..00000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
-  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
-    AC_SUBST(have_fiemap)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
-  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
-    AC_SUBST(have_prctl)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
-  [ AC_CHECK_HEADER([linux/fs.h])
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_TRY_LINK([
-#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include <fcntl.h>
-#include <linux/falloc.h> ],
-      [ fallocate(0, 0, 0, 0); ],
-      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
-      [ have_fallocate=false; AC_MSG_RESULT(no) ])
-    AC_SUBST(have_fallocate)
-  ])
-m4_include([m4/multilib.m4])
-m4_include([m4/package_acldev.m4])
-m4_include([m4/package_aiodev.m4])
-m4_include([m4/package_attrdev.m4])
-m4_include([m4/package_dmapidev.m4])
-m4_include([m4/package_gdbmdev.m4])
-m4_include([m4/package_globals.m4])
-m4_include([m4/package_ssldev.m4])
-m4_include([m4/package_utilies.m4])
-m4_include([m4/package_uuiddev.m4])
-m4_include([m4/package_xfslibs.m4])
diff --git a/configure.ac b/configure.ac
index 246f92eb..2d7078bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([xfstests], [1.1.1])
-AC_PREREQ(2.50)
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT
 AC_CONFIG_SRCDIR([src/xfsctl.c])
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
diff --git a/include/builddefs.in b/include/builddefs.in
index 24f838f5..b08f1211 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -7,6 +7,8 @@
 ifndef _BUILDDEFS_INCLUDED_
 _BUILDDEFS_INCLUDED_ = 1
 
+top_builddir=$(TOPDIR)
+
 DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
@@ -24,6 +26,7 @@ LIBUUID = @libuuid@
 LIBHANDLE = @libhdl@
 LIBDM = @libdm@
 LIBTEST = $(TOPDIR)/lib/libtest.la
+prefix = @prefix@
 
 PKG_NAME        = @pkg_name@
 PKG_USER        = @pkg_user@
@@ -32,10 +35,8 @@ PKG_RELEASE     = @pkg_release@
 PKG_VERSION     = @pkg_version@
 PKG_PLATFORM    = @pkg_platform@
 PKG_DISTRIBUTION= @pkg_distribution@
-PKG_SBIN_DIR    = @sbindir@
-# A bit of a hack; by rights only state should probably go here
-# But for now ...
-PKG_LIB_DIR     = /var/lib/@pkg_name@
+PKG_LIB_DIR     = $(DESTDIR)@exec_prefix@/@pkg_name@
+
 
 CC              = @cc@
 AWK             = @awk@
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 58e7b586..00000000
--- a/install-sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-#                  information in the following format:
-#                  File     :  f mode owner group src target
-#                  Directory:  d mode owner group target
-#                  Symlink  :  l linkval target
-#
-# $DIST_ROOT     - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
-# -----------------------------+--------------------------
-#       not set       not set  |    yes        no
-#       not set       set      |    yes        no
-#       set           not set  |    no         yes
-#       set           set      |    yes        yes
-#
-_usage() {
-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-    echo "or     $prog -S file target  (creates \"target\" symlink)"
-    echo ""
-    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-    echo "behaviour of this command - see comments in the script."
-    echo "The -D flag is only available for the second usage, and causes"
-    echo "the target directory to be created before installing the file."
-    echo ""
-    exit 1
-}
-
-_chown ()
-{
-    _st=255
-    if [ $# -eq 3 ] ; then
-	chown $1:$2 $3
-	_st=$?
-	if [ $_st -ne 0 ] ; then
-	    if [ $REAL_UID != '0' ] ; then
-		if [ ! -f $DIST_ROOT/.chown.quite ] ; then
-		    echo '==============================================='
-		    echo Ownership of files under ${DIST_ROOT:-/}
-		    echo cannot be changed
-		    echo '==============================================='
-		    if [ -n "$DIST_ROOT" ] ; then
-			touch $DIST_ROOT/.chown.quite
-		    fi
-		fi
-	       _st=0
-	    fi     
-	fi
-    fi
-
-    return $_st
-}
-
-
-_manifest ()
-{ 
-    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:" c $*
-do
-   case $c in
-   c)
-	;;
-   g)
-	GROUP=$OPTARG
-	;;
-   o)
-	OWNER=$OPTARG
-	;;
-   m)
-	DIRMODE=`expr $OPTARG`
-	FILEMODE=$DIRMODE
-	;;
-   D) 
-	Dflag=true
-	;;
-   S) 
-	symlink=$OPTARG
-	Sflag=true
-	;;
-   d) 
-	dir=$DIST_ROOT/$OPTARG
-	dflag=true
-	;;
-   *)
-   	_usage
-	;;
-   esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
-    #
-    # first usage
-    #
-    $MKDIR -p $dir 
-    status=$?
-    if [ $status -eq 0 ]
-    then
-	$CHMOD $DIRMODE $dir
-	status=$?
-    fi
-    if [ $status -eq 0 ]
-    then
-	$CHOWN $OWNER $GROUP $dir
-	status=$?
-    fi
-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
-    #
-    # fourth usage (symlink)
-    #
-    if [ $# -ne 1 ]
-    then
-    	_usage
-    else
-    	target=$DIST_ROOT/$1
-    fi
-    $LN -s -f $symlink $target
-    status=$?
-    $MANIFEST l $symlink ${target#$DIST_ROOT} 
-else
-    list=""
-    dir=""
-    if [ $# -eq 2 ]
-    then
-	#
-	# second usage
-	#
-	f=$1
-	dir=$DIST_ROOT/$2
-	if $Dflag
-	then
-	    mkdir -p `dirname $dir`
-	fi
-	$CP $f $dir
-	status=$?
-	if [ $status -eq 0 ]
-	then 
-	    if [ -f $dir/$f ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    else
-		$CHMOD $FILEMODE $dir
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-	    fi
-	fi
-    else
-	#
-	# third usage
-	#
-	n=1
-	while [ $# -gt 0 ]
-	do
-	    if [ $# -gt 1 ]
-	    then
-		list="$list $1"
-	    else
-		dir=$DIST_ROOT/$1
-	    fi
-	    shift
-	done
-
-	# echo DIR=$dir list=\"$list\"
-	for f in $list
-	do
-	    $CP $f $dir
-	    status=$?
-	    if [ $status -eq 0 ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    fi
-	    [ $status -ne 0 ] && break
-	done
-    fi
-fi
-
-exit $status
-- 
2.12.2.715.g7642488e1d-goog


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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-04 17:37     ` [PATCH v3] " Gwendal Grignou
@ 2017-04-06 11:18       ` Eryu Guan
  2017-04-06 23:26         ` Gwendal Grignou
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2017-04-06 11:18 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: fstests

On Tue, Apr 04, 2017 at 10:37:22AM -0700, Gwendal Grignou wrote:
> - Request LIBTOOL to be used
> - Set topbuildir based on a Makefile variable to call libtool
> - Use /usr/local instead of /var for xfstest final location
> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> - Use autoconf variables @prefix@, @exec_prefix@.
> 
> The regular way of compiling xfstests - make - remains.
> But it now runs autoreconf and libtoolize -i to produce a valid
> configure.
> Verified with 'make install --dry-run' that files are installed at the
> same place.
> Verified compiling in chromeOS chroot works as well.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
> 
> Changes in v2:
> Removal of instal-sh, use of autoreconf
> 
> Changes in v3:
> Use of @exec_prefix@ variable, unify installation location.
> 
>  Makefile             |   7 +-
>  acinclude.m4         |  30 ++++++
>  aclocal.m4           |  50 ----------
>  configure.ac         |   3 +-
>  include/builddefs.in |   9 +-
>  install-sh           | 259 ---------------------------------------------------
>  6 files changed, 41 insertions(+), 317 deletions(-)
>  create mode 100644 acinclude.m4
>  delete mode 100644 aclocal.m4
>  delete mode 100755 install-sh
> 
> diff --git a/Makefile b/Makefile
> index 30d8747d..994a36ca 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
>  endif
>  
>  configure: configure.ac
> -	autoheader
> -	autoconf
> +	autoreconf
> +	libtoolize -i
>  
>  include/builddefs include/config.h: configure
>  	./configure \
> -                --libexecdir=/usr/lib
> +                --libexecdir=/usr/lib \
> +                --exec_prefix=/var/lib
>  
>  aclocal.m4::
>  	aclocal --acdir=`pwd`/m4 --output=$@
> diff --git a/acinclude.m4 b/acinclude.m4
> new file mode 100644
> index 00000000..666f4069
> --- /dev/null
> +++ b/acinclude.m4
> @@ -0,0 +1,30 @@
> +dnl Copyright (C) 2016 Free Software Foundation, Inc.
> +dnl This file is free software; the Free Software Foundation
> +dnl gives unlimited permission to copy and/or distribute it,
> +dnl with or without modifications, as long as this notice is preserved.
> +AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
> +  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
> +    AC_SUBST(have_fiemap)
> +  ])
> +
> +AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
> +  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
> +    AC_SUBST(have_prctl)
> +  ])
> +
> +AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
> +  [ AC_CHECK_HEADER([linux/fs.h])
> +  ])
> +
> +AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
> +  [ AC_MSG_CHECKING([for fallocate])
> +    AC_TRY_LINK([
> +#define _GNU_SOURCE
> +#define _FILE_OFFSET_BITS 64
> +#include <fcntl.h>
> +#include <linux/falloc.h> ],
> +      [ fallocate(0, 0, 0, 0); ],
> +      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
> +      [ have_fallocate=false; AC_MSG_RESULT(no) ])
> +    AC_SUBST(have_fallocate)
> +  ])
> diff --git a/aclocal.m4 b/aclocal.m4
> deleted file mode 100644
> index f3412e19..00000000
> --- a/aclocal.m4
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -# generated automatically by aclocal 1.11 -*- Autoconf -*-
> -
> -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
> -# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
> -# This file is free software; the Free Software Foundation
> -# gives unlimited permission to copy and/or distribute it,
> -# with or without modifications, as long as this notice is preserved.
> -
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
> -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
> -# PARTICULAR PURPOSE.
> -
> -AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
> -  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
> -    AC_SUBST(have_fiemap)
> -  ])
> -
> -AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
> -  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
> -    AC_SUBST(have_prctl)
> -  ])
> -
> -AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
> -  [ AC_CHECK_HEADER([linux/fs.h])
> -  ])
> -
> -AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
> -  [ AC_MSG_CHECKING([for fallocate])
> -    AC_TRY_LINK([
> -#define _GNU_SOURCE
> -#define _FILE_OFFSET_BITS 64
> -#include <fcntl.h>
> -#include <linux/falloc.h> ],
> -      [ fallocate(0, 0, 0, 0); ],
> -      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
> -      [ have_fallocate=false; AC_MSG_RESULT(no) ])
> -    AC_SUBST(have_fallocate)
> -  ])
> -m4_include([m4/multilib.m4])
> -m4_include([m4/package_acldev.m4])
> -m4_include([m4/package_aiodev.m4])
> -m4_include([m4/package_attrdev.m4])
> -m4_include([m4/package_dmapidev.m4])
> -m4_include([m4/package_gdbmdev.m4])
> -m4_include([m4/package_globals.m4])
> -m4_include([m4/package_ssldev.m4])
> -m4_include([m4/package_utilies.m4])
> -m4_include([m4/package_uuiddev.m4])
> -m4_include([m4/package_xfslibs.m4])
> diff --git a/configure.ac b/configure.ac
> index 246f92eb..2d7078bd 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,6 @@
>  AC_INIT([xfstests], [1.1.1])
> -AC_PREREQ(2.50)
> +AC_CONFIG_MACRO_DIR([m4])

Sorry, I didn't notice this in last review. But I don't know why this
AC_CONFIG_MACRO_DIR doesn't work on my RHEL6.9 system (it does work on
RHEL7), make reports:

configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
...

Restoring all the "m4_include" in acinclude.m4 works for me. Just my
data point, not sure what's the proper fix.

Thanks,
Eryu

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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-06 11:18       ` Eryu Guan
@ 2017-04-06 23:26         ` Gwendal Grignou
  2017-04-07  4:12           ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-06 23:26 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Thu, Apr 6, 2017 at 4:18 AM, Eryu Guan <eguan@redhat.com> wrote:
>
> On Tue, Apr 04, 2017 at 10:37:22AM -0700, Gwendal Grignou wrote:
> > - Request LIBTOOL to be used
> > - Set topbuildir based on a Makefile variable to call libtool
> > - Use /usr/local instead of /var for xfstest final location
> > - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> > - Use autoconf variables @prefix@, @exec_prefix@.
> >
> > The regular way of compiling xfstests - make - remains.
> > But it now runs autoreconf and libtoolize -i to produce a valid
> > configure.
> > Verified with 'make install --dry-run' that files are installed at the
> > same place.
> > Verified compiling in chromeOS chroot works as well.
> >
> > Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> > ---
> >
> > Changes in v2:
> > Removal of instal-sh, use of autoreconf
> >
> > Changes in v3:
> > Use of @exec_prefix@ variable, unify installation location.
> >
>
> Sorry, I didn't notice this in last review. But I don't know why this
> AC_CONFIG_MACRO_DIR doesn't work on my RHEL6.9 system (it does work on
> RHEL7), make reports:
>
> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES

Checking stack overflow
(http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error/8946674),
is pkg_config installed on your RH6.9 system.

>
> ...
>
> Restoring all the "m4_include" in acinclude.m4 works for me. Just my
> data point, not sure what's the proper fix.
>
> Thanks,
> Eryu

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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-06 23:26         ` Gwendal Grignou
@ 2017-04-07  4:12           ` Eryu Guan
  2017-04-07 21:41             ` Gwendal Grignou
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2017-04-07  4:12 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: fstests

On Thu, Apr 06, 2017 at 04:26:01PM -0700, Gwendal Grignou wrote:
> On Thu, Apr 6, 2017 at 4:18 AM, Eryu Guan <eguan@redhat.com> wrote:
> >
> > On Tue, Apr 04, 2017 at 10:37:22AM -0700, Gwendal Grignou wrote:
> > > - Request LIBTOOL to be used
> > > - Set topbuildir based on a Makefile variable to call libtool
> > > - Use /usr/local instead of /var for xfstest final location
> > > - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> > > - Use autoconf variables @prefix@, @exec_prefix@.
> > >
> > > The regular way of compiling xfstests - make - remains.
> > > But it now runs autoreconf and libtoolize -i to produce a valid
> > > configure.
> > > Verified with 'make install --dry-run' that files are installed at the
> > > same place.
> > > Verified compiling in chromeOS chroot works as well.
> > >
> > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> > > ---
> > >
> > > Changes in v2:
> > > Removal of instal-sh, use of autoreconf
> > >
> > > Changes in v3:
> > > Use of @exec_prefix@ variable, unify installation location.
> > >
> >
> > Sorry, I didn't notice this in last review. But I don't know why this
> > AC_CONFIG_MACRO_DIR doesn't work on my RHEL6.9 system (it does work on
> > RHEL7), make reports:
> >
> > configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
> >       If this token and others are legitimate, please use m4_pattern_allow.
> >       See the Autoconf documentation.
> > configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
> 
> Checking stack overflow
> (http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error/8946674),
> is pkg_config installed on your RH6.9 system.

Yes, it's installed.

# rpm -q pkgconfig
pkgconfig-0.23-9.1.el6.x86_64

Eryu

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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-07  4:12           ` Eryu Guan
@ 2017-04-07 21:41             ` Gwendal Grignou
  2017-04-10  9:25               ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-07 21:41 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

Reading  stack overflow further, the fact AC_PACKAGE_GLOBALS and
AC_PACKAGE_UTILITIES are not defined are just the consequence of the
error.
When all work fine, the autoconfigued ./aclocal.m4 should contains
several m4_include and in particular
m4_include([m4/package_globals.m4])" that will load the definitions
for these macros.
I am shooting in the dark, how ./aclocal.m4 compares between RH7.0 and RH6.9?
What are the revisions of automake, autoconf, m4 andlibtoolize.
Does autoreconf -fi help?

Thanks for your help,
Gwendal.

On Thu, Apr 6, 2017 at 9:12 PM, Eryu Guan <eguan@redhat.com> wrote:
> On Thu, Apr 06, 2017 at 04:26:01PM -0700, Gwendal Grignou wrote:
>> On Thu, Apr 6, 2017 at 4:18 AM, Eryu Guan <eguan@redhat.com> wrote:
>> >
>> > On Tue, Apr 04, 2017 at 10:37:22AM -0700, Gwendal Grignou wrote:
>> > > - Request LIBTOOL to be used
>> > > - Set topbuildir based on a Makefile variable to call libtool
>> > > - Use /usr/local instead of /var for xfstest final location
>> > > - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
>> > > - Use autoconf variables @prefix@, @exec_prefix@.
>> > >
>> > > The regular way of compiling xfstests - make - remains.
>> > > But it now runs autoreconf and libtoolize -i to produce a valid
>> > > configure.
>> > > Verified with 'make install --dry-run' that files are installed at the
>> > > same place.
>> > > Verified compiling in chromeOS chroot works as well.
>> > >
>> > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
>> > > ---
>> > >
>> > > Changes in v2:
>> > > Removal of instal-sh, use of autoreconf
>> > >
>> > > Changes in v3:
>> > > Use of @exec_prefix@ variable, unify installation location.
>> > >
>> >
>> > Sorry, I didn't notice this in last review. But I don't know why this
>> > AC_CONFIG_MACRO_DIR doesn't work on my RHEL6.9 system (it does work on
>> > RHEL7), make reports:
>> >
>> > configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>> >       If this token and others are legitimate, please use m4_pattern_allow.
>> >       See the Autoconf documentation.
>> > configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>>
>> Checking stack overflow
>> (http://stackoverflow.com/questions/8811381/possibly-undefined-macro-ac-msg-error/8946674),
>> is pkg_config installed on your RH6.9 system.
>
> Yes, it's installed.
>
> # rpm -q pkgconfig
> pkgconfig-0.23-9.1.el6.x86_64
>
> Eryu

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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-07 21:41             ` Gwendal Grignou
@ 2017-04-10  9:25               ` Eryu Guan
  2017-04-19 21:59                 ` Gwendal Grignou
  0 siblings, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2017-04-10  9:25 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: fstests

On Fri, Apr 07, 2017 at 02:41:59PM -0700, Gwendal Grignou wrote:
> Reading  stack overflow further, the fact AC_PACKAGE_GLOBALS and
> AC_PACKAGE_UTILITIES are not defined are just the consequence of the
> error.
> When all work fine, the autoconfigued ./aclocal.m4 should contains
> several m4_include and in particular
> m4_include([m4/package_globals.m4])" that will load the definitions
> for these macros.
> I am shooting in the dark, how ./aclocal.m4 compares between RH7.0 and RH6.9?

RHEL6.9:
https://paste.fedoraproject.org/paste/EUo-NKzoZPwbIIhn1bjoJF5M1UNdIGYhyRLivL9gydE=

RHEL7.3:
https://paste.fedoraproject.org/paste/SEhryYO0GXT8VIA0-24q8V5M1UNdIGYhyRLivL9gydE=

> What are the revisions of automake, autoconf, m4 andlibtoolize.

[root@eguan-rhel6 xfstests]# rpm -q automake autoconf m4 libtool
automake-1.11.1-4.el6.noarch
autoconf-2.63-5.1.el6.noarch
m4-1.4.13-5.el6.x86_64
libtool-2.2.6-15.5.el6.x86_64

[root@dhcp-66-87-213 xfstests]# rpm -q automake autoconf m4 libtool
automake-1.13.4-3.el7.noarch
autoconf-2.69-11.el7.noarch
m4-1.4.16-10.el7.x86_64
libtool-2.4.2-21.el7_2.x86_64

> Does autoreconf -fi help?

No, autoreconf -fi has the same issue.

> 
> Thanks for your help,
> Gwendal.

Thank you!

Eryu

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

* Re: [PATCH v3] Code to allow cros-compilation on chromeOS
  2017-04-10  9:25               ` Eryu Guan
@ 2017-04-19 21:59                 ` Gwendal Grignou
  2017-04-19 23:33                   ` [PATCH v4] " Gwendal Grignou
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-19 21:59 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

On Mon, Apr 10, 2017 at 2:25 AM, Eryu Guan <eguan@redhat.com> wrote:
> On Fri, Apr 07, 2017 at 02:41:59PM -0700, Gwendal Grignou wrote:
>> Reading  stack overflow further, the fact AC_PACKAGE_GLOBALS and
>> AC_PACKAGE_UTILITIES are not defined are just the consequence of the
>> error.
>> When all work fine, the autoconfigued ./aclocal.m4 should contains
>> several m4_include and in particular
>> m4_include([m4/package_globals.m4])" that will load the definitions
>> for these macros.
>> I am shooting in the dark, how ./aclocal.m4 compares between RH7.0 and RH6.9?
>
> RHEL6.9:
> https://paste.fedoraproject.org/paste/EUo-NKzoZPwbIIhn1bjoJF5M1UNdIGYhyRLivL9gydE=
>
> RHEL7.3:
> https://paste.fedoraproject.org/paste/SEhryYO0GXT8VIA0-24q8V5M1UNdIGYhyRLivL9gydE=

I was out for a while, the pastes seems to have expired.
>
>> What are the revisions of automake, autoconf, m4 andlibtoolize.
>
> [root@eguan-rhel6 xfstests]# rpm -q automake autoconf m4 libtool
> automake-1.11.1-4.el6.noarch
> autoconf-2.63-5.1.el6.noarch
> m4-1.4.13-5.el6.x86_64
> libtool-2.2.6-15.5.el6.x86_64
>
> [root@dhcp-66-87-213 xfstests]# rpm -q automake autoconf m4 libtool
> automake-1.13.4-3.el7.noarch
> autoconf-2.69-11.el7.noarch
> m4-1.4.16-10.el7.x86_64
> libtool-2.4.2-21.el7_2.x86_64

Maybe it is the same problem as explained in
https://lists.gnu.org/archive/html/autoconf/2013-08/msg00013.html.

I submit a patch shortly which calls autoreconf --install=m4.

Gwendal.
>
>> Does autoreconf -fi help?
>
> No, autoreconf -fi has the same issue.
>
>>
>> Thanks for your help,
>> Gwendal.
>
> Thank you!
>
> Eryu

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

* [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-04-19 21:59                 ` Gwendal Grignou
@ 2017-04-19 23:33                   ` Gwendal Grignou
  2017-04-25 13:09                     ` Eryu Guan
  2017-04-28 16:27                     ` [PATCH v5] " Gwendal Grignou
  0 siblings, 2 replies; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-19 23:33 UTC (permalink / raw)
  To: eguan; +Cc: fstests

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified with 'make install --dry-run' that files are installed at the
same place.
Verified compiling in chromeOS chroot works as well.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---

Changes in v2:
Removal of instal-sh, use of autoreconf

Changes in v3:
Use of @exec_prefix@ variable, unify installation location.

Changes in v4:
Add --install option to autoreconf so that aclocal is called with -I m4.
Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
still works.

 Makefile             |   7 +-
 acinclude.m4         |  30 ++++++
 aclocal.m4           |  50 ----------
 configure.ac         |   3 +-
 include/builddefs.in |   9 +-
 install-sh           | 259 ---------------------------------------------------
 6 files changed, 41 insertions(+), 317 deletions(-)
 create mode 100644 acinclude.m4
 delete mode 100644 aclocal.m4
 delete mode 100755 install-sh

diff --git a/Makefile b/Makefile
index 30d8747d..d41750ab 100644
--- a/Makefile
+++ b/Makefile
@@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 configure: configure.ac
-	autoheader
-	autoconf
+	autoreconf --include=m4
+	libtoolize -i
 
 include/builddefs include/config.h: configure
 	./configure \
-                --libexecdir=/usr/lib
+                --libexecdir=/usr/lib \
+                --exec_prefix=/var/lib
 
 aclocal.m4::
 	aclocal --acdir=`pwd`/m4 --output=$@
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..666f4069
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,30 @@
+dnl Copyright (C) 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
+  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
+    AC_SUBST(have_fiemap)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
+  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
+    AC_SUBST(have_prctl)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
+  [ AC_CHECK_HEADER([linux/fs.h])
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
+  [ AC_MSG_CHECKING([for fallocate])
+    AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h> ],
+      [ fallocate(0, 0, 0, 0); ],
+      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
+      [ have_fallocate=false; AC_MSG_RESULT(no) ])
+    AC_SUBST(have_fallocate)
+  ])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index f3412e19..00000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,50 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
-  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
-    AC_SUBST(have_fiemap)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
-  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
-    AC_SUBST(have_prctl)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
-  [ AC_CHECK_HEADER([linux/fs.h])
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_TRY_LINK([
-#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include <fcntl.h>
-#include <linux/falloc.h> ],
-      [ fallocate(0, 0, 0, 0); ],
-      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
-      [ have_fallocate=false; AC_MSG_RESULT(no) ])
-    AC_SUBST(have_fallocate)
-  ])
-m4_include([m4/multilib.m4])
-m4_include([m4/package_acldev.m4])
-m4_include([m4/package_aiodev.m4])
-m4_include([m4/package_attrdev.m4])
-m4_include([m4/package_dmapidev.m4])
-m4_include([m4/package_gdbmdev.m4])
-m4_include([m4/package_globals.m4])
-m4_include([m4/package_ssldev.m4])
-m4_include([m4/package_utilies.m4])
-m4_include([m4/package_uuiddev.m4])
-m4_include([m4/package_xfslibs.m4])
diff --git a/configure.ac b/configure.ac
index 246f92eb..2d7078bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([xfstests], [1.1.1])
-AC_PREREQ(2.50)
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT
 AC_CONFIG_SRCDIR([src/xfsctl.c])
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
diff --git a/include/builddefs.in b/include/builddefs.in
index 24f838f5..b08f1211 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -7,6 +7,8 @@
 ifndef _BUILDDEFS_INCLUDED_
 _BUILDDEFS_INCLUDED_ = 1
 
+top_builddir=$(TOPDIR)
+
 DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
@@ -24,6 +26,7 @@ LIBUUID = @libuuid@
 LIBHANDLE = @libhdl@
 LIBDM = @libdm@
 LIBTEST = $(TOPDIR)/lib/libtest.la
+prefix = @prefix@
 
 PKG_NAME        = @pkg_name@
 PKG_USER        = @pkg_user@
@@ -32,10 +35,8 @@ PKG_RELEASE     = @pkg_release@
 PKG_VERSION     = @pkg_version@
 PKG_PLATFORM    = @pkg_platform@
 PKG_DISTRIBUTION= @pkg_distribution@
-PKG_SBIN_DIR    = @sbindir@
-# A bit of a hack; by rights only state should probably go here
-# But for now ...
-PKG_LIB_DIR     = /var/lib/@pkg_name@
+PKG_LIB_DIR     = $(DESTDIR)@exec_prefix@/@pkg_name@
+
 
 CC              = @cc@
 AWK             = @awk@
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 58e7b586..00000000
--- a/install-sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-#                  information in the following format:
-#                  File     :  f mode owner group src target
-#                  Directory:  d mode owner group target
-#                  Symlink  :  l linkval target
-#
-# $DIST_ROOT     - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
-# -----------------------------+--------------------------
-#       not set       not set  |    yes        no
-#       not set       set      |    yes        no
-#       set           not set  |    no         yes
-#       set           set      |    yes        yes
-#
-_usage() {
-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-    echo "or     $prog -S file target  (creates \"target\" symlink)"
-    echo ""
-    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-    echo "behaviour of this command - see comments in the script."
-    echo "The -D flag is only available for the second usage, and causes"
-    echo "the target directory to be created before installing the file."
-    echo ""
-    exit 1
-}
-
-_chown ()
-{
-    _st=255
-    if [ $# -eq 3 ] ; then
-	chown $1:$2 $3
-	_st=$?
-	if [ $_st -ne 0 ] ; then
-	    if [ $REAL_UID != '0' ] ; then
-		if [ ! -f $DIST_ROOT/.chown.quite ] ; then
-		    echo '==============================================='
-		    echo Ownership of files under ${DIST_ROOT:-/}
-		    echo cannot be changed
-		    echo '==============================================='
-		    if [ -n "$DIST_ROOT" ] ; then
-			touch $DIST_ROOT/.chown.quite
-		    fi
-		fi
-	       _st=0
-	    fi     
-	fi
-    fi
-
-    return $_st
-}
-
-
-_manifest ()
-{ 
-    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:" c $*
-do
-   case $c in
-   c)
-	;;
-   g)
-	GROUP=$OPTARG
-	;;
-   o)
-	OWNER=$OPTARG
-	;;
-   m)
-	DIRMODE=`expr $OPTARG`
-	FILEMODE=$DIRMODE
-	;;
-   D) 
-	Dflag=true
-	;;
-   S) 
-	symlink=$OPTARG
-	Sflag=true
-	;;
-   d) 
-	dir=$DIST_ROOT/$OPTARG
-	dflag=true
-	;;
-   *)
-   	_usage
-	;;
-   esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
-    #
-    # first usage
-    #
-    $MKDIR -p $dir 
-    status=$?
-    if [ $status -eq 0 ]
-    then
-	$CHMOD $DIRMODE $dir
-	status=$?
-    fi
-    if [ $status -eq 0 ]
-    then
-	$CHOWN $OWNER $GROUP $dir
-	status=$?
-    fi
-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
-    #
-    # fourth usage (symlink)
-    #
-    if [ $# -ne 1 ]
-    then
-    	_usage
-    else
-    	target=$DIST_ROOT/$1
-    fi
-    $LN -s -f $symlink $target
-    status=$?
-    $MANIFEST l $symlink ${target#$DIST_ROOT} 
-else
-    list=""
-    dir=""
-    if [ $# -eq 2 ]
-    then
-	#
-	# second usage
-	#
-	f=$1
-	dir=$DIST_ROOT/$2
-	if $Dflag
-	then
-	    mkdir -p `dirname $dir`
-	fi
-	$CP $f $dir
-	status=$?
-	if [ $status -eq 0 ]
-	then 
-	    if [ -f $dir/$f ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    else
-		$CHMOD $FILEMODE $dir
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-	    fi
-	fi
-    else
-	#
-	# third usage
-	#
-	n=1
-	while [ $# -gt 0 ]
-	do
-	    if [ $# -gt 1 ]
-	    then
-		list="$list $1"
-	    else
-		dir=$DIST_ROOT/$1
-	    fi
-	    shift
-	done
-
-	# echo DIR=$dir list=\"$list\"
-	for f in $list
-	do
-	    $CP $f $dir
-	    status=$?
-	    if [ $status -eq 0 ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    fi
-	    [ $status -ne 0 ] && break
-	done
-    fi
-fi
-
-exit $status
-- 
2.12.2.816.g2cccc81164-goog


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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-04-19 23:33                   ` [PATCH v4] " Gwendal Grignou
@ 2017-04-25 13:09                     ` Eryu Guan
  2017-05-08 10:19                       ` Xiao Yang
  2017-04-28 16:27                     ` [PATCH v5] " Gwendal Grignou
  1 sibling, 1 reply; 21+ messages in thread
From: Eryu Guan @ 2017-04-25 13:09 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: fstests

[-- Attachment #1: Type: text/plain, Size: 3624 bytes --]

On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
> - Request LIBTOOL to be used
> - Set topbuildir based on a Makefile variable to call libtool
> - Use /usr/local instead of /var for xfstest final location
> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> - Use autoconf variables @prefix@, @exec_prefix@.
> 
> The regular way of compiling xfstests - make - remains.
> But it now runs autoreconf and libtoolize -i to produce a valid
> configure.
> Verified with 'make install --dry-run' that files are installed at the
> same place.
> Verified compiling in chromeOS chroot works as well.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
> 
> Changes in v2:
> Removal of instal-sh, use of autoreconf
> 
> Changes in v3:
> Use of @exec_prefix@ variable, unify installation location.
> 
> Changes in v4:
> Add --install option to autoreconf so that aclocal is called with -I m4.
> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
> still works.

Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
Fedora 25 hosts.

If all the following changes look OK to you and there're no new comments
from other reviewers on the list, I'm going to push this patch to
upstream this week. So please shout out loud if anyone has any complains :)
(new patch attached)

First, I updated the patch a bit to resolve the merge conflicts with
commit b34b378 src/open_by_handle: program to exercise
open_by_handle_at() syscall, added open_by_handle_at detection in
acinclude.m4

> 
>  Makefile             |   7 +-
>  acinclude.m4         |  30 ++++++
>  aclocal.m4           |  50 ----------
>  configure.ac         |   3 +-
>  include/builddefs.in |   9 +-
>  install-sh           | 259 ---------------------------------------------------
>  6 files changed, 41 insertions(+), 317 deletions(-)
>  create mode 100644 acinclude.m4
>  delete mode 100644 aclocal.m4
>  delete mode 100755 install-sh
> 
> diff --git a/Makefile b/Makefile
> index 30d8747d..d41750ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
>  endif
>  
>  configure: configure.ac
> -	autoheader
> -	autoconf
> +	autoreconf --include=m4
> +	libtoolize -i

Second. This creates some new untracked files, I'd like to add them to
.gitignore too and remove them by running "make realclean", so I made
the following changes.

--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,23 @@
 /results
 
 # autoconf generated files
+/aclocal.m4
 /autom4te.cache
 /configure
+/config.guess
 /config.log
 /config.status
+/config.sub
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+
+# libtool
+/libtool
+/install-sh
+/ltmain.sh

 # build system
 /include/builddefs
diff --git a/Makefile b/Makefile
index 30d8747..ebf5c03 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,13 @@ endif

 SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz

-CONFIGURE = configure include/builddefs include/config.h
+CONFIGURE = configure include/builddefs include/config.h \
+           aclocal.m4 config.guess config.sub install-sh ltmain.sh \
+           m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
+           m4/lt~obsolete.m4
 LSRCFILES = configure configure.ac aclocal.m4 README VERSION
 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
-       conftest* check.log check.time
+       conftest* check.log check.time libtool

 ifeq ($(HAVE_BUILDDEFS), yes)
 LDIRT += $(SRCTAR)


Thanks again!

Eryu

[-- Attachment #2: 0001-build-Code-to-allow-cros-compilation-on-chromeOS.patch --]
[-- Type: text/plain, Size: 14005 bytes --]

>From ee2e2e29533220c8e40c667c53a3302394e087fb Mon Sep 17 00:00:00 2001
From: Gwendal Grignou <gwendal@chromium.org>
Date: Wed, 19 Apr 2017 16:33:48 -0700
Subject: [PATCH] build: Code to allow cros-compilation on chromeOS

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified with 'make install --dry-run' that files are installed at the
same place.
Verified compiling in chromeOS chroot works as well.

[eguan: resolve merge conflicts and update .gitignore and remove
generated files by realclean]

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 .gitignore           |  13 +++
 Makefile             |  14 ++-
 acinclude.m4         |  45 +++++++++
 aclocal.m4           |  65 -------------
 configure.ac         |   3 +-
 include/builddefs.in |   9 +-
 install-sh           | 259 ---------------------------------------------------
 7 files changed, 74 insertions(+), 334 deletions(-)
 create mode 100644 acinclude.m4
 delete mode 100644 aclocal.m4
 delete mode 100755 install-sh

diff --git a/.gitignore b/.gitignore
index ded4a61..c049bef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,10 +9,23 @@
 /results
 
 # autoconf generated files
+/aclocal.m4
 /autom4te.cache
 /configure
+/config.guess
 /config.log
 /config.status
+/config.sub
+/m4/libtool.m4
+/m4/ltoptions.m4
+/m4/ltsugar.m4
+/m4/ltversion.m4
+/m4/lt~obsolete.m4
+
+# libtool
+/libtool
+/install-sh
+/ltmain.sh
 
 # build system
 /include/builddefs
diff --git a/Makefile b/Makefile
index 30d8747..ebf5c03 100644
--- a/Makefile
+++ b/Makefile
@@ -41,10 +41,13 @@ endif
 
 SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz
 
-CONFIGURE = configure include/builddefs include/config.h
+CONFIGURE = configure include/builddefs include/config.h \
+	    aclocal.m4 config.guess config.sub install-sh ltmain.sh \
+	    m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
+	    m4/lt~obsolete.m4
 LSRCFILES = configure configure.ac aclocal.m4 README VERSION
 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
-	conftest* check.log check.time
+	conftest* check.log check.time libtool
 
 ifeq ($(HAVE_BUILDDEFS), yes)
 LDIRT += $(SRCTAR)
@@ -76,12 +79,13 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 configure: configure.ac
-	autoheader
-	autoconf
+	autoreconf --include=m4
+	libtoolize -i
 
 include/builddefs include/config.h: configure
 	./configure \
-                --libexecdir=/usr/lib
+                --libexecdir=/usr/lib \
+                --exec_prefix=/var/lib
 
 aclocal.m4::
 	aclocal --acdir=`pwd`/m4 --output=$@
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..a605c01
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,45 @@
+dnl Copyright (C) 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
+  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
+    AC_SUBST(have_fiemap)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
+  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
+    AC_SUBST(have_prctl)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
+  [ AC_CHECK_HEADER([linux/fs.h])
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
+  [ AC_MSG_CHECKING([for fallocate])
+    AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+#include <linux/falloc.h> ],
+      [ fallocate(0, 0, 0, 0); ],
+      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
+      [ have_fallocate=false; AC_MSG_RESULT(no) ])
+    AC_SUBST(have_fallocate)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
+  [ AC_MSG_CHECKING([for open_by_handle_at])
+    AC_TRY_LINK([
+#define _GNU_SOURCE
+#include <fcntl.h>
+      ],
+      [
+          struct file_handle fh;
+          open_by_handle_at(0, &fh, 0);
+      ],
+      [ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],
+      [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
+    AC_SUBST(have_open_by_handle_at)
+  ])
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644
index 829fa10..0000000
--- a/aclocal.m4
+++ /dev/null
@@ -1,65 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
-  [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
-    AC_SUBST(have_fiemap)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_PRCTL_H],
-  [ AC_CHECK_HEADERS([sys/prctl.h], [ have_prctl=true ], [ have_prctl=false ])
-    AC_SUBST(have_prctl)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_LINUX_FS_H],
-  [ AC_CHECK_HEADER([linux/fs.h])
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE],
-  [ AC_MSG_CHECKING([for fallocate])
-    AC_TRY_LINK([
-#define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
-#include <fcntl.h>
-#include <linux/falloc.h> ],
-      [ fallocate(0, 0, 0, 0); ],
-      [ have_fallocate=true; AC_MSG_RESULT(yes) ],
-      [ have_fallocate=false; AC_MSG_RESULT(no) ])
-    AC_SUBST(have_fallocate)
-  ])
-
-AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
-  [ AC_MSG_CHECKING([for open_by_handle_at])
-    AC_TRY_LINK([
-#define _GNU_SOURCE
-#include <fcntl.h>
-      ],
-      [
-          struct file_handle fh;
-          open_by_handle_at(0, &fh, 0);
-      ],
-      [ have_open_by_handle_at=true; AC_MSG_RESULT(yes) ],
-      [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
-    AC_SUBST(have_open_by_handle_at)
-  ])
-m4_include([m4/multilib.m4])
-m4_include([m4/package_acldev.m4])
-m4_include([m4/package_aiodev.m4])
-m4_include([m4/package_attrdev.m4])
-m4_include([m4/package_dmapidev.m4])
-m4_include([m4/package_gdbmdev.m4])
-m4_include([m4/package_globals.m4])
-m4_include([m4/package_ssldev.m4])
-m4_include([m4/package_utilies.m4])
-m4_include([m4/package_uuiddev.m4])
-m4_include([m4/package_xfslibs.m4])
diff --git a/configure.ac b/configure.ac
index 1285bf4..5ddaadc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([xfstests], [1.1.1])
-AC_PREREQ(2.50)
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT
 AC_CONFIG_SRCDIR([src/xfsctl.c])
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
diff --git a/include/builddefs.in b/include/builddefs.in
index 2725037..952a3e0 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -7,6 +7,8 @@
 ifndef _BUILDDEFS_INCLUDED_
 _BUILDDEFS_INCLUDED_ = 1
 
+top_builddir=$(TOPDIR)
+
 DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
@@ -24,6 +26,7 @@ LIBUUID = @libuuid@
 LIBHANDLE = @libhdl@
 LIBDM = @libdm@
 LIBTEST = $(TOPDIR)/lib/libtest.la
+prefix = @prefix@
 
 PKG_NAME        = @pkg_name@
 PKG_USER        = @pkg_user@
@@ -32,10 +35,8 @@ PKG_RELEASE     = @pkg_release@
 PKG_VERSION     = @pkg_version@
 PKG_PLATFORM    = @pkg_platform@
 PKG_DISTRIBUTION= @pkg_distribution@
-PKG_SBIN_DIR    = @sbindir@
-# A bit of a hack; by rights only state should probably go here
-# But for now ...
-PKG_LIB_DIR     = /var/lib/@pkg_name@
+PKG_LIB_DIR     = $(DESTDIR)@exec_prefix@/@pkg_name@
+
 
 CC              = @cc@
 AWK             = @awk@
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 58e7b58..0000000
--- a/install-sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-#                  information in the following format:
-#                  File     :  f mode owner group src target
-#                  Directory:  d mode owner group target
-#                  Symlink  :  l linkval target
-#
-# $DIST_ROOT     - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
-# -----------------------------+--------------------------
-#       not set       not set  |    yes        no
-#       not set       set      |    yes        no
-#       set           not set  |    no         yes
-#       set           set      |    yes        yes
-#
-_usage() {
-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-    echo "or     $prog -S file target  (creates \"target\" symlink)"
-    echo ""
-    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-    echo "behaviour of this command - see comments in the script."
-    echo "The -D flag is only available for the second usage, and causes"
-    echo "the target directory to be created before installing the file."
-    echo ""
-    exit 1
-}
-
-_chown ()
-{
-    _st=255
-    if [ $# -eq 3 ] ; then
-	chown $1:$2 $3
-	_st=$?
-	if [ $_st -ne 0 ] ; then
-	    if [ $REAL_UID != '0' ] ; then
-		if [ ! -f $DIST_ROOT/.chown.quite ] ; then
-		    echo '==============================================='
-		    echo Ownership of files under ${DIST_ROOT:-/}
-		    echo cannot be changed
-		    echo '==============================================='
-		    if [ -n "$DIST_ROOT" ] ; then
-			touch $DIST_ROOT/.chown.quite
-		    fi
-		fi
-	       _st=0
-	    fi     
-	fi
-    fi
-
-    return $_st
-}
-
-
-_manifest ()
-{ 
-    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:" c $*
-do
-   case $c in
-   c)
-	;;
-   g)
-	GROUP=$OPTARG
-	;;
-   o)
-	OWNER=$OPTARG
-	;;
-   m)
-	DIRMODE=`expr $OPTARG`
-	FILEMODE=$DIRMODE
-	;;
-   D) 
-	Dflag=true
-	;;
-   S) 
-	symlink=$OPTARG
-	Sflag=true
-	;;
-   d) 
-	dir=$DIST_ROOT/$OPTARG
-	dflag=true
-	;;
-   *)
-   	_usage
-	;;
-   esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
-    #
-    # first usage
-    #
-    $MKDIR -p $dir 
-    status=$?
-    if [ $status -eq 0 ]
-    then
-	$CHMOD $DIRMODE $dir
-	status=$?
-    fi
-    if [ $status -eq 0 ]
-    then
-	$CHOWN $OWNER $GROUP $dir
-	status=$?
-    fi
-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
-    #
-    # fourth usage (symlink)
-    #
-    if [ $# -ne 1 ]
-    then
-    	_usage
-    else
-    	target=$DIST_ROOT/$1
-    fi
-    $LN -s -f $symlink $target
-    status=$?
-    $MANIFEST l $symlink ${target#$DIST_ROOT} 
-else
-    list=""
-    dir=""
-    if [ $# -eq 2 ]
-    then
-	#
-	# second usage
-	#
-	f=$1
-	dir=$DIST_ROOT/$2
-	if $Dflag
-	then
-	    mkdir -p `dirname $dir`
-	fi
-	$CP $f $dir
-	status=$?
-	if [ $status -eq 0 ]
-	then 
-	    if [ -f $dir/$f ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    else
-		$CHMOD $FILEMODE $dir
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-	    fi
-	fi
-    else
-	#
-	# third usage
-	#
-	n=1
-	while [ $# -gt 0 ]
-	do
-	    if [ $# -gt 1 ]
-	    then
-		list="$list $1"
-	    else
-		dir=$DIST_ROOT/$1
-	    fi
-	    shift
-	done
-
-	# echo DIR=$dir list=\"$list\"
-	for f in $list
-	do
-	    $CP $f $dir
-	    status=$?
-	    if [ $status -eq 0 ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    fi
-	    [ $status -ne 0 ] && break
-	done
-    fi
-fi
-
-exit $status
-- 
1.8.3.1


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

* [PATCH v5] Code to allow cros-compilation on chromeOS
  2017-04-19 23:33                   ` [PATCH v4] " Gwendal Grignou
  2017-04-25 13:09                     ` Eryu Guan
@ 2017-04-28 16:27                     ` Gwendal Grignou
  2017-04-28 16:58                       ` Gwendal Grignou
  1 sibling, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-28 16:27 UTC (permalink / raw)
  To: eguan; +Cc: fstests

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains.
But it now runs autoreconf and libtoolize -i to produce a valid
configure.
Verified with 'make install --dry-run' that files are installed at the
same place.
Verified compiling in chromeOS chroot works as well.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---

Changes in v2:
Removal of instal-sh, use of autoreconf

Changes in v3:
Use of @exec_prefix@ variable, unify installation location.

Changes in v4:
Add --install option to autoreconf so that aclocal is called with -I m4.
Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
still works.

Changes in v5:
Rebase, move new changes from aclocal.m4 to acinclue.m4.

 Makefile                   |   7 +-
 aclocal.m4 => acinclude.m4 |  28 +----
 configure.ac               |   3 +-
 include/builddefs.in       |   9 +-
 install-sh                 | 259 ---------------------------------------------
 5 files changed, 15 insertions(+), 291 deletions(-)
 rename aclocal.m4 => acinclude.m4 (53%)
 delete mode 100755 install-sh

diff --git a/Makefile b/Makefile
index 30d8747d..d41750ab 100644
--- a/Makefile
+++ b/Makefile
@@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 configure: configure.ac
-	autoheader
-	autoconf
+	autoreconf --include=m4
+	libtoolize -i
 
 include/builddefs include/config.h: configure
 	./configure \
-                --libexecdir=/usr/lib
+                --libexecdir=/usr/lib \
+                --exec_prefix=/var/lib
 
 aclocal.m4::
 	aclocal --acdir=`pwd`/m4 --output=$@
diff --git a/aclocal.m4 b/acinclude.m4
similarity index 53%
rename from aclocal.m4
rename to acinclude.m4
index 829fa101..a605c01c 100644
--- a/aclocal.m4
+++ b/acinclude.m4
@@ -1,16 +1,7 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
+dnl Copyright (C) 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
   [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
     AC_SUBST(have_fiemap)
@@ -52,14 +43,3 @@ AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
       [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
     AC_SUBST(have_open_by_handle_at)
   ])
-m4_include([m4/multilib.m4])
-m4_include([m4/package_acldev.m4])
-m4_include([m4/package_aiodev.m4])
-m4_include([m4/package_attrdev.m4])
-m4_include([m4/package_dmapidev.m4])
-m4_include([m4/package_gdbmdev.m4])
-m4_include([m4/package_globals.m4])
-m4_include([m4/package_ssldev.m4])
-m4_include([m4/package_utilies.m4])
-m4_include([m4/package_uuiddev.m4])
-m4_include([m4/package_xfslibs.m4])
diff --git a/configure.ac b/configure.ac
index 1285bf4e..5ddaadc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,6 @@
 AC_INIT([xfstests], [1.1.1])
-AC_PREREQ(2.50)
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT
 AC_CONFIG_SRCDIR([src/xfsctl.c])
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
diff --git a/include/builddefs.in b/include/builddefs.in
index 27250371..952a3e03 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -7,6 +7,8 @@
 ifndef _BUILDDEFS_INCLUDED_
 _BUILDDEFS_INCLUDED_ = 1
 
+top_builddir=$(TOPDIR)
+
 DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
@@ -24,6 +26,7 @@ LIBUUID = @libuuid@
 LIBHANDLE = @libhdl@
 LIBDM = @libdm@
 LIBTEST = $(TOPDIR)/lib/libtest.la
+prefix = @prefix@
 
 PKG_NAME        = @pkg_name@
 PKG_USER        = @pkg_user@
@@ -32,10 +35,8 @@ PKG_RELEASE     = @pkg_release@
 PKG_VERSION     = @pkg_version@
 PKG_PLATFORM    = @pkg_platform@
 PKG_DISTRIBUTION= @pkg_distribution@
-PKG_SBIN_DIR    = @sbindir@
-# A bit of a hack; by rights only state should probably go here
-# But for now ...
-PKG_LIB_DIR     = /var/lib/@pkg_name@
+PKG_LIB_DIR     = $(DESTDIR)@exec_prefix@/@pkg_name@
+
 
 CC              = @cc@
 AWK             = @awk@
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 58e7b586..00000000
--- a/install-sh
+++ /dev/null
@@ -1,259 +0,0 @@
-#! /bin/bash
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-#                  information in the following format:
-#                  File     :  f mode owner group src target
-#                  Directory:  d mode owner group target
-#                  Symlink  :  l linkval target
-#
-# $DIST_ROOT     - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
-# -----------------------------+--------------------------
-#       not set       not set  |    yes        no
-#       not set       set      |    yes        no
-#       set           not set  |    no         yes
-#       set           set      |    yes        yes
-#
-_usage() {
-    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
-    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
-    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
-    echo "or     $prog -S file target  (creates \"target\" symlink)"
-    echo ""
-    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
-    echo "behaviour of this command - see comments in the script."
-    echo "The -D flag is only available for the second usage, and causes"
-    echo "the target directory to be created before installing the file."
-    echo ""
-    exit 1
-}
-
-_chown ()
-{
-    _st=255
-    if [ $# -eq 3 ] ; then
-	chown $1:$2 $3
-	_st=$?
-	if [ $_st -ne 0 ] ; then
-	    if [ $REAL_UID != '0' ] ; then
-		if [ ! -f $DIST_ROOT/.chown.quite ] ; then
-		    echo '==============================================='
-		    echo Ownership of files under ${DIST_ROOT:-/}
-		    echo cannot be changed
-		    echo '==============================================='
-		    if [ -n "$DIST_ROOT" ] ; then
-			touch $DIST_ROOT/.chown.quite
-		    fi
-		fi
-	       _st=0
-	    fi     
-	fi
-    fi
-
-    return $_st
-}
-
-
-_manifest ()
-{ 
-    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
-    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
-    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:" c $*
-do
-   case $c in
-   c)
-	;;
-   g)
-	GROUP=$OPTARG
-	;;
-   o)
-	OWNER=$OPTARG
-	;;
-   m)
-	DIRMODE=`expr $OPTARG`
-	FILEMODE=$DIRMODE
-	;;
-   D) 
-	Dflag=true
-	;;
-   S) 
-	symlink=$OPTARG
-	Sflag=true
-	;;
-   d) 
-	dir=$DIST_ROOT/$OPTARG
-	dflag=true
-	;;
-   *)
-   	_usage
-	;;
-   esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
-    #
-    # first usage
-    #
-    $MKDIR -p $dir 
-    status=$?
-    if [ $status -eq 0 ]
-    then
-	$CHMOD $DIRMODE $dir
-	status=$?
-    fi
-    if [ $status -eq 0 ]
-    then
-	$CHOWN $OWNER $GROUP $dir
-	status=$?
-    fi
-    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
-    #
-    # fourth usage (symlink)
-    #
-    if [ $# -ne 1 ]
-    then
-    	_usage
-    else
-    	target=$DIST_ROOT/$1
-    fi
-    $LN -s -f $symlink $target
-    status=$?
-    $MANIFEST l $symlink ${target#$DIST_ROOT} 
-else
-    list=""
-    dir=""
-    if [ $# -eq 2 ]
-    then
-	#
-	# second usage
-	#
-	f=$1
-	dir=$DIST_ROOT/$2
-	if $Dflag
-	then
-	    mkdir -p `dirname $dir`
-	fi
-	$CP $f $dir
-	status=$?
-	if [ $status -eq 0 ]
-	then 
-	    if [ -f $dir/$f ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    else
-		$CHMOD $FILEMODE $dir
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
-	    fi
-	fi
-    else
-	#
-	# third usage
-	#
-	n=1
-	while [ $# -gt 0 ]
-	do
-	    if [ $# -gt 1 ]
-	    then
-		list="$list $1"
-	    else
-		dir=$DIST_ROOT/$1
-	    fi
-	    shift
-	done
-
-	# echo DIR=$dir list=\"$list\"
-	for f in $list
-	do
-	    $CP $f $dir
-	    status=$?
-	    if [ $status -eq 0 ]
-	    then
-		$CHMOD $FILEMODE $dir/$f
-		status=$?
-		if [ $status -eq 0 ]
-		then
-		    $CHOWN $OWNER $GROUP $dir/$f
-		    status=$?
-		fi
-		$MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
-	    fi
-	    [ $status -ne 0 ] && break
-	done
-    fi
-fi
-
-exit $status
-- 
2.13.0.rc0.306.g87b477812d-goog


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

* Re: [PATCH v5] Code to allow cros-compilation on chromeOS
  2017-04-28 16:27                     ` [PATCH v5] " Gwendal Grignou
@ 2017-04-28 16:58                       ` Gwendal Grignou
  0 siblings, 0 replies; 21+ messages in thread
From: Gwendal Grignou @ 2017-04-28 16:58 UTC (permalink / raw)
  To: Eryu Guan, fstests

Ignore v5, I did not see your comment.

Your patch is:
    Tested-by: Gwendal Grignou <gwendal@chromium.org>

On Fri, Apr 28, 2017 at 9:27 AM, Gwendal Grignou <gwendal@chromium.org> wrote:
> - Request LIBTOOL to be used
> - Set topbuildir based on a Makefile variable to call libtool
> - Use /usr/local instead of /var for xfstest final location
> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> - Use autoconf variables @prefix@, @exec_prefix@.
>
> The regular way of compiling xfstests - make - remains.
> But it now runs autoreconf and libtoolize -i to produce a valid
> configure.
> Verified with 'make install --dry-run' that files are installed at the
> same place.
> Verified compiling in chromeOS chroot works as well.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
>
> Changes in v2:
> Removal of instal-sh, use of autoreconf
>
> Changes in v3:
> Use of @exec_prefix@ variable, unify installation location.
>
> Changes in v4:
> Add --install option to autoreconf so that aclocal is called with -I m4.
> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
> still works.
>
> Changes in v5:
> Rebase, move new changes from aclocal.m4 to acinclue.m4.
>
>  Makefile                   |   7 +-
>  aclocal.m4 => acinclude.m4 |  28 +----
>  configure.ac               |   3 +-
>  include/builddefs.in       |   9 +-
>  install-sh                 | 259 ---------------------------------------------
>  5 files changed, 15 insertions(+), 291 deletions(-)
>  rename aclocal.m4 => acinclude.m4 (53%)
>  delete mode 100755 install-sh
>
> diff --git a/Makefile b/Makefile
> index 30d8747d..d41750ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
>  endif
>
>  configure: configure.ac
> -       autoheader
> -       autoconf
> +       autoreconf --include=m4
> +       libtoolize -i
>
>  include/builddefs include/config.h: configure
>         ./configure \
> -                --libexecdir=/usr/lib
> +                --libexecdir=/usr/lib \
> +                --exec_prefix=/var/lib
>
>  aclocal.m4::
>         aclocal --acdir=`pwd`/m4 --output=$@
> diff --git a/aclocal.m4 b/acinclude.m4
> similarity index 53%
> rename from aclocal.m4
> rename to acinclude.m4
> index 829fa101..a605c01c 100644
> --- a/aclocal.m4
> +++ b/acinclude.m4
> @@ -1,16 +1,7 @@
> -# generated automatically by aclocal 1.11 -*- Autoconf -*-
> -
> -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
> -# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
> -# This file is free software; the Free Software Foundation
> -# gives unlimited permission to copy and/or distribute it,
> -# with or without modifications, as long as this notice is preserved.
> -
> -# This program is distributed in the hope that it will be useful,
> -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
> -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
> -# PARTICULAR PURPOSE.
> -
> +dnl Copyright (C) 2016 Free Software Foundation, Inc.
> +dnl This file is free software; the Free Software Foundation
> +dnl gives unlimited permission to copy and/or distribute it,
> +dnl with or without modifications, as long as this notice is preserved.
>  AC_DEFUN([AC_PACKAGE_WANT_LINUX_FIEMAP_H],
>    [ AC_CHECK_HEADERS([linux/fiemap.h], [ have_fiemap=true ], [ have_fiemap=false ])
>      AC_SUBST(have_fiemap)
> @@ -52,14 +43,3 @@ AC_DEFUN([AC_PACKAGE_WANT_OPEN_BY_HANDLE_AT],
>        [ have_open_by_handle_at=false; AC_MSG_RESULT(no) ])
>      AC_SUBST(have_open_by_handle_at)
>    ])
> -m4_include([m4/multilib.m4])
> -m4_include([m4/package_acldev.m4])
> -m4_include([m4/package_aiodev.m4])
> -m4_include([m4/package_attrdev.m4])
> -m4_include([m4/package_dmapidev.m4])
> -m4_include([m4/package_gdbmdev.m4])
> -m4_include([m4/package_globals.m4])
> -m4_include([m4/package_ssldev.m4])
> -m4_include([m4/package_utilies.m4])
> -m4_include([m4/package_uuiddev.m4])
> -m4_include([m4/package_xfslibs.m4])
> diff --git a/configure.ac b/configure.ac
> index 1285bf4e..5ddaadc2 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,6 @@
>  AC_INIT([xfstests], [1.1.1])
> -AC_PREREQ(2.50)
> +AC_CONFIG_MACRO_DIR([m4])
> +LT_INIT
>  AC_CONFIG_SRCDIR([src/xfsctl.c])
>  AC_PACKAGE_GLOBALS(xfstests)
>  AC_PACKAGE_UTILITIES(xfstests)
> diff --git a/include/builddefs.in b/include/builddefs.in
> index 27250371..952a3e03 100644
> --- a/include/builddefs.in
> +++ b/include/builddefs.in
> @@ -7,6 +7,8 @@
>  ifndef _BUILDDEFS_INCLUDED_
>  _BUILDDEFS_INCLUDED_ = 1
>
> +top_builddir=$(TOPDIR)
> +
>  DEBUG = @debug_build@
>  OPTIMIZER = @opt_build@
>  MALLOCLIB = @malloc_lib@
> @@ -24,6 +26,7 @@ LIBUUID = @libuuid@
>  LIBHANDLE = @libhdl@
>  LIBDM = @libdm@
>  LIBTEST = $(TOPDIR)/lib/libtest.la
> +prefix = @prefix@
>
>  PKG_NAME        = @pkg_name@
>  PKG_USER        = @pkg_user@
> @@ -32,10 +35,8 @@ PKG_RELEASE     = @pkg_release@
>  PKG_VERSION     = @pkg_version@
>  PKG_PLATFORM    = @pkg_platform@
>  PKG_DISTRIBUTION= @pkg_distribution@
> -PKG_SBIN_DIR    = @sbindir@
> -# A bit of a hack; by rights only state should probably go here
> -# But for now ...
> -PKG_LIB_DIR     = /var/lib/@pkg_name@
> +PKG_LIB_DIR     = $(DESTDIR)@exec_prefix@/@pkg_name@
> +
>
>  CC              = @cc@
>  AWK             = @awk@
> diff --git a/install-sh b/install-sh
> deleted file mode 100755
> index 58e7b586..00000000
> --- a/install-sh
> +++ /dev/null
> @@ -1,259 +0,0 @@
> -#! /bin/bash
> -#
> -# Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
> -#
> -# This program is free software; you can redistribute it and/or
> -# modify it under the terms of the GNU General Public License as
> -# published by the Free Software Foundation.
> -#
> -# This program is distributed in the hope that it would be useful,
> -# but WITHOUT ANY WARRANTY; without even the implied warranty of
> -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -# GNU General Public License for more details.
> -#
> -# You should have received a copy of the GNU General Public License
> -# along with this program; if not, write the Free Software Foundation,
> -# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> -#
> -#
> -# This script emulates bsd install and also recognises
> -# two environment variables, with the following semantics :-
> -#
> -# $DIST_MANIFEST - if set, the name of the file to append manifest
> -#                  information in the following format:
> -#                  File     :  f mode owner group src target
> -#                  Directory:  d mode owner group target
> -#                  Symlink  :  l linkval target
> -#
> -# $DIST_ROOT     - if set, prepend to target
> -#
> -# The sematics of all combinations of these two variables
> -# are as follows:
> -#
> -# $DIST_MANIFEST?  $DIST_ROOT? |   Copy?  Append Manifest?
> -# -----------------------------+--------------------------
> -#       not set       not set  |    yes        no
> -#       not set       set      |    yes        no
> -#       set           not set  |    no         yes
> -#       set           set      |    yes        yes
> -#
> -_usage() {
> -    echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
> -    echo "or     $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
> -    echo "or     $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
> -    echo "or     $prog -S file target  (creates \"target\" symlink)"
> -    echo ""
> -    echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
> -    echo "behaviour of this command - see comments in the script."
> -    echo "The -D flag is only available for the second usage, and causes"
> -    echo "the target directory to be created before installing the file."
> -    echo ""
> -    exit 1
> -}
> -
> -_chown ()
> -{
> -    _st=255
> -    if [ $# -eq 3 ] ; then
> -       chown $1:$2 $3
> -       _st=$?
> -       if [ $_st -ne 0 ] ; then
> -           if [ $REAL_UID != '0' ] ; then
> -               if [ ! -f $DIST_ROOT/.chown.quite ] ; then
> -                   echo '==============================================='
> -                   echo Ownership of files under ${DIST_ROOT:-/}
> -                   echo cannot be changed
> -                   echo '==============================================='
> -                   if [ -n "$DIST_ROOT" ] ; then
> -                       touch $DIST_ROOT/.chown.quite
> -                   fi
> -               fi
> -              _st=0
> -           fi
> -       fi
> -    fi
> -
> -    return $_st
> -}
> -
> -
> -_manifest ()
> -{
> -    echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
> -}
> -
> -prog=`basename $0`
> -HERE=`pwd`
> -dflag=false
> -Dflag=false
> -Sflag=false
> -DIRMODE=755
> -FILEMODE=644
> -OWNER=`id -u`
> -GROUP=`id -g`
> -REAL_UID=$OWNER
> -
> -# default is to install and don't append manifest
> -INSTALL=true
> -MANIFEST=:
> -
> -: ${DIST_ROOT:=${DESTDIR}}
> -
> -[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
> -[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
> -
> -[ $# -eq 0 ] && _usage
> -
> -if $INSTALL
> -then
> -    CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
> -else
> -    CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
> -fi
> -
> -[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
> -
> -while getopts "Dcm:d:S:o:g:" c $*
> -do
> -   case $c in
> -   c)
> -       ;;
> -   g)
> -       GROUP=$OPTARG
> -       ;;
> -   o)
> -       OWNER=$OPTARG
> -       ;;
> -   m)
> -       DIRMODE=`expr $OPTARG`
> -       FILEMODE=$DIRMODE
> -       ;;
> -   D)
> -       Dflag=true
> -       ;;
> -   S)
> -       symlink=$OPTARG
> -       Sflag=true
> -       ;;
> -   d)
> -       dir=$DIST_ROOT/$OPTARG
> -       dflag=true
> -       ;;
> -   *)
> -       _usage
> -       ;;
> -   esac
> -done
> -
> -shift `expr $OPTIND - 1`
> -
> -status=0
> -if $dflag
> -then
> -    #
> -    # first usage
> -    #
> -    $MKDIR -p $dir
> -    status=$?
> -    if [ $status -eq 0 ]
> -    then
> -       $CHMOD $DIRMODE $dir
> -       status=$?
> -    fi
> -    if [ $status -eq 0 ]
> -    then
> -       $CHOWN $OWNER $GROUP $dir
> -       status=$?
> -    fi
> -    $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
> -elif $Sflag
> -then
> -    #
> -    # fourth usage (symlink)
> -    #
> -    if [ $# -ne 1 ]
> -    then
> -       _usage
> -    else
> -       target=$DIST_ROOT/$1
> -    fi
> -    $LN -s -f $symlink $target
> -    status=$?
> -    $MANIFEST l $symlink ${target#$DIST_ROOT}
> -else
> -    list=""
> -    dir=""
> -    if [ $# -eq 2 ]
> -    then
> -       #
> -       # second usage
> -       #
> -       f=$1
> -       dir=$DIST_ROOT/$2
> -       if $Dflag
> -       then
> -           mkdir -p `dirname $dir`
> -       fi
> -       $CP $f $dir
> -       status=$?
> -       if [ $status -eq 0 ]
> -       then
> -           if [ -f $dir/$f ]
> -           then
> -               $CHMOD $FILEMODE $dir/$f
> -               status=$?
> -               if [ $status -eq 0 ]
> -               then
> -                   $CHOWN $OWNER $GROUP $dir/$f
> -                   status=$?
> -               fi
> -               $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
> -           else
> -               $CHMOD $FILEMODE $dir
> -               status=$?
> -               if [ $status -eq 0 ]
> -               then
> -                   $CHOWN $OWNER $GROUP $dir
> -                   status=$?
> -               fi
> -               $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
> -           fi
> -       fi
> -    else
> -       #
> -       # third usage
> -       #
> -       n=1
> -       while [ $# -gt 0 ]
> -       do
> -           if [ $# -gt 1 ]
> -           then
> -               list="$list $1"
> -           else
> -               dir=$DIST_ROOT/$1
> -           fi
> -           shift
> -       done
> -
> -       # echo DIR=$dir list=\"$list\"
> -       for f in $list
> -       do
> -           $CP $f $dir
> -           status=$?
> -           if [ $status -eq 0 ]
> -           then
> -               $CHMOD $FILEMODE $dir/$f
> -               status=$?
> -               if [ $status -eq 0 ]
> -               then
> -                   $CHOWN $OWNER $GROUP $dir/$f
> -                   status=$?
> -               fi
> -               $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
> -           fi
> -           [ $status -ne 0 ] && break
> -       done
> -    fi
> -fi
> -
> -exit $status
> --
> 2.13.0.rc0.306.g87b477812d-goog
>

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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-04-25 13:09                     ` Eryu Guan
@ 2017-05-08 10:19                       ` Xiao Yang
  2017-05-08 10:50                         ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Xiao Yang @ 2017-05-08 10:19 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Gwendal Grignou, fstests

On 2017/04/25 21:09, Eryu Guan wrote:
> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>> - Request LIBTOOL to be used
>> - Set topbuildir based on a Makefile variable to call libtool
>> - Use /usr/local instead of /var for xfstest final location
>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
>> - Use autoconf variables @prefix@, @exec_prefix@.
>>
>> The regular way of compiling xfstests - make - remains.
>> But it now runs autoreconf and libtoolize -i to produce a valid
>> configure.
>> Verified with 'make install --dry-run' that files are installed at the
>> same place.
>> Verified compiling in chromeOS chroot works as well.
>>
>> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
>> ---
>>
>> Changes in v2:
>> Removal of instal-sh, use of autoreconf
>>
>> Changes in v3:
>> Use of @exec_prefix@ variable, unify installation location.
>>
>> Changes in v4:
>> Add --install option to autoreconf so that aclocal is called with -I m4.
>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
>> still works.
> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
> Fedora 25 hosts.
>
Hi Eryu

When appling v4 patch, i still got the following error messgae on RHEL6.9GA:
============================================================================
[root@RHEL6U9GA_Intel64 xfstests]# make
autoreconf --include=m4
configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
configure.ac:43: error: possibly undefined macro:
AC_PACKAGE_NEED_UUIDCOMPARE
configure.ac:48: error: possibly undefined macro: AC_PACKAGE_NEED_SYS_ACL_H
configure.ac:49: error: possibly undefined macro:
AC_PACKAGE_NEED_ATTRIBUTES_H
configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
configure.ac:51: error: possibly undefined macro:
AC_PACKAGE_NEED_IRIX_LIBHANDLE
configure.ac:56: error: possibly undefined macro: AC_MULTILIB
configure.ac:57: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XFS_H
configure.ac:58: error: possibly undefined macro: AC_PACKAGE_WANT_LIBXFS_H
configure.ac:59: error: possibly undefined macro:
AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
configure.ac:60: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XQM_H
configure.ac:61: error: possibly undefined macro:
AC_PACKAGE_NEED_XFSCTL_MACRO
configure.ac:62: error: possibly undefined macro:
AC_PACKAGE_NEED_XFS_HANDLE_H
configure.ac:64: error: possibly undefined macro:
AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
configure.ac:65: error: possibly undefined macro:
AC_PACKAGE_NEED_ATTR_XATTR_H
configure.ac:67: error: possibly undefined macro:
AC_PACKAGE_WANT_ATTRLIST_LIBATTR
configure.ac:68: error: possibly undefined macro:
AC_PACKAGE_NEED_GETXATTR_LIBATTR
configure.ac:71: error: possibly undefined macro:
AC_PACKAGE_NEED_ACL_LIBACL_H
configure.ac:72: error: possibly undefined macro:
AC_PACKAGE_NEED_ACLINIT_LIBACL
configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
autoreconf: /usr/bin/autoconf failed with exit status: 1
make: *** [configure] Error 1
[root@RHEL6U9GA_Intel64 xfstests]# uname -r
2.6.32-696.el6.x86_64
[root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
automake-1.11.1-4.el6.noarch
autoconf-2.63-5.1.el6.noarch
m4-1.4.13-5.el6.x86_64
libtool-2.2.6-15.5.el6.x86_64
============================================================================

autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
do you have the same issue?

Thanks,
Xiao Yang
> If all the following changes look OK to you and there're no new comments
> from other reviewers on the list, I'm going to push this patch to
> upstream this week. So please shout out loud if anyone has any complains :)
> (new patch attached)
>
> First, I updated the patch a bit to resolve the merge conflicts with
> commit b34b378 src/open_by_handle: program to exercise
> open_by_handle_at() syscall, added open_by_handle_at detection in
> acinclude.m4
>
>>  Makefile             |   7 +-
>>  acinclude.m4         |  30 ++++++
>>  aclocal.m4           |  50 ----------
>>  configure.ac         |   3 +-
>>  include/builddefs.in |   9 +-
>>  install-sh           | 259 ---------------------------------------------------
>>  6 files changed, 41 insertions(+), 317 deletions(-)
>>  create mode 100644 acinclude.m4
>>  delete mode 100644 aclocal.m4
>>  delete mode 100755 install-sh
>>
>> diff --git a/Makefile b/Makefile
>> index 30d8747d..d41750ab 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -76,12 +76,13 @@ clean:  # if configure hasn't run, nothing to clean
>>  endif
>>  
>>  configure: configure.ac
>> -	autoheader
>> -	autoconf
>> +	autoreconf --include=m4
>> +	libtoolize -i
> Second. This creates some new untracked files, I'd like to add them to
> .gitignore too and remove them by running "make realclean", so I made
> the following changes.
>
> --- a/.gitignore
> +++ b/.gitignore
> @@ -9,10 +9,23 @@
>  /results
>  
>  # autoconf generated files
> +/aclocal.m4
>  /autom4te.cache
>  /configure
> +/config.guess
>  /config.log
>  /config.status
> +/config.sub
> +/m4/libtool.m4
> +/m4/ltoptions.m4
> +/m4/ltsugar.m4
> +/m4/ltversion.m4
> +/m4/lt~obsolete.m4
> +
> +# libtool
> +/libtool
> +/install-sh
> +/ltmain.sh
>
>  # build system
>  /include/builddefs
> diff --git a/Makefile b/Makefile
> index 30d8747..ebf5c03 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -41,10 +41,13 @@ endif
>
>  SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz
>
> -CONFIGURE = configure include/builddefs include/config.h
> +CONFIGURE = configure include/builddefs include/config.h \
> +           aclocal.m4 config.guess config.sub install-sh ltmain.sh \
> +           m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
> +           m4/lt~obsolete.m4
>  LSRCFILES = configure configure.ac aclocal.m4 README VERSION
>  LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
> -       conftest* check.log check.time
> +       conftest* check.log check.time libtool
>
>  ifeq ($(HAVE_BUILDDEFS), yes)
>  LDIRT += $(SRCTAR)
>
>
> Thanks again!
>
> Eryu
>
>




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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-08 10:19                       ` Xiao Yang
@ 2017-05-08 10:50                         ` Eryu Guan
  2017-05-08 11:19                           ` Xiao Yang
  2017-05-09  7:12                           ` Xiao Yang
  0 siblings, 2 replies; 21+ messages in thread
From: Eryu Guan @ 2017-05-08 10:50 UTC (permalink / raw)
  To: Xiao Yang; +Cc: Gwendal Grignou, fstests

On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
> On 2017/04/25 21:09, Eryu Guan wrote:
> > On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
> >> - Request LIBTOOL to be used
> >> - Set topbuildir based on a Makefile variable to call libtool
> >> - Use /usr/local instead of /var for xfstest final location
> >> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
> >> - Use autoconf variables @prefix@, @exec_prefix@.
> >>
> >> The regular way of compiling xfstests - make - remains.
> >> But it now runs autoreconf and libtoolize -i to produce a valid
> >> configure.
> >> Verified with 'make install --dry-run' that files are installed at the
> >> same place.
> >> Verified compiling in chromeOS chroot works as well.
> >>
> >> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> >> ---
> >>
> >> Changes in v2:
> >> Removal of instal-sh, use of autoreconf
> >>
> >> Changes in v3:
> >> Use of @exec_prefix@ variable, unify installation location.
> >>
> >> Changes in v4:
> >> Add --install option to autoreconf so that aclocal is called with -I m4.
> >> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
> >> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
> >> still works.
> > Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
> > Fedora 25 hosts.
> >
> Hi Eryu
> 
> When appling v4 patch, i still got the following error messgae on RHEL6.9GA:
> ============================================================================
> [root@RHEL6U9GA_Intel64 xfstests]# make
> autoreconf --include=m4
> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
> configure.ac:43: error: possibly undefined macro:
> AC_PACKAGE_NEED_UUIDCOMPARE
> configure.ac:48: error: possibly undefined macro: AC_PACKAGE_NEED_SYS_ACL_H
> configure.ac:49: error: possibly undefined macro:
> AC_PACKAGE_NEED_ATTRIBUTES_H
> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
> configure.ac:51: error: possibly undefined macro:
> AC_PACKAGE_NEED_IRIX_LIBHANDLE
> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
> configure.ac:57: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XFS_H
> configure.ac:58: error: possibly undefined macro: AC_PACKAGE_WANT_LIBXFS_H
> configure.ac:59: error: possibly undefined macro:
> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
> configure.ac:60: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XQM_H
> configure.ac:61: error: possibly undefined macro:
> AC_PACKAGE_NEED_XFSCTL_MACRO
> configure.ac:62: error: possibly undefined macro:
> AC_PACKAGE_NEED_XFS_HANDLE_H
> configure.ac:64: error: possibly undefined macro:
> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
> configure.ac:65: error: possibly undefined macro:
> AC_PACKAGE_NEED_ATTR_XATTR_H
> configure.ac:67: error: possibly undefined macro:
> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
> configure.ac:68: error: possibly undefined macro:
> AC_PACKAGE_NEED_GETXATTR_LIBATTR
> configure.ac:71: error: possibly undefined macro:
> AC_PACKAGE_NEED_ACL_LIBACL_H
> configure.ac:72: error: possibly undefined macro:
> AC_PACKAGE_NEED_ACLINIT_LIBACL
> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
> autoreconf: /usr/bin/autoconf failed with exit status: 1
> make: *** [configure] Error 1
> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
> 2.6.32-696.el6.x86_64
> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
> automake-1.11.1-4.el6.noarch
> autoconf-2.63-5.1.el6.noarch
> m4-1.4.13-5.el6.x86_64
> libtool-2.2.6-15.5.el6.x86_64
> ============================================================================
> 
> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
> do you have the same issue?

No, make works fine on my RHEL6.9 host. And this patch should be pushed
to upstream already. Does 'make realclean' make any difference? Does a
clean 'git clone' work for you?

Thanks,
Eryu

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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-08 10:50                         ` Eryu Guan
@ 2017-05-08 11:19                           ` Xiao Yang
  2017-05-08 21:22                             ` Gwendal Grignou
  2017-05-09  7:12                           ` Xiao Yang
  1 sibling, 1 reply; 21+ messages in thread
From: Xiao Yang @ 2017-05-08 11:19 UTC (permalink / raw)
  To: Eryu Guan; +Cc: Gwendal Grignou, fstests

On 2017/05/08 18:50, Eryu Guan wrote:
> On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
>> On 2017/04/25 21:09, Eryu Guan wrote:
>>> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>>>> - Request LIBTOOL to be used
>>>> - Set topbuildir based on a Makefile variable to call libtool
>>>> - Use /usr/local instead of /var for xfstest final location
>>>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
>>>> - Use autoconf variables @prefix@, @exec_prefix@.
>>>>
>>>> The regular way of compiling xfstests - make - remains.
>>>> But it now runs autoreconf and libtoolize -i to produce a valid
>>>> configure.
>>>> Verified with 'make install --dry-run' that files are installed at the
>>>> same place.
>>>> Verified compiling in chromeOS chroot works as well.
>>>>
>>>> Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> Removal of instal-sh, use of autoreconf
>>>>
>>>> Changes in v3:
>>>> Use of @exec_prefix@ variable, unify installation location.
>>>>
>>>> Changes in v4:
>>>> Add --install option to autoreconf so that aclocal is called with -I m4.
>>>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>>>> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
>>>> still works.
>>> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
>>> Fedora 25 hosts.
>>>
>> Hi Eryu
>>
>> When appling v4 patch, i still got the following error messgae on RHEL6.9GA:
>> ============================================================================
>> [root@RHEL6U9GA_Intel64 xfstests]# make
>> autoreconf --include=m4
>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>> If this token and others are legitimate, please use m4_pattern_allow.
>> See the Autoconf documentation.
>> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>> configure.ac:43: error: possibly undefined macro:
>> AC_PACKAGE_NEED_UUIDCOMPARE
>> configure.ac:48: error: possibly undefined macro: AC_PACKAGE_NEED_SYS_ACL_H
>> configure.ac:49: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTRIBUTES_H
>> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
>> configure.ac:51: error: possibly undefined macro:
>> AC_PACKAGE_NEED_IRIX_LIBHANDLE
>> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
>> configure.ac:57: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XFS_H
>> configure.ac:58: error: possibly undefined macro: AC_PACKAGE_WANT_LIBXFS_H
>> configure.ac:59: error: possibly undefined macro:
>> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
>> configure.ac:60: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XQM_H
>> configure.ac:61: error: possibly undefined macro:
>> AC_PACKAGE_NEED_XFSCTL_MACRO
>> configure.ac:62: error: possibly undefined macro:
>> AC_PACKAGE_NEED_XFS_HANDLE_H
>> configure.ac:64: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
>> configure.ac:65: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTR_XATTR_H
>> configure.ac:67: error: possibly undefined macro:
>> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
>> configure.ac:68: error: possibly undefined macro:
>> AC_PACKAGE_NEED_GETXATTR_LIBATTR
>> configure.ac:71: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ACL_LIBACL_H
>> configure.ac:72: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ACLINIT_LIBACL
>> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
>> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
>> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
>> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>> make: *** [configure] Error 1
>> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
>> 2.6.32-696.el6.x86_64
>> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
>> automake-1.11.1-4.el6.noarch
>> autoconf-2.63-5.1.el6.noarch
>> m4-1.4.13-5.el6.x86_64
>> libtool-2.2.6-15.5.el6.x86_64
>> ============================================================================
>>
>> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
>> do you have the same issue?
> No, make works fine on my RHEL6.9 host. And this patch should be pushed
> to upstream already. Does 'make realclean' make any difference? Does a
> clean 'git clone' work for you?
Hi Eryu

I cloned the upstream xfstests and cleaned before make on RHEL6.9GA, i 
always got the same error on
both physical machine and virtual machine.  However it works fine on 
RHEL7.3GA.

I tried to use 'autoreconf --include=m4' directly, and also got the same 
error:
=====================================================================
[root@RHEL6U9GA_Intel64 xfstests]# autoreconf --include=m4
configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
       If this token and others are legitimate, please use m4_pattern_allow.
       See the Autoconf documentation.
......
=====================================================================
Do you have some suggestions about it?

Thanks,
Xiao Yang
> Thanks,
> Eryu
>
>
> .
>




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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-08 11:19                           ` Xiao Yang
@ 2017-05-08 21:22                             ` Gwendal Grignou
  2017-05-09  1:37                               ` Xiao Yang
  0 siblings, 1 reply; 21+ messages in thread
From: Gwendal Grignou @ 2017-05-08 21:22 UTC (permalink / raw)
  To: Xiao Yang; +Cc: Eryu Guan, Gwendal Grignou, fstests

Xiao,

Be sure to use a clean checkout from the git tree, Eyri has improved
patch v4 when submitting it.

Can you try:
make distclean
If it fails,  rm include/builddefs and make distclean again

And then send the output of:
autoreconf --verbose --include=m4"?

Thanks,
Gwendal.


On Mon, May 8, 2017 at 4:19 AM, Xiao Yang <yangx.jy@cn.fujitsu.com> wrote:
> On 2017/05/08 18:50, Eryu Guan wrote:
>>
>> On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
>>>
>>> On 2017/04/25 21:09, Eryu Guan wrote:
>>>>
>>>> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>>>>>
>>>>> - Request LIBTOOL to be used
>>>>> - Set topbuildir based on a Makefile variable to call libtool
>>>>> - Use /usr/local instead of /var for xfstest final location
>>>>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is
>>>>> autogenerated.
>>>>> - Use autoconf variables @prefix@, @exec_prefix@.
>>>>>
>>>>> The regular way of compiling xfstests - make - remains.
>>>>> But it now runs autoreconf and libtoolize -i to produce a valid
>>>>> configure.
>>>>> Verified with 'make install --dry-run' that files are installed at the
>>>>> same place.
>>>>> Verified compiling in chromeOS chroot works as well.
>>>>>
>>>>> Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
>>>>> ---
>>>>>
>>>>> Changes in v2:
>>>>> Removal of instal-sh, use of autoreconf
>>>>>
>>>>> Changes in v3:
>>>>> Use of @exec_prefix@ variable, unify installation location.
>>>>>
>>>>> Changes in v4:
>>>>> Add --install option to autoreconf so that aclocal is called with -I
>>>>> m4.
>>>>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>>>>> With --install option and AC_CONFIG_MACRO_DIR undefined verify that
>>>>> configure
>>>>> still works.
>>>>
>>>> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
>>>> Fedora 25 hosts.
>>>>
>>> Hi Eryu
>>>
>>> When appling v4 patch, i still got the following error messgae on
>>> RHEL6.9GA:
>>>
>>> ============================================================================
>>> [root@RHEL6U9GA_Intel64 xfstests]# make
>>> autoreconf --include=m4
>>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>>> If this token and others are legitimate, please use m4_pattern_allow.
>>> See the Autoconf documentation.
>>> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>>> configure.ac:43: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_UUIDCOMPARE
>>> configure.ac:48: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_SYS_ACL_H
>>> configure.ac:49: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTRIBUTES_H
>>> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
>>> configure.ac:51: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_IRIX_LIBHANDLE
>>> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
>>> configure.ac:57: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFS_XFS_H
>>> configure.ac:58: error: possibly undefined macro:
>>> AC_PACKAGE_WANT_LIBXFS_H
>>> configure.ac:59: error: possibly undefined macro:
>>> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
>>> configure.ac:60: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFS_XQM_H
>>> configure.ac:61: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFSCTL_MACRO
>>> configure.ac:62: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFS_HANDLE_H
>>> configure.ac:64: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
>>> configure.ac:65: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTR_XATTR_H
>>> configure.ac:67: error: possibly undefined macro:
>>> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
>>> configure.ac:68: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_GETXATTR_LIBATTR
>>> configure.ac:71: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ACL_LIBACL_H
>>> configure.ac:72: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ACLINIT_LIBACL
>>> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
>>> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
>>> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
>>> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
>>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>>> make: *** [configure] Error 1
>>> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
>>> 2.6.32-696.el6.x86_64
>>> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
>>> automake-1.11.1-4.el6.noarch
>>> autoconf-2.63-5.1.el6.noarch
>>> m4-1.4.13-5.el6.x86_64
>>> libtool-2.2.6-15.5.el6.x86_64
>>>
>>> ============================================================================
>>>
>>> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
>>> do you have the same issue?
>>
>> No, make works fine on my RHEL6.9 host. And this patch should be pushed
>> to upstream already. Does 'make realclean' make any difference? Does a
>> clean 'git clone' work for you?
>
> Hi Eryu
>
> I cloned the upstream xfstests and cleaned before make on RHEL6.9GA, i
> always got the same error on
> both physical machine and virtual machine.  However it works fine on
> RHEL7.3GA.
>
> I tried to use 'autoreconf --include=m4' directly, and also got the same
> error:
> =====================================================================
> [root@RHEL6U9GA_Intel64 xfstests]# autoreconf --include=m4
> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
> ......
> =====================================================================
> Do you have some suggestions about it?
>
> Thanks,
> Xiao Yang
>>
>> Thanks,
>> Eryu
>>
>>
>> .
>>
>
>
>

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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-08 21:22                             ` Gwendal Grignou
@ 2017-05-09  1:37                               ` Xiao Yang
  0 siblings, 0 replies; 21+ messages in thread
From: Xiao Yang @ 2017-05-09  1:37 UTC (permalink / raw)
  To: Gwendal Grignou; +Cc: Eryu Guan, Gwendal Grignou, fstests

On 2017/05/09 5:22, Gwendal Grignou wrote:
> Xiao,
>
> Be sure to use a clean checkout from the git tree, Eyri has improved
> patch v4 when submitting it.
>
> Can you try:
> make distclean
> If it fails,  rm include/builddefs and make distclean again
>
> And then send the output of:
> autoreconf --verbose --include=m4"?
>
Hi Gwendal

My environmental infomation:
=========================================================
[root@RHEL6U9GA_Intel64 xfstests]# uname -r
2.6.32-696.el6.x86_64
[root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
automake-1.11.1-4.el6.noarch
autoconf-2.63-5.1.el6.noarch
m4-1.4.13-5.el6.x86_64
libtool-2.2.6-15.5.el6.x86_64
=========================================================

I tried to make distclean and autoreconf --verbose --include=m4", please 
see the following output:
===================================================================================
[root@RHEL6U9GA_Intel64 xfstests]# make distclean
[root@RHEL6U9GA_Intel64 xfstests]#
[root@RHEL6U9GA_Intel64 xfstests]# autoreconf --include=m4 --verbose
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not running libtoolize: --install not given
autoreconf: running: /usr/bin/autoconf --include=m4
configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
       If this token and others are legitimate, please use m4_pattern_allow.
       See the Autoconf documentation.
configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
configure.ac:43: error: possibly undefined macro: 
AC_PACKAGE_NEED_UUIDCOMPARE
configure.ac:48: error: possibly undefined macro: AC_PACKAGE_NEED_SYS_ACL_H
configure.ac:49: error: possibly undefined macro: 
AC_PACKAGE_NEED_ATTRIBUTES_H
configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
configure.ac:51: error: possibly undefined macro: 
AC_PACKAGE_NEED_IRIX_LIBHANDLE
configure.ac:56: error: possibly undefined macro: AC_MULTILIB
configure.ac:57: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XFS_H
configure.ac:58: error: possibly undefined macro: AC_PACKAGE_WANT_LIBXFS_H
configure.ac:59: error: possibly undefined macro: 
AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
configure.ac:60: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XQM_H
configure.ac:61: error: possibly undefined macro: 
AC_PACKAGE_NEED_XFSCTL_MACRO
configure.ac:62: error: possibly undefined macro: 
AC_PACKAGE_NEED_XFS_HANDLE_H
configure.ac:64: error: possibly undefined macro: 
AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
configure.ac:65: error: possibly undefined macro: 
AC_PACKAGE_NEED_ATTR_XATTR_H
configure.ac:67: error: possibly undefined macro: 
AC_PACKAGE_WANT_ATTRLIST_LIBATTR
configure.ac:68: error: possibly undefined macro: 
AC_PACKAGE_NEED_GETXATTR_LIBATTR
configure.ac:71: error: possibly undefined macro: 
AC_PACKAGE_NEED_ACL_LIBACL_H
configure.ac:72: error: possibly undefined macro: 
AC_PACKAGE_NEED_ACLINIT_LIBACL
configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
autoreconf: /usr/bin/autoconf failed with exit status: 1
===================================================================================

aclocal may not be called with -I m4 on RHEL6.9GA when adding --include 
option to autoreconf.

Thanks for your reply,
Xiao Yang.
> Thanks,
> Gwendal.
>
>
> On Mon, May 8, 2017 at 4:19 AM, Xiao Yang<yangx.jy@cn.fujitsu.com>  wrote:
>> On 2017/05/08 18:50, Eryu Guan wrote:
>>> On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
>>>> On 2017/04/25 21:09, Eryu Guan wrote:
>>>>> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>>>>>> - Request LIBTOOL to be used
>>>>>> - Set topbuildir based on a Makefile variable to call libtool
>>>>>> - Use /usr/local instead of /var for xfstest final location
>>>>>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is
>>>>>> autogenerated.
>>>>>> - Use autoconf variables @prefix@, @exec_prefix@.
>>>>>>
>>>>>> The regular way of compiling xfstests - make - remains.
>>>>>> But it now runs autoreconf and libtoolize -i to produce a valid
>>>>>> configure.
>>>>>> Verified with 'make install --dry-run' that files are installed at the
>>>>>> same place.
>>>>>> Verified compiling in chromeOS chroot works as well.
>>>>>>
>>>>>> Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
>>>>>> ---
>>>>>>
>>>>>> Changes in v2:
>>>>>> Removal of instal-sh, use of autoreconf
>>>>>>
>>>>>> Changes in v3:
>>>>>> Use of @exec_prefix@ variable, unify installation location.
>>>>>>
>>>>>> Changes in v4:
>>>>>> Add --install option to autoreconf so that aclocal is called with -I
>>>>>> m4.
>>>>>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>>>>>> With --install option and AC_CONFIG_MACRO_DIR undefined verify that
>>>>>> configure
>>>>>> still works.
>>>>> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
>>>>> Fedora 25 hosts.
>>>>>
>>>> Hi Eryu
>>>>
>>>> When appling v4 patch, i still got the following error messgae on
>>>> RHEL6.9GA:
>>>>
>>>> ============================================================================
>>>> [root@RHEL6U9GA_Intel64 xfstests]# make
>>>> autoreconf --include=m4
>>>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>>>> If this token and others are legitimate, please use m4_pattern_allow.
>>>> See the Autoconf documentation.
>>>> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>>>> configure.ac:43: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_UUIDCOMPARE
>>>> configure.ac:48: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_SYS_ACL_H
>>>> configure.ac:49: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_ATTRIBUTES_H
>>>> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
>>>> configure.ac:51: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_IRIX_LIBHANDLE
>>>> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
>>>> configure.ac:57: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_XFS_XFS_H
>>>> configure.ac:58: error: possibly undefined macro:
>>>> AC_PACKAGE_WANT_LIBXFS_H
>>>> configure.ac:59: error: possibly undefined macro:
>>>> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
>>>> configure.ac:60: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_XFS_XQM_H
>>>> configure.ac:61: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_XFSCTL_MACRO
>>>> configure.ac:62: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_XFS_HANDLE_H
>>>> configure.ac:64: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
>>>> configure.ac:65: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_ATTR_XATTR_H
>>>> configure.ac:67: error: possibly undefined macro:
>>>> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
>>>> configure.ac:68: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_GETXATTR_LIBATTR
>>>> configure.ac:71: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_ACL_LIBACL_H
>>>> configure.ac:72: error: possibly undefined macro:
>>>> AC_PACKAGE_NEED_ACLINIT_LIBACL
>>>> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
>>>> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
>>>> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
>>>> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
>>>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>>>> make: *** [configure] Error 1
>>>> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
>>>> 2.6.32-696.el6.x86_64
>>>> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
>>>> automake-1.11.1-4.el6.noarch
>>>> autoconf-2.63-5.1.el6.noarch
>>>> m4-1.4.13-5.el6.x86_64
>>>> libtool-2.2.6-15.5.el6.x86_64
>>>>
>>>> ============================================================================
>>>>
>>>> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
>>>> do you have the same issue?
>>> No, make works fine on my RHEL6.9 host. And this patch should be pushed
>>> to upstream already. Does 'make realclean' make any difference? Does a
>>> clean 'git clone' work for you?
>> Hi Eryu
>>
>> I cloned the upstream xfstests and cleaned before make on RHEL6.9GA, i
>> always got the same error on
>> both physical machine and virtual machine.  However it works fine on
>> RHEL7.3GA.
>>
>> I tried to use 'autoreconf --include=m4' directly, and also got the same
>> error:
>> =====================================================================
>> [root@RHEL6U9GA_Intel64 xfstests]# autoreconf --include=m4
>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>>        If this token and others are legitimate, please use m4_pattern_allow.
>>        See the Autoconf documentation.
>> ......
>> =====================================================================
>> Do you have some suggestions about it?
>>
>> Thanks,
>> Xiao Yang
>>> Thanks,
>>> Eryu
>>>
>>>
>>> .
>>>
>>
>>
>
> .
>




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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-08 10:50                         ` Eryu Guan
  2017-05-08 11:19                           ` Xiao Yang
@ 2017-05-09  7:12                           ` Xiao Yang
  2017-05-12  6:04                             ` Xiao Yang
  1 sibling, 1 reply; 21+ messages in thread
From: Xiao Yang @ 2017-05-09  7:12 UTC (permalink / raw)
  To: Eryu Guan, Gwendal Grignou; +Cc: fstests

On 2017/05/08 18:50, Eryu Guan wrote:
> On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
>> On 2017/04/25 21:09, Eryu Guan wrote:
>>> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>>>> - Request LIBTOOL to be used
>>>> - Set topbuildir based on a Makefile variable to call libtool
>>>> - Use /usr/local instead of /var for xfstest final location
>>>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
>>>> - Use autoconf variables @prefix@, @exec_prefix@.
>>>>
>>>> The regular way of compiling xfstests - make - remains.
>>>> But it now runs autoreconf and libtoolize -i to produce a valid
>>>> configure.
>>>> Verified with 'make install --dry-run' that files are installed at the
>>>> same place.
>>>> Verified compiling in chromeOS chroot works as well.
>>>>
>>>> Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> Removal of instal-sh, use of autoreconf
>>>>
>>>> Changes in v3:
>>>> Use of @exec_prefix@ variable, unify installation location.
>>>>
>>>> Changes in v4:
>>>> Add --install option to autoreconf so that aclocal is called with -I m4.
>>>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>>>> With --install option and AC_CONFIG_MACRO_DIR undefined verify that configure
>>>> still works.
>>> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
>>> Fedora 25 hosts.
>>>
>> Hi Eryu
>>
>> When appling v4 patch, i still got the following error messgae on RHEL6.9GA:
>> ============================================================================
>> [root@RHEL6U9GA_Intel64 xfstests]# make
>> autoreconf --include=m4
>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>> If this token and others are legitimate, please use m4_pattern_allow.
>> See the Autoconf documentation.
>> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>> configure.ac:43: error: possibly undefined macro:
>> AC_PACKAGE_NEED_UUIDCOMPARE
>> configure.ac:48: error: possibly undefined macro: AC_PACKAGE_NEED_SYS_ACL_H
>> configure.ac:49: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTRIBUTES_H
>> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
>> configure.ac:51: error: possibly undefined macro:
>> AC_PACKAGE_NEED_IRIX_LIBHANDLE
>> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
>> configure.ac:57: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XFS_H
>> configure.ac:58: error: possibly undefined macro: AC_PACKAGE_WANT_LIBXFS_H
>> configure.ac:59: error: possibly undefined macro:
>> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
>> configure.ac:60: error: possibly undefined macro: AC_PACKAGE_NEED_XFS_XQM_H
>> configure.ac:61: error: possibly undefined macro:
>> AC_PACKAGE_NEED_XFSCTL_MACRO
>> configure.ac:62: error: possibly undefined macro:
>> AC_PACKAGE_NEED_XFS_HANDLE_H
>> configure.ac:64: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
>> configure.ac:65: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ATTR_XATTR_H
>> configure.ac:67: error: possibly undefined macro:
>> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
>> configure.ac:68: error: possibly undefined macro:
>> AC_PACKAGE_NEED_GETXATTR_LIBATTR
>> configure.ac:71: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ACL_LIBACL_H
>> configure.ac:72: error: possibly undefined macro:
>> AC_PACKAGE_NEED_ACLINIT_LIBACL
>> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
>> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
>> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
>> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>> make: *** [configure] Error 1
>> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
>> 2.6.32-696.el6.x86_64
>> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
>> automake-1.11.1-4.el6.noarch
>> autoconf-2.63-5.1.el6.noarch
>> m4-1.4.13-5.el6.x86_64
>> libtool-2.2.6-15.5.el6.x86_64
>> ============================================================================
>>
>> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
>> do you have the same issue?
> No, make works fine on my RHEL6.9 host. And this patch should be pushed
> to upstream already. Does 'make realclean' make any difference? Does a
> clean 'git clone' work for you?
>
> Thanks,
> Eryu
>
>
Hi Eryu and Gwendal,

I found that autoreconf could not pass -I/--include option to aclocal in 
autoconf-2.63-5.1.el6.noarch on RHEL6.9GA.
This bug has been fixed by the following patch:
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=44fbeef86d03f2b754a4444e38f38631ad318946

This fixed patch was not merged into autoconf-2.63-5.1.el6.noarch.  I 
tried to apply this patch into autoconf-2.63-5.1.el6.noarch,
so make worked fine in xfstests on RHEL6.9GA.  How can we workaroud this 
issue?

Thanks,
Xiao Yang
> .
>




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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-09  7:12                           ` Xiao Yang
@ 2017-05-12  6:04                             ` Xiao Yang
  2017-05-12  8:12                               ` Eryu Guan
  0 siblings, 1 reply; 21+ messages in thread
From: Xiao Yang @ 2017-05-12  6:04 UTC (permalink / raw)
  To: Eryu Guan, Gwendal Grignou; +Cc: fstests

Hi Eryu

I tried to use higher version autoconf (e.g, 
autoconf-2.65-1.fc13.noarch.rpm) to compile the lastest xfstests on 
RHEL6.9GA, and
it worked fine.   Shoud we update  autoconf-2.63-5.1.el6.noarch on 
RHEL6.9GA or fix xfstests to adapt to older version autoconf? :-)

Thanks,
Xiao Yang.
On 2017/05/09 15:12, Xiao Yang wrote:
> On 2017/05/08 18:50, Eryu Guan wrote:
>> On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
>>> On 2017/04/25 21:09, Eryu Guan wrote:
>>>> On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
>>>>> - Request LIBTOOL to be used
>>>>> - Set topbuildir based on a Makefile variable to call libtool
>>>>> - Use /usr/local instead of /var for xfstest final location
>>>>> - Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is 
>>>>> autogenerated.
>>>>> - Use autoconf variables @prefix@, @exec_prefix@.
>>>>>
>>>>> The regular way of compiling xfstests - make - remains.
>>>>> But it now runs autoreconf and libtoolize -i to produce a valid
>>>>> configure.
>>>>> Verified with 'make install --dry-run' that files are installed at 
>>>>> the
>>>>> same place.
>>>>> Verified compiling in chromeOS chroot works as well.
>>>>>
>>>>> Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
>>>>> ---
>>>>>
>>>>> Changes in v2:
>>>>> Removal of instal-sh, use of autoreconf
>>>>>
>>>>> Changes in v3:
>>>>> Use of @exec_prefix@ variable, unify installation location.
>>>>>
>>>>> Changes in v4:
>>>>> Add --install option to autoreconf so that aclocal is called with 
>>>>> -I m4.
>>>>> Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
>>>>> With --install option and AC_CONFIG_MACRO_DIR undefined verify 
>>>>> that configure
>>>>> still works.
>>>> Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
>>>> Fedora 25 hosts.
>>>>
>>> Hi Eryu
>>>
>>> When appling v4 patch, i still got the following error messgae on 
>>> RHEL6.9GA:
>>> ============================================================================ 
>>>
>>> [root@RHEL6U9GA_Intel64 xfstests]# make
>>> autoreconf --include=m4
>>> configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
>>> If this token and others are legitimate, please use m4_pattern_allow.
>>> See the Autoconf documentation.
>>> configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
>>> configure.ac:43: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_UUIDCOMPARE
>>> configure.ac:48: error: possibly undefined macro: 
>>> AC_PACKAGE_NEED_SYS_ACL_H
>>> configure.ac:49: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTRIBUTES_H
>>> configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
>>> configure.ac:51: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_IRIX_LIBHANDLE
>>> configure.ac:56: error: possibly undefined macro: AC_MULTILIB
>>> configure.ac:57: error: possibly undefined macro: 
>>> AC_PACKAGE_NEED_XFS_XFS_H
>>> configure.ac:58: error: possibly undefined macro: 
>>> AC_PACKAGE_WANT_LIBXFS_H
>>> configure.ac:59: error: possibly undefined macro:
>>> AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
>>> configure.ac:60: error: possibly undefined macro: 
>>> AC_PACKAGE_NEED_XFS_XQM_H
>>> configure.ac:61: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFSCTL_MACRO
>>> configure.ac:62: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_XFS_HANDLE_H
>>> configure.ac:64: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
>>> configure.ac:65: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ATTR_XATTR_H
>>> configure.ac:67: error: possibly undefined macro:
>>> AC_PACKAGE_WANT_ATTRLIST_LIBATTR
>>> configure.ac:68: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_GETXATTR_LIBATTR
>>> configure.ac:71: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ACL_LIBACL_H
>>> configure.ac:72: error: possibly undefined macro:
>>> AC_PACKAGE_NEED_ACLINIT_LIBACL
>>> configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
>>> configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
>>> configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
>>> configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
>>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>>> make: *** [configure] Error 1
>>> [root@RHEL6U9GA_Intel64 xfstests]# uname -r
>>> 2.6.32-696.el6.x86_64
>>> [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
>>> automake-1.11.1-4.el6.noarch
>>> autoconf-2.63-5.1.el6.noarch
>>> m4-1.4.13-5.el6.x86_64
>>> libtool-2.2.6-15.5.el6.x86_64
>>> ============================================================================ 
>>>
>>>
>>> autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
>>> do you have the same issue?
>> No, make works fine on my RHEL6.9 host. And this patch should be pushed
>> to upstream already. Does 'make realclean' make any difference? Does a
>> clean 'git clone' work for you?
>>
>> Thanks,
>> Eryu
>>
>>
> Hi Eryu and Gwendal,
>
> I found that autoreconf could not pass -I/--include option to aclocal 
> in autoconf-2.63-5.1.el6.noarch on RHEL6.9GA.
> This bug has been fixed by the following patch:
> http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=44fbeef86d03f2b754a4444e38f38631ad318946 
>
>
> This fixed patch was not merged into autoconf-2.63-5.1.el6.noarch.  I 
> tried to apply this patch into autoconf-2.63-5.1.el6.noarch,
> so make worked fine in xfstests on RHEL6.9GA.  How can we workaroud 
> this issue?
>
> Thanks,
> Xiao Yang
>> .
>>
>
>
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
>




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

* Re: [PATCH v4] Code to allow cros-compilation on chromeOS
  2017-05-12  6:04                             ` Xiao Yang
@ 2017-05-12  8:12                               ` Eryu Guan
  0 siblings, 0 replies; 21+ messages in thread
From: Eryu Guan @ 2017-05-12  8:12 UTC (permalink / raw)
  To: Xiao Yang; +Cc: Gwendal Grignou, fstests

On Fri, May 12, 2017 at 02:04:08PM +0800, Xiao Yang wrote:
> Hi Eryu
> 
> I tried to use higher version autoconf (e.g,
> autoconf-2.65-1.fc13.noarch.rpm) to compile the lastest xfstests on
> RHEL6.9GA, and
> it worked fine.   Shoud we update  autoconf-2.63-5.1.el6.noarch on RHEL6.9GA
> or fix xfstests to adapt to older version autoconf? :-)

Sorry for the late response, because I'm still wondering why it worked
fine on my RHEL6.9 test host, it has the same version of autoconf,
automake, libtool etc. as you installed.

But this is an relatively low priority task for me, because RHEL6 is in
its late stage, no new features will be added, and non-critical bugs are
unlikely to get fixed, so testing on RHEL6 is relatively low priority
too.

Thanks for all the effort you made so far on this issue!

Eryu

> 
> Thanks,
> Xiao Yang.
> On 2017/05/09 15:12, Xiao Yang wrote:
> > On 2017/05/08 18:50, Eryu Guan wrote:
> > > On Mon, May 08, 2017 at 06:19:27PM +0800, Xiao Yang wrote:
> > > > On 2017/04/25 21:09, Eryu Guan wrote:
> > > > > On Wed, Apr 19, 2017 at 04:33:48PM -0700, Gwendal Grignou wrote:
> > > > > > - Request LIBTOOL to be used
> > > > > > - Set topbuildir based on a Makefile variable to call libtool
> > > > > > - Use /usr/local instead of /var for xfstest final location
> > > > > > - Move macros from aclocal.m4 to acinclude.m4,
> > > > > > aclocal.m4 is autogenerated.
> > > > > > - Use autoconf variables @prefix@, @exec_prefix@.
> > > > > > 
> > > > > > The regular way of compiling xfstests - make - remains.
> > > > > > But it now runs autoreconf and libtoolize -i to produce a valid
> > > > > > configure.
> > > > > > Verified with 'make install --dry-run' that files are
> > > > > > installed at the
> > > > > > same place.
> > > > > > Verified compiling in chromeOS chroot works as well.
> > > > > > 
> > > > > > Signed-off-by: Gwendal Grignou<gwendal@chromium.org>
> > > > > > ---
> > > > > > 
> > > > > > Changes in v2:
> > > > > > Removal of instal-sh, use of autoreconf
> > > > > > 
> > > > > > Changes in v3:
> > > > > > Use of @exec_prefix@ variable, unify installation location.
> > > > > > 
> > > > > > Changes in v4:
> > > > > > Add --install option to autoreconf so that aclocal is
> > > > > > called with -I m4.
> > > > > > Keep using AC_CONFIG_MACRO_DIR when autoconf is called directly.
> > > > > > With --install option and AC_CONFIG_MACRO_DIR undefined
> > > > > > verify that configure
> > > > > > still works.
> > > > > Thanks a lot for the update! v4 works for me too with RHEL6, RHEL7 and
> > > > > Fedora 25 hosts.
> > > > > 
> > > > Hi Eryu
> > > > 
> > > > When appling v4 patch, i still got the following error messgae
> > > > on RHEL6.9GA:
> > > > ============================================================================
> > > > 
> > > > [root@RHEL6U9GA_Intel64 xfstests]# make
> > > > autoreconf --include=m4
> > > > configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
> > > > If this token and others are legitimate, please use m4_pattern_allow.
> > > > See the Autoconf documentation.
> > > > configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
> > > > configure.ac:43: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_UUIDCOMPARE
> > > > configure.ac:48: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_SYS_ACL_H
> > > > configure.ac:49: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_ATTRIBUTES_H
> > > > configure.ac:50: error: possibly undefined macro: AC_PACKAGE_WANT_NDBM
> > > > configure.ac:51: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_IRIX_LIBHANDLE
> > > > configure.ac:56: error: possibly undefined macro: AC_MULTILIB
> > > > configure.ac:57: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_XFS_XFS_H
> > > > configure.ac:58: error: possibly undefined macro:
> > > > AC_PACKAGE_WANT_LIBXFS_H
> > > > configure.ac:59: error: possibly undefined macro:
> > > > AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
> > > > configure.ac:60: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_XFS_XQM_H
> > > > configure.ac:61: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_XFSCTL_MACRO
> > > > configure.ac:62: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_XFS_HANDLE_H
> > > > configure.ac:64: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
> > > > configure.ac:65: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_ATTR_XATTR_H
> > > > configure.ac:67: error: possibly undefined macro:
> > > > AC_PACKAGE_WANT_ATTRLIST_LIBATTR
> > > > configure.ac:68: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_GETXATTR_LIBATTR
> > > > configure.ac:71: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_ACL_LIBACL_H
> > > > configure.ac:72: error: possibly undefined macro:
> > > > AC_PACKAGE_NEED_ACLINIT_LIBACL
> > > > configure.ac:74: error: possibly undefined macro: AC_PACKAGE_WANT_GDBM
> > > > configure.ac:75: error: possibly undefined macro: AC_PACKAGE_WANT_AIO
> > > > configure.ac:76: error: possibly undefined macro: AC_PACKAGE_WANT_DMAPI
> > > > configure.ac:82: error: possibly undefined macro: AC_PACKAGE_WANT_SSL
> > > > autoreconf: /usr/bin/autoconf failed with exit status: 1
> > > > make: *** [configure] Error 1
> > > > [root@RHEL6U9GA_Intel64 xfstests]# uname -r
> > > > 2.6.32-696.el6.x86_64
> > > > [root@RHEL6U9GA_Intel64 ~]# rpm -q automake autoconf m4 libtool
> > > > automake-1.11.1-4.el6.noarch
> > > > autoconf-2.63-5.1.el6.noarch
> > > > m4-1.4.13-5.el6.x86_64
> > > > libtool-2.2.6-15.5.el6.x86_64
> > > > ============================================================================
> > > > 
> > > > 
> > > > autoreconf with --include m4 may not fix undefined macro on RHEL6.9GA,
> > > > do you have the same issue?
> > > No, make works fine on my RHEL6.9 host. And this patch should be pushed
> > > to upstream already. Does 'make realclean' make any difference? Does a
> > > clean 'git clone' work for you?
> > > 
> > > Thanks,
> > > Eryu
> > > 
> > > 
> > Hi Eryu and Gwendal,
> > 
> > I found that autoreconf could not pass -I/--include option to aclocal in
> > autoconf-2.63-5.1.el6.noarch on RHEL6.9GA.
> > This bug has been fixed by the following patch:
> > http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=44fbeef86d03f2b754a4444e38f38631ad318946
> > 
> > 
> > This fixed patch was not merged into autoconf-2.63-5.1.el6.noarch.  I
> > tried to apply this patch into autoconf-2.63-5.1.el6.noarch,
> > so make worked fine in xfstests on RHEL6.9GA.  How can we workaroud this
> > issue?
> > 
> > Thanks,
> > Xiao Yang
> > > .
> > > 
> > 
> > 
> > 
> > -- 
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > .
> > 
> 
> 
> 

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

end of thread, other threads:[~2017-05-12  8:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMHSBOXjP4QOGmM2HxygY0r+ML93XyEmLEfwGz6KvS0S0sjuCA@mail.gmail.com>
2017-03-24 23:48 ` [PATCH v2] Code to allow cros-compilation on chromeOS Gwendal Grignou
2017-03-27 11:35   ` Eryu Guan
2017-04-04 17:37     ` [PATCH v3] " Gwendal Grignou
2017-04-06 11:18       ` Eryu Guan
2017-04-06 23:26         ` Gwendal Grignou
2017-04-07  4:12           ` Eryu Guan
2017-04-07 21:41             ` Gwendal Grignou
2017-04-10  9:25               ` Eryu Guan
2017-04-19 21:59                 ` Gwendal Grignou
2017-04-19 23:33                   ` [PATCH v4] " Gwendal Grignou
2017-04-25 13:09                     ` Eryu Guan
2017-05-08 10:19                       ` Xiao Yang
2017-05-08 10:50                         ` Eryu Guan
2017-05-08 11:19                           ` Xiao Yang
2017-05-08 21:22                             ` Gwendal Grignou
2017-05-09  1:37                               ` Xiao Yang
2017-05-09  7:12                           ` Xiao Yang
2017-05-12  6:04                             ` Xiao Yang
2017-05-12  8:12                               ` Eryu Guan
2017-04-28 16:27                     ` [PATCH v5] " Gwendal Grignou
2017-04-28 16:58                       ` Gwendal Grignou

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.