FS/XFS testing framework
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: tytso@mit.edu, fstests@vger.kernel.org
Subject: Re: [PATCH] Code to allow cros-compilation on chromeOS
Date: Fri, 24 Mar 2017 12:23:47 +0800	[thread overview]
Message-ID: <20170324042347.GL14226@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170320212045.4849-1-gwendal@chromium.org>

On Mon, Mar 20, 2017 at 02:20:45PM -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.
> 
> TEST=Compile in chromeOS chroot.
> TEST=Using a snippet of build-all at https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tytso_xfstests-2Dbld&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=CfsgeRzY4RIPfAUQqWlSEu0A-gXQ3jhYRYWh8njYK1Q&s=wJL4qnWAA1n2ek4-DxvFWIGPw8HbXGuN7Pl2SSpK6No&e= 
> After adding config.sub and config.guess with:
> cp /usr/share/misc/config.sub /usr/share/misc/config.guess
> Verified that compilation of xfstest works:
> ver=$(git describe --always --dirty); echo "xfstests       $ver ($(git log -1 --pretty=%cD))" > ../xfstests.ver ;
> autoheader ; autoconf ;
> CFLAGS="$LCF -I$DESTDIR/include -fno-stack-protector"
> CPPFLAGS="-I$DESTDIR/include"
> LDFLAGS="$LLF -static -L$DESTDIR/lib"
> LIBS=-lpthread
> ./configure
> make -j40 LLDFLAGS=$EXEC_LLDFLAGS LIBTOOL="/usr/bin/libtool --tag=CC" BUILD_VERBOSE=1
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>

I'm not an autotools expert, and I really appreciate if someone could
help review build/packaging patches, thanks in advance!

But I did hit errors when "make" on default fedora25 and RHEL7 hosts
(which worked fine prior to this patch), I tried to "fix" them but
failed.

[root@bootp-73-5-211 fstests]# make
autoheader
autoconf
configure.ac:2: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:5: error: possibly undefined macro: AC_PACKAGE_GLOBALS
configure.ac:6: error: possibly undefined macro: AC_PACKAGE_UTILITIES
configure.ac:43: error: possibly undefined macro: AC_PACKAGE_NEED_UUIDCOMPARE
...

Seems AC_CONFIG_MACRO_DIRS is only available starting from autoconf
2.70, but f25 and rhel7 ship autoconf 2.69 by default.

After changing AC_CONFIG_MACRO_DIRS to AC_CONFIG_MACRO_DIR, above error
is gone, but other errors remain.

[root@bootp-73-5-211 fstests]# make
autoheader
autoconf
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
...

These macros are all defined in m4/ directory, so seems .m4 files are
not included correctly, because aclocal.m4 was not generated
automatically.

After doing this change to Makefile, I got 'configure' file generated,
but configure process failed again, because of missing config.sub file.

diff --git a/Makefile b/Makefile
index 30d8747..aa8db92 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ else
 clean:  # if configure hasn't run, nothing to clean
 endif
 
-configure: configure.ac
+configure: aclocal.m4 configure.ac
        autoheader
        autoconf
 
@@ -84,7 +84,7 @@ include/builddefs include/config.h: configure
                 --libexecdir=/usr/lib
 
 aclocal.m4::
-       aclocal --acdir=`pwd`/m4 --output=$@
+       aclocal -I`pwd`/m4 --output=$@
 
 depend: include/builddefs $(addsuffix -depend,$(SUBDIRS))
 

[root@bootp-73-5-211 fstests]# make
aclocal -I`pwd`/m4 --output=aclocal.m4
autoheader
autoconf
./configure \   
                --libexecdir=/usr/lib
configure: error: cannot run /bin/sh ./config.sub
Makefile:83: recipe for target 'include/builddefs' failed
make: *** [include/builddefs] Error 127


I noticed that you copied config.sub and config.guess manually to
xfstests directory, but this would break existing build process which
doesn't expect to do that. And forcing users to do manually copy files
to meet build requirements doesn't seem right to me either.

Can you please take a look at these issues?

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=CfsgeRzY4RIPfAUQqWlSEu0A-gXQ3jhYRYWh8njYK1Q&s=59ruBSBPZdkktlllER_f54rd80OfRe1pqnP1pe02x0Y&e= 

  reply	other threads:[~2017-03-24  4:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 17:57 xfstest and chromeos Gwendal Grignou
2017-01-26  5:14 ` Eryu Guan
2017-01-26  7:17   ` Mike Frysinger
2017-01-27  3:45 ` Theodore Ts'o
2017-01-27  8:40   ` Mike Frysinger
2017-01-27 16:37     ` Theodore Ts'o
2017-01-27 18:02       ` Mike Frysinger
2017-01-27 19:31         ` Gwendal Grignou
2017-01-27 21:10         ` Theodore Ts'o
2017-03-06 22:14           ` [PATCH] Make SELinux protection conditional Gwendal Grignou
2017-03-07  0:56           ` xfstest and chromeos Mike Frysinger
2017-03-20 21:20             ` [PATCH] Code to allow cros-compilation on chromeOS Gwendal Grignou
2017-03-24  4:23               ` Eryu Guan [this message]
2017-03-24 23:53                 ` Gwendal Grignou

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20170324042347.GL14226@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=gwendal@chromium.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

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

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