From MAILER-DAEMON Wed Aug 09 10:19:43 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfRpn-0004ni-PM
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 10:19:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57820)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfN5v-0001A1-HF
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:16:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfN5t-0005NZ-KA
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:16:03 -0400
Received: from mail-qt0-x236.google.com ([2607:f8b0:400d:c0d::236]:37669)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <batmanustc@gmail.com>)
	id 1dfN5t-0005Mq-EK
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:16:01 -0400
Received: by mail-qt0-x236.google.com with SMTP id 16so32943218qtz.4
	for <autoconf@gnu.org>; Wed, 09 Aug 2017 02:16:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:from:date:message-id:subject:to;
	bh=56kayBSGNUZiBsjZkBUMyTzI7hqNTpfW+wkDacklZx4=;
	b=gfPbs/nXzisldds4BYGGxl7hsxdKJTC6bDcVWA4ELim5+2CMGE0eSuMFIFmUPNqZ1D
	AAotSeTSsUwiGc0RlhnPmqYLqzdPD0M0GnwEqjAuqBAapU4mv0jdKf9z9fn7+GSb0+lT
	/zKP1jo+EufCz65SwxtUcfG9NE85uA+xK9QkDtrG+b3Qu4p606Gs9Mh4nj4PRKmh80Nq
	6deKJtuTiWi0fe0gpJb2f70y2SD0CecI6W3nXFtPjklU+rpRvcHUUiYU8LZWljMFWZAk
	G7vsefUAx701XGLiFXdPRKfRqCxzAm7qSi4rIqcTXBXe00dSZEWEY/9t0OEkN/gwZuas
	Sv4w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
	bh=56kayBSGNUZiBsjZkBUMyTzI7hqNTpfW+wkDacklZx4=;
	b=tkJERs+szHTZniMzrMCOSOOD/ncaQATt3JXVPtZncHMRtaKiY/HRV2rc/7DktfcLdH
	ddPrTiykV4NijlZ/mHYhFZpP60lPy2/I1OAUcraTM6dT6IYEGVfJowupxjHQvrGF2FPK
	cNn4mzkFqd6wIsIbN2V8BMjOEp6tmnNY+1aWw6aEUNJbZ8AgFnd93kL63zqap/4Jc9Hv
	DEwq0R2klf6sYnOQrRW7H0Iqjl9jjO2aCOQt8a+iP28q4vQUwodySSENJwKJLYIPL+Aa
	4FTn27JxWzXg8i636dZuijEN7j3WVMmQWO/QgTDMJ9frwdpkGI+79kZ3oX83boM6R5vz
	Xe9Q==
X-Gm-Message-State: AHYfb5gZbuB1itjQcqz3XuBXL7jE7Apc/wIM7wRIJiGcpfBM33C3/Fj5
	2RDj9eb3qHxf1BQ1a9KfzhMI3V9UPZea
X-Received: by 10.200.39.6 with SMTP id g6mr9384442qtg.275.1502270159345; Wed,
	09 Aug 2017 02:15:59 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.96.9 with HTTP; Wed, 9 Aug 2017 02:15:58 -0700 (PDT)
From: Sam <batmanustc@gmail.com>
Date: Wed, 9 Aug 2017 17:15:58 +0800
Message-ID: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
Subject: Why my AT_CHECK() can't work?
To: autoconf@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c0d::236
X-Mailman-Approved-At: Wed, 09 Aug 2017 10:19:42 -0400
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2017 09:16:05 -0000

Hi all,

I'm using autotest to test ovs, and I write a new *.at file using only one
AT_CHECK sentence like this:

AT_CHECK([ovs-appctl dpdk/bond-show dpdkb2], [0], [stdout])
> AT_CHECK([[sed '/ACTIVE/p' stdout | head -4]], [0], [[LACP actor_state
> ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING]])


but this *.at file failed, log is:

789. netdev-dpdk.at:23: testing netdev-dpdk - dpdk/bond-show ...
> ./netdev-dpdk.at:27: ovs-appctl dpdk/bond-show dpdkb2
> stdout:
> ---- dpdkb2 ----
> bond_mode: 4
> slave 0:
> active
> mac address ec:f4:bb:e1:1a:40
> Link Up - speed 10000 Mbps - full-duplex
> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>  rx pkts=268449, bytes=16502449, mcasts=0, drop=0, errs=0, nombufs=0
>  tx pkts=261, bytes=32020, errs=0
> slave 1:
> active
> mac address ec:f4:bb:e1:1a:42
> Link Up - speed 10000 Mbps - full-duplex
> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>  rx pkts=296190, bytes=17934647, mcasts=0, drop=0, errs=0, nombufs=0
>  tx pkts=254, bytes=31496, errs=0
> ./netdev-dpdk.at:28: sed '/ACTIVE/p' stdout | head -4
> --- -   2017-08-09 16:59:18.802810195 +0800
> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
>  2017-08-09 16:59:18.801176471 +0800
> @@ -1,4 +1,5 @@
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> +---- dpdkb2 ----
> +bond_mode: 4
> +
> +slave 0:
> +
> 789. netdev-dpdk.at:23: 789. netdev-dpdk - dpdk/bond-show (
> netdev-dpdk.at:23): FAILED (netdev-dpdk.at:28)


1. I don't know what "+" "-" means, and why there are "+" and "-"?
2. I run `ovs-appctl dpdk/bond-show dpdkb2 | sed -n '/ACTIVE/p' | head -4`,
result is:

> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING

That's exactly what I matched in AT_CHECK, why it fails?

Autotest is really hard to use...

From MAILER-DAEMON Wed Aug 09 10:19:43 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfRpn-0004oJ-So
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 10:19:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37958)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfNYX-0002BY-ER
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:45:39 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfNYV-0001ta-I8
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:45:37 -0400
Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:38385)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <batmanustc@gmail.com>)
	id 1dfNYV-0001sb-8w
	for autoconf@gnu.org; Wed, 09 Aug 2017 05:45:35 -0400
Received: by mail-qk0-x22b.google.com with SMTP id x191so32789488qka.5
	for <autoconf@gnu.org>; Wed, 09 Aug 2017 02:45:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to; 
	bh=qtREleuJxwTupSHQx6GtVOacMwrg1cUoRI0dDpmgmg4=;
	b=mug2hR+mkAl8dKntJOXswMNugwi0bEXwGDQ84OayQ0iAmO2ZDISwVlAhTdcYqDK0cA
	0aUaGZ6HSzkugbVKGQq1iY9RjsRZ9ZneHKdV/rxu9FhgrGmRyRFdgEiClhiCBAmwZBoE
	CtXX64F1psXbyqMX/5GBLwArh9f98AGvrVKmGWPUGWQ/1spJ6xUfzUdvzJSHXPqN+xih
	8ltVaQwgUyiOhisfYV5v7Sls50OVLY7fftmNyjX1SVujugDGhPxB2qB6dX6N4r4agQ8D
	KWqAkBcym+qFoywc4oXPjRXVApw6rDxBP9as72Pdl8Us9bWZNAsk0IPbN6LRvyaekrKE
	W0Zg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to;
	bh=qtREleuJxwTupSHQx6GtVOacMwrg1cUoRI0dDpmgmg4=;
	b=SfH+Ffa4NwUUNqI8clkvKpuMqA3+vldWvV7ldDsILdXtlMjRTVzxAdbi7ywwZawa+s
	gP34K6PsymzFALYnMT3TFuh5Oi7PSP4x9RkgZYRVHhBRWTzp2ziQI0TEVqCR9sPNCnKH
	P4+m8TtJ2Es8JDlBOxCtQg9pWXSYc+VojLTjeznk+TnfHQhhtGKCZGkZ5F2bo51/YnnZ
	2rT2aXaOQNYroG6Opn+lErY3RBifm5bR2wK8JAYhQbMFoZA4D+vI0R92Y7oJGSHEnNLI
	XzlFPffEOQFEYIGKKScHmob+dkxRporQYKPxCatCTpxIszFhq/AKoT9UehxHLc6NzOFI
	M9mA==
X-Gm-Message-State: AHYfb5hyWab4LbxXsNm6dgGMSorBu2Yx/YTgwxSA6aC+YrWKWtMvQu47
	rJc84Yl48s7MZRrrrVGHPDg+Tb1ZQozT
X-Received: by 10.55.182.198 with SMTP id g189mr9276698qkf.316.1502271934468; 
	Wed, 09 Aug 2017 02:45:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.96.9 with HTTP; Wed, 9 Aug 2017 02:45:34 -0700 (PDT)
In-Reply-To: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
From: Sam <batmanustc@gmail.com>
Date: Wed, 9 Aug 2017 17:45:34 +0800
Message-ID: <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
Subject: Re: Why my AT_CHECK() can't work?
To: autoconf@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c09::22b
X-Mailman-Approved-At: Wed, 09 Aug 2017 10:19:42 -0400
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2017 09:45:39 -0000

Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
again, log is :

./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
> --- -   2017-08-09 17:41:24.809066088 +0800
> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
>  2017-08-09 17:41:24.807150522 +0800
> @@ -1,5 +1,5 @@
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> 789. netdev-dpdk.at:23: 789. netdev-dpdk - dpdk/bond-show (
> netdev-dpdk.at:23): FAILED (netdev-dpdk.at:28)


I don't know where is the difference....

2017-08-09 17:15 GMT+08:00 Sam <batmanustc@gmail.com>:

> Hi all,
>
> I'm using autotest to test ovs, and I write a new *.at file using only one
> AT_CHECK sentence like this:
>
> AT_CHECK([ovs-appctl dpdk/bond-show dpdkb2], [0], [stdout])
>> AT_CHECK([[sed '/ACTIVE/p' stdout | head -4]], [0], [[LACP actor_state
>> ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING]])
>
>
> but this *.at file failed, log is:
>
> 789. netdev-dpdk.at:23: testing netdev-dpdk - dpdk/bond-show ...
>> ./netdev-dpdk.at:27: ovs-appctl dpdk/bond-show dpdkb2
>> stdout:
>> ---- dpdkb2 ----
>> bond_mode: 4
>> slave 0:
>> active
>> mac address ec:f4:bb:e1:1a:40
>> Link Up - speed 10000 Mbps - full-duplex
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>  rx pkts=268449, bytes=16502449, mcasts=0, drop=0, errs=0, nombufs=0
>>  tx pkts=261, bytes=32020, errs=0
>> slave 1:
>> active
>> mac address ec:f4:bb:e1:1a:42
>> Link Up - speed 10000 Mbps - full-duplex
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>  rx pkts=296190, bytes=17934647, mcasts=0, drop=0, errs=0, nombufs=0
>>  tx pkts=254, bytes=31496, errs=0
>> ./netdev-dpdk.at:28: sed '/ACTIVE/p' stdout | head -4
>> --- -   2017-08-09 16:59:18.802810195 +0800
>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
>>  2017-08-09 16:59:18.801176471 +0800
>> @@ -1,4 +1,5 @@
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +---- dpdkb2 ----
>> +bond_mode: 4
>> +
>> +slave 0:
>> +
>> 789. netdev-dpdk.at:23: 789. netdev-dpdk - dpdk/bond-show (
>> netdev-dpdk.at:23): FAILED (netdev-dpdk.at:28)
>
>
> 1. I don't know what "+" "-" means, and why there are "+" and "-"?
> 2. I run `ovs-appctl dpdk/bond-show dpdkb2 | sed -n '/ACTIVE/p' | head
> -4`, result is:
>
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>
> That's exactly what I matched in AT_CHECK, why it fails?
>
> Autotest is really hard to use...
>

From MAILER-DAEMON Wed Aug 09 10:32:45 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfS2P-0001GY-HR
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 10:32:45 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36165)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfS2M-0001GK-8j
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:32:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfS2J-0004F3-50
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:32:42 -0400
Received: from mx1.redhat.com ([209.132.183.28]:60246)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dfS2I-0004CZ-Ql
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:32:39 -0400
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id CF741CD560;
	Wed,  9 Aug 2017 14:32:35 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CF741CD560
Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.120.43] (ovpn-120-43.rdu2.redhat.com [10.10.120.43])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 59787912BA;
	Wed,  9 Aug 2017 14:32:35 +0000 (UTC)
Subject: Re: Why my AT_CHECK() can't work?
To: Sam <batmanustc@gmail.com>, autoconf@gnu.org
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <9fd82fce-dc9e-22d9-4386-edd87d38a3cd@redhat.com>
Date: Wed, 9 Aug 2017 09:32:34 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="orvNbntQXu6Qve0i04h9siPsaDlSu7wrl"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.30]);
	Wed, 09 Aug 2017 14:32:35 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2017 14:32:43 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--orvNbntQXu6Qve0i04h9siPsaDlSu7wrl
From: Eric Blake <eblake@redhat.com>
To: Sam <batmanustc@gmail.com>, autoconf@gnu.org
Message-ID: <9fd82fce-dc9e-22d9-4386-edd87d38a3cd@redhat.com>
Subject: Re: Why my AT_CHECK() can't work?
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
In-Reply-To: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 08/09/2017 04:15 AM, Sam wrote:
> Hi all,
>=20
> I'm using autotest to test ovs, and I write a new *.at file using only =
one
> AT_CHECK sentence like this:
>=20
> AT_CHECK([ovs-appctl dpdk/bond-show dpdkb2], [0], [stdout])
>> AT_CHECK([[sed '/ACTIVE/p' stdout | head -4]], [0], [[LACP actor_state=


Note - this invocation of sed will print EVERY line, as well as printing
the lines that contain ACTIVE a second time.

Also, 'head -4' is obsolete syntax that is not portable to all machines;
'sed -n4' is newer (and given your use of ovs-appctl, probably works on
all machines that you care about).

You probably meant to use [[sed -n '/ACTIVE/p' stdout | head -n4]] or
even [[grep ACTIVE stdout | head -n4]]

>> ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING]])
>=20

>> ./netdev-dpdk.at:28: sed '/ACTIVE/p' stdout | head -4
>> --- -   2017-08-09 16:59:18.802810195 +0800
>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout=

>>  2017-08-09 16:59:18.801176471 +0800
>> @@ -1,4 +1,5 @@
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +---- dpdkb2 ----
>> +bond_mode: 4
>> +
>> +slave 0:
>> +
>> 789. netdev-dpdk.at:23: 789. netdev-dpdk - dpdk/bond-show (
>> netdev-dpdk.at:23): FAILED (netdev-dpdk.at:28)
>=20
>=20
> 1. I don't know what "+" "-" means, and why there are "+" and "-"?

That is the output of 'diff'.  '-' lines are what you EXPECTED the
output to contain, '+' lines are what the output ACTUALLY contained.

> 2. I run `ovs-appctl dpdk/bond-show dpdkb2 | sed -n '/ACTIVE/p' | head =
-4`,
> result is:

Notice that what you ran by hand limited the sed output to just the
interesting lines, rather than the first four lines where lines
containing ACTIVE were doubled.

> That's exactly what I matched in AT_CHECK, why it fails?

No, it's not exactly what you passed to AT_CHECK ;)

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--orvNbntQXu6Qve0i04h9siPsaDlSu7wrl
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmLHQIACgkQp6FrSiUn
Q2p8mwf8DbOJNwwUxaeTke5enJhJNe5xaQmTDXdmKPe7Gy9cjnRMlwVLFVrMVrxE
vGMt9nQSRpUjo4qMbW9XNETts40ednHh7oKtm9STzmkLImt2mHyG8+nvXsTxEJj4
MP4eHw2cjgKycORpcKcQDmujqUnBSvExCo57BIK5VHXmsvgZzImVKz8nYtE4IxGT
t4NXOvJpIyJ7MhJmLxsm2Mipg48oGv9epRcOkW+XzY5NKw6MKrgtBj2BszSJmfRq
mXQ+bLlrLNiSO0/y2A6wRq77OIO3C6DYQY6IGJc1LM1ELO/bee5wUhVPWF+jGQGf
jxHl4fRVQqBnhfDoayLvqljRrenyhA==
=J0We
-----END PGP SIGNATURE-----

--orvNbntQXu6Qve0i04h9siPsaDlSu7wrl--


From MAILER-DAEMON Wed Aug 09 10:35:02 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfS4c-0001bc-R6
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 10:35:02 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37011)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfS4Z-0001b6-RD
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:35:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfS4W-0006nC-Of
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:34:59 -0400
Received: from mx1.redhat.com ([209.132.183.28]:48196)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dfS4W-0006m1-ED
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:34:56 -0400
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id 6DFE266239;
	Wed,  9 Aug 2017 14:34:55 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6DFE266239
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.120.43] (ovpn-120-43.rdu2.redhat.com [10.10.120.43])
	by smtp.corp.redhat.com (Postfix) with ESMTP id C5BD1912B1;
	Wed,  9 Aug 2017 14:34:54 +0000 (UTC)
Subject: Re: Why my AT_CHECK() can't work?
To: Sam <batmanustc@gmail.com>, autoconf@gnu.org
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
Date: Wed, 9 Aug 2017 09:34:52 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="c3eFa9sE90mPbmsSnVLxFoVdKeOXBdECS"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.28]);
	Wed, 09 Aug 2017 14:34:55 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2017 14:35:01 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--c3eFa9sE90mPbmsSnVLxFoVdKeOXBdECS
From: Eric Blake <eblake@redhat.com>
To: Sam <batmanustc@gmail.com>, autoconf@gnu.org
Message-ID: <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
Subject: Re: Why my AT_CHECK() can't work?
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
 <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
In-Reply-To: <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 08/09/2017 04:45 AM, Sam wrote:
> Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
> again, log is :
>=20
> ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
>> --- -   2017-08-09 17:41:24.809066088 +0800
>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout=

>>  2017-08-09 17:41:24.807150522 +0800
>> @@ -1,5 +1,5 @@
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING

Could this be a difference in line endings between what your .at file
used and what stdout contains (which in turn is what line endings
ovs-appctl outputs)?

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--c3eFa9sE90mPbmsSnVLxFoVdKeOXBdECS
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmLHY0ACgkQp6FrSiUn
Q2pZ4gf6A7+gOJijtl9oWF1oqT2MWPpbK8rkq74OEfrjmVVUukoqupED1vCmocbP
fFIXUUnkyduT15sP5RAh3glVu2ps79FQph5SzySLemsOms68IBSmPslJxjapmngC
/EYKBrbGpFaHsomSbkJryxMsndx27CFSIgCmNOUOepuBA55xShtjNWWn+URamb5u
Fixd+TSCfBk6nyLnz9AgTsJTvpBKfGVEgM/R+PiRayzHCKwgiK8oC0PJPhuigoct
l3o0P6+HdoJgs5kGIFJTC/nbwS/8tDjYHRWmZKp9sKoX3EGYEydOk0rtaKldmW8N
XJVoF+Ri4xLiL63T0dvFpIXd11yoeQ==
=/05L
-----END PGP SIGNATURE-----

--c3eFa9sE90mPbmsSnVLxFoVdKeOXBdECS--


From MAILER-DAEMON Wed Aug 09 10:38:01 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfS7V-0002JS-6x
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 10:38:01 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38059)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <zackw@panix.com>) id 1dfS7Q-0002Ip-6R
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:37:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <zackw@panix.com>) id 1dfS7N-0002gj-05
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:37:56 -0400
Received: from mailbackend.panix.com ([166.84.1.89]:52722)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <zackw@panix.com>) id 1dfS7M-0002eG-Rp
	for autoconf@gnu.org; Wed, 09 Aug 2017 10:37:52 -0400
Received: from mail-io0-f174.google.com (mail-io0-f174.google.com
	[209.85.223.174])
	by mailbackend.panix.com (Postfix) with ESMTPSA id 016BC11337
	for <autoconf@gnu.org>; Wed,  9 Aug 2017 10:37:50 -0400 (EDT)
Received: by mail-io0-f174.google.com with SMTP id o9so25794316iod.1
	for <autoconf@gnu.org>; Wed, 09 Aug 2017 07:37:50 -0700 (PDT)
X-Gm-Message-State: AIVw113OLr4+opU8pR6M8TJeqcVY6Cy+vtRJ4UJNw4sMrcF9IPgQk5V2
	6+5klnroSoHNachKqoKfAtHWN8ctRA==
X-Received: by 10.107.18.94 with SMTP id a91mr7162613ioj.119.1502289470126;
	Wed, 09 Aug 2017 07:37:50 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.2.77 with HTTP; Wed, 9 Aug 2017 07:37:49 -0700 (PDT)
In-Reply-To: <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
From: Zack Weinberg <zackw@panix.com>
Date: Wed, 9 Aug 2017 10:37:49 -0400
X-Gmail-Original-Message-ID: <CAKCAbMiKsWMUtfRyDcZtU+62xBXJhLmNnWtT5zvtHsLoYuiSaQ@mail.gmail.com>
Message-ID: <CAKCAbMiKsWMUtfRyDcZtU+62xBXJhLmNnWtT5zvtHsLoYuiSaQ@mail.gmail.com>
Subject: Re: Why my AT_CHECK() can't work?
To: Eric Blake <eblake@redhat.com>
Cc: Sam <batmanustc@gmail.com>, Autoconf <autoconf@gnu.org>
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux (Android) [fuzzy]
X-Received-From: 166.84.1.89
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Aug 2017 14:37:59 -0000

On Wed, Aug 9, 2017 at 10:34 AM, Eric Blake <eblake@redhat.com> wrote:
> On 08/09/2017 04:45 AM, Sam wrote:
>> Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
>> again, log is :
>>
>> ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
>>> --- -   2017-08-09 17:41:24.809066088 +0800
>>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
>>>  2017-08-09 17:41:24.807150522 +0800
>>> @@ -1,5 +1,5 @@
>>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>
> Could this be a difference in line endings between what your .at file
> used and what stdout contains (which in turn is what line endings
> ovs-appctl outputs)?

It could also be a difference between spaces and tabs.


From MAILER-DAEMON Wed Aug 09 22:56:26 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfde6-0002uy-5N
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 22:56:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50995)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfde3-0002uc-9I
	for autoconf@gnu.org; Wed, 09 Aug 2017 22:56:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfde1-0001Se-LX
	for autoconf@gnu.org; Wed, 09 Aug 2017 22:56:23 -0400
Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:34698)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <batmanustc@gmail.com>)
	id 1dfde1-0001SM-GT
	for autoconf@gnu.org; Wed, 09 Aug 2017 22:56:21 -0400
Received: by mail-qk0-x22c.google.com with SMTP id u139so46225033qka.1
	for <autoconf@gnu.org>; Wed, 09 Aug 2017 19:56:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=A2RLy8djigiRT0jBlfgITuw5k3qzX57hjUfIm36G0Q4=;
	b=B2wB+UwuL0l28vPmruKz0rAIhxxuvuvKkVrgPe1Sjeb41DQWAMCm4GGNOx8SuRlASK
	PGKkWCwPuF0MvNSIna4ddai2YfEDHrimHvMPtnSd2CgxQMZebkl3H4JtW8WNiGhoWg2y
	p4doukW6GrHGZ4g36t3iGO/Y1EeEUVbydXR9O+AOKJ0p+6kOALKeUFXGmZirrAhQC/Ns
	x7a1BRQQGbD1ue7O1kR7+MbWmqkdpQn1fUt97lN4pRJidOtIqk2TB6/jrXUWczvfrhnW
	DJmOGmG1h30n39yUCycTNOopYFp7dfHGfOT6Rm4pXY4/oXXOfU5ihK8w+x49iFfpIM7s
	ZDaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=A2RLy8djigiRT0jBlfgITuw5k3qzX57hjUfIm36G0Q4=;
	b=ZY5KbrGQvlyi/2u6Xoo7wg8GC92rbZLQ7mH5ukquuFM3pBUuRdpal2IlGKNQeEvdD1
	aSbPlcYt4WVZvNJ9GzvpY5Htrcxu5q6WqBufsBK2QN+VRts0wKxmi1bz52UcylJJjTuf
	vNWzh2V+BCK+QC/kAfEhrShy/dgx6/NNTrLQbMFWjM3HxXW9/5hV0q51aZqKGWGByub7
	s8Cix2O1akJlsQ5itV/K0qyJe3/Aq7JWNuN/ctUfLh4/MCm9wPRbDsdEaGGKLtZZJtgT
	zojS7xWAuXmRKxv/9gVEgURpGJvpTwsfUdevH11+kK3wbDib/3QAMnMFpU+BElxQ5ZeU
	8o8Q==
X-Gm-Message-State: AHYfb5gSlMS3t/ttYvJX7DTX4IyctEmOm6o5yxAK7wOFTuzcNyrFdRei
	7pOip3LCgQ4M2/Zu83XiJAn+2ZoS0Q==
X-Received: by 10.55.177.133 with SMTP id a127mr12312301qkf.303.1502333780816; 
	Wed, 09 Aug 2017 19:56:20 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.96.9 with HTTP; Wed, 9 Aug 2017 19:56:20 -0700 (PDT)
In-Reply-To: <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
From: Sam <batmanustc@gmail.com>
Date: Thu, 10 Aug 2017 10:56:20 +0800
Message-ID: <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
Subject: Re: Why my AT_CHECK() can't work?
To: Eric Blake <eblake@redhat.com>
Cc: autoconf@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c09::22c
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Aug 2017 02:56:24 -0000

Yes, it's because a space at the end of line:

--- -^I2017-08-10 10:51:06.097868811 +0800$
> +++
> /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout^I2017-08-10
> 10:51:06.096038720 +0800$
> @@ -1,5 +1,5 @@$
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $


but in my match, I add a space, I don't know why it doesn't work.

AT_CHECK([[awk '/ACTIVE/' stdout | head -4]], [0], [LACP actor_state ACTIVE
> AGGREGATION SYNC COLLECTING DISTRIBUTING $
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> ])$


2017-08-09 22:34 GMT+08:00 Eric Blake <eblake@redhat.com>:

> On 08/09/2017 04:45 AM, Sam wrote:
> > Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
> > again, log is :
> >
> > ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
> >> --- -   2017-08-09 17:41:24.809066088 +0800
> >> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
> >>  2017-08-09 17:41:24.807150522 +0800
> >> @@ -1,5 +1,5 @@
> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
> >> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>
> Could this be a difference in line endings between what your .at file
> used and what stdout contains (which in turn is what line endings
> ovs-appctl outputs)?
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
>
>

From MAILER-DAEMON Wed Aug 09 23:06:01 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfdnN-0006Lg-Tb
	for mharc-autoconf@gnu.org; Wed, 09 Aug 2017 23:06:01 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52687)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfdnL-0006KM-06
	for autoconf@gnu.org; Wed, 09 Aug 2017 23:06:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1dfdnJ-0000xl-BP
	for autoconf@gnu.org; Wed, 09 Aug 2017 23:05:58 -0400
Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:37540)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <batmanustc@gmail.com>)
	id 1dfdnJ-0000xC-61
	for autoconf@gnu.org; Wed, 09 Aug 2017 23:05:57 -0400
Received: by mail-qt0-x230.google.com with SMTP id 16so47249650qtz.4
	for <autoconf@gnu.org>; Wed, 09 Aug 2017 20:05:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=zxVy8zZywojHT+ENTaQ0fb6K/+trLJnAgzrJ7J6LArg=;
	b=EqKe1pzbASfw4i04q1z690bcqQ5OX8Ca+bklzy27rAkhyTfIy/IO+9iJF0soD65pHj
	mXGjCtbQ9Z4rVRmzsIyWPIrSS6coZu5RIBQwA1w0WEPtaraEjqVw6wnsKoOEzbksXa94
	LQkUuwPd1+orIez7QQ4J+UWOJn3VZXNLANkIE8AcGjGSxdz1+SFQnXsZ0NfLm/Gp82QU
	62kPAZLgxFOnaoYvhbghOZhXCtqfshmdz3hYj12gLiRmBmr/RSCET3WgeEfeP9wUNP2y
	JbKqS31BjteDSwYI6P+Ub0TeuJwPGJ7x0Lv/z1qJjKQAOeJ8RkWRFeUM2A4sBhNjGW3n
	YFYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=zxVy8zZywojHT+ENTaQ0fb6K/+trLJnAgzrJ7J6LArg=;
	b=pKXOj205D2fIk91xj9HWC0UYZpwB2o518DqSlfGhax4gumJSQiVr4scqZ22rIgGb8O
	7GFPWzFoL710fF2xgdvzt4e7UmjKPk2Px7D3jY9LPMq9uvv5zRMSVnfW6zLwM7YRJblM
	l+HAUMVvjQcqIqVeZXsGcQ1k6499kCNGYTprkLjUzFWHy8r8IXJfOmjU3KY9Ixp9oe5u
	7VotZrxxg7yL9ukHWF31pm+3vd3R8aqXtPUpf/kt4NeYuiTgVvCoZur9PiC+XknYOmfF
	2GkIECHDvRvO34/bCpMmI2FOZ5DnV8APxc1MagbkP3t3xSDwHHucTkwE6yuHvIWpOo1q
	X5+A==
X-Gm-Message-State: AHYfb5hNFBEFrHYhJ1qY2MJZx0Hs1zFAsWflHk7JiSpcnDtPA386CcPr
	8GgMVRyLmiUeVH41hyMgY4uAWBO8/Q==
X-Received: by 10.200.46.41 with SMTP id r38mr14265353qta.316.1502334356680;
	Wed, 09 Aug 2017 20:05:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.96.9 with HTTP; Wed, 9 Aug 2017 20:05:56 -0700 (PDT)
In-Reply-To: <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
	<CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
From: Sam <batmanustc@gmail.com>
Date: Thu, 10 Aug 2017 11:05:56 +0800
Message-ID: <CAOE=1Z2NELgzq6X65G6bkPDaRNyDjCVZ+Yt+MqPquGZM0fAB8g@mail.gmail.com>
Subject: Re: Why my AT_CHECK() can't work?
To: Eric Blake <eblake@redhat.com>
Cc: autoconf@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c0d::230
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Aug 2017 03:06:00 -0000

At last, I trim end line space, then it works. I have to say, compare to
python, shell is really hard, autotest is harder...

2017-08-10 10:56 GMT+08:00 Sam <batmanustc@gmail.com>:

> Yes, it's because a space at the end of line:
>
> --- -^I2017-08-10 10:51:06.097868811 +0800$
>> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout^I2017-08-10
>> 10:51:06.096038720 +0800$
>> @@ -1,5 +1,5 @@$
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
>> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
>> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING$
>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>
>
> but in my match, I add a space, I don't know why it doesn't work.
>
> AT_CHECK([[awk '/ACTIVE/' stdout | head -4]], [0], [LACP actor_state
>> ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> ])$
>
>
> 2017-08-09 22:34 GMT+08:00 Eric Blake <eblake@redhat.com>:
>
>> On 08/09/2017 04:45 AM, Sam wrote:
>> > Then I change commd into `awk '/ACTIVE/' stdout | head -4`, it failed
>> > again, log is :
>> >
>> > ./netdev-dpdk.at:28: awk '/ACTIVE/' stdout | head -4
>> >> --- -   2017-08-09 17:41:24.809066088 +0800
>> >> +++ /home/gangyewei-3/mvs/mvs/tests/testsuite.dir/at-groups/789/stdout
>> >>  2017-08-09 17:41:24.807150522 +0800
>> >> @@ -1,5 +1,5 @@
>> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> -LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> -     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> +LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>> >> +     partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING
>>
>> Could this be a difference in line endings between what your .at file
>> used and what stdout contains (which in turn is what line endings
>> ovs-appctl outputs)?
>>
>> --
>> Eric Blake, Principal Software Engineer
>> Red Hat, Inc.           +1-919-301-3266
>> Virtualization:  qemu.org | libvirt.org
>>
>>
>

From MAILER-DAEMON Thu Aug 10 09:40:33 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dfnhR-0002Wy-7H
	for mharc-autoconf@gnu.org; Thu, 10 Aug 2017 09:40:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50056)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfnhO-0002Wo-5M
	for autoconf@gnu.org; Thu, 10 Aug 2017 09:40:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dfnhI-0007fE-1o
	for autoconf@gnu.org; Thu, 10 Aug 2017 09:40:30 -0400
Received: from mx1.redhat.com ([209.132.183.28]:44366)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dfnhH-0007ea-OJ
	for autoconf@gnu.org; Thu, 10 Aug 2017 09:40:23 -0400
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
	[10.5.11.12])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id AE9D2C04D2AB;
	Thu, 10 Aug 2017 13:40:22 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AE9D2C04D2AB
Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.120.43] (ovpn-120-43.rdu2.redhat.com [10.10.120.43])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 2B5599783E;
	Thu, 10 Aug 2017 13:40:21 +0000 (UTC)
Subject: Re: Why my AT_CHECK() can't work?
To: Sam <batmanustc@gmail.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
	<CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
Cc: autoconf@gnu.org
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
Date: Thu, 10 Aug 2017 08:40:18 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="wMFbURDv1rXjLgsO1HPgndXQcglRw9m6g"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.31]);
	Thu, 10 Aug 2017 13:40:22 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Aug 2017 13:40:31 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--wMFbURDv1rXjLgsO1HPgndXQcglRw9m6g
From: Eric Blake <eblake@redhat.com>
To: Sam <batmanustc@gmail.com>
Cc: autoconf@gnu.org
Message-ID: <9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
Subject: Re: Why my AT_CHECK() can't work?
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
 <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
 <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
 <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
In-Reply-To: <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 08/09/2017 09:56 PM, Sam wrote:
> Yes, it's because a space at the end of line:
>=20
> --- -^I2017-08-10 10:51:06.097868811 +0800$
>> +++

> but in my match, I add a space, I don't know why it doesn't work.
>=20
> AT_CHECK([[awk '/ACTIVE/' stdout | head -4]], [0], [LACP actor_state AC=
TIVE
>> AGGREGATION SYNC COLLECTING DISTRIBUTING $
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
>> ])$

Because autoconf eats trailing spaces by default (it's a feature).  You
can work around it by TELLING autoconf that you intend for there to be
trailing space:

AT_CHECK(..., [[trailing space preserved here: @&t@
but not here
more text]])

The @&t@ quadrigraph (mnemonic 'and-t' sounds similar to 'empty')
expands to nothing, but is converted after the point when trailing
whitespace is eaten.

The manual documents this:
https://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--wMFbURDv1rXjLgsO1HPgndXQcglRw9m6g
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmMYkMACgkQp6FrSiUn
Q2qtfwf/a6LoXEg39gnxGtxVvPvoMc1LA20UJ/jxdX4dpatiZ5MTBp6zC6AXDpmc
dkU+3xhSOZemAdF6a6dvaPJ3Q9EfQts5MRcmOmc5tv61gZLOGuKueEJaYDuXw0sq
uRWTM2wgNnWjCswAfzJZBD62Lq5QUASkdlZ1bR1LTfItWVAffnt6Fq6cMHNQWKp5
mgLvkxjJmtuxQLqGF97A/Qg3o8OR+7sxk3CN1+qwrhcoIbQnlixEoDO0bNoMdu17
aI6z+lvtrg4f50Fi/Y3+gqjHAcBvqCwd4+hn80hhy3EA9P9gGrEw8zhYfWPKdS9q
M9+Sb4hAD+EV+wqBW1kFT0wiBswCsQ==
=kemO
-----END PGP SIGNATURE-----

--wMFbURDv1rXjLgsO1HPgndXQcglRw9m6g--


From MAILER-DAEMON Mon Aug 14 09:09:17 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dhF7N-0005zh-2a
	for mharc-autoconf@gnu.org; Mon, 14 Aug 2017 09:09:17 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37555)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhCPZ-0002MA-Bx
	for autoconf@gnu.org; Mon, 14 Aug 2017 06:15:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhCPV-0005pO-6e
	for autoconf@gnu.org; Mon, 14 Aug 2017 06:15:53 -0400
Received: from mout.gmx.net ([212.227.17.21]:52136)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <tomuxiong@gmx.com>) id 1dhCPU-0005ot-Sc
	for autoconf@gnu.org; Mon, 14 Aug 2017 06:15:49 -0400
Received: from [192.168.0.9] ([80.216.5.236]) by mail.gmx.com (mrgmx101
	[212.227.17.174]) with ESMTPSA (Nemesis) id 0Lip2P-1dBA353VoD-00czCG
	for <autoconf@gnu.org>; Mon, 14 Aug 2017 12:15:46 +0200
To: autoconf@gnu.org
From: Thomas Nyberg <tomuxiong@gmx.com>
Subject: "Packing" binary data into object files using autotools
Message-ID: <048a6650-3dba-0f6a-df2a-002adbae6eb7@gmx.com>
Date: Mon, 14 Aug 2017 12:19:06 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: sv
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:GvD7joIhr7J5sV7/d1nH4dR2KUS93zTOa8QJSWR86PHOQtsyox5
	29E6pAgQu9F93angC6bAyjlEFPSz+7LA/XLfCZ6TfAEy2nUQsapY/ZeKCIxnfMZOpWDK8Qc
	a1hpusp/4aFaQT2417JB91F/cSCppbhFG6HxhodFcy9/vdxmPh8wsRAjA+FT67Nq7rkY5Jh
	swPrJ5snZ6I6vRSxghTUQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:mwIMRCpmtag=:oBBXbMsb6W3itU0Y9Hzh/Z
	I3yVSd4WNx6zr8E8LpueUH7NcHSEc3uROO1L+GEWdzFzcjb5W96WzRcXcGxvi9U47zI7viSwO
	sCcglQks22phVMymHBcjY+8ooU725BHc54ffvVsjZ2uCX8A2pZ3ri135Bhjx0I0Xisx5beYag
	/F6lukQB/m6i0yK1xyUa/7FWRDwbl9YnWWtIw64vvp4PsQdqDbhJMThKFbKcW4XX2gQauG0vD
	9NqKsubLcYCQUCb9jwh3keZbTtEIylU2udhzghfBykKWQJBBbOc5qbq+P6MR/cLOUp3a8fKw3
	J1vyTJIYywC2E98Nm0VvBg/io5J5s9vxkdFlJeDrulKsAUXzG9pcCz/RT/spYEeeAcRIPCAbL
	DxnVtwhNnGWrTrt0WvXPshnq3LIWbTMbcUtM1jCyqqPP+BU5Iocf1u3g1tROt9csW2+vx63Iz
	KSh311KxkO9y9RsHrIKgcfLBDl7Ur2LkRw/joYAtbfivUO4R6Z2m7Spsn6JGTHUaq8ZeeJxMP
	hBnN7ZFY2izeOY9ZD9D2TbOjARL0mSfyazLf7L+xw+kK01uxusuy/D2NB70ZkFUu11erKei/c
	0cIkczg+mfgqdoGbhZx9wzJfpvJ+JIu/d49Nvf27JvtWzhuQ53cB+6DWgjr/hW7cAD0t0cv3h
	5SiRjomR6Cf1nEPrJMz45v52rpze5OaPESJcYWcdiD+MipiMdJjloHm3QWVNFeQgWP2EJ5ld0
	MPXT+JLp2W8/mkLUx+0YCFbWZNwrVo0i/sQN6VKzoYsDygRzFMfutW148OKPwblWXPlvHzIxi
	Vrp0Jbu56YG5ALX5Ix3eEoeloY8ME6NqIn24yVIUIE90TWXfe8=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.17.21
X-Mailman-Approved-At: Mon, 14 Aug 2017 09:09:16 -0400
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Aug 2017 10:15:54 -0000

Hello,

I have a Makefile which I'm trying to convert to an autotools setup.
It's complicated by the fact that some code is not compiled until
runtime. I'll try to be as detailed as possible. In my hand-written
Makefile I have the following setup. I have a rule which tars up some
files and puts it in `code.tar`. Next I inject that code into an object
file using some basic gnu assembler instructions. That object file is
linked elsewhere into the final library. To be more specific, I have the
following situation:

    # Rule injecting a tar archive into object code.
    -------------------------------------------------------------------
    code_archive_tar:
        tar c --exclude='*.o' code/ > code.tar
        as -o code_archive.o code_archive.S
        rm -f code.tar
    -------------------------------------------------------------------

    # This is the actual code_archive.S file referenced above:
    -------------------------------------------------------------------
        .section .rodata
        .global code_archive_tar
        .type   code_archive_tar, @object
        .align  4
    code_archive_tar:
        .incbin "code.tar"
    code_archive_tar_end:
        .global code_archive_tar_size
        .type   code_archive_tar_size, @object
        .align  4
    code_archive_tar_size:
        .int    code_archive_tar_end - code_archive_tar
    -------------------------------------------------------------------

    # The actual data is accessed in another (C++) source file as
    # follows:
    -------------------------------------------------------------------
    extern char code_archive_tar[];
    extern unsigned code_archive_tar_size;
    -------------------------------------------------------------------

The important parts of my current Makefile.am specified its required
sources as follows:

    # Makefile.am
    -------------------------------------------------------------------
    [...]

    library_la_SOURCES = \
        ... [A bunch of files...]

    libmerriamengine_la_LDFLAGS = \
        ... [A bunch of libraries...]

    CXXFLAGS = \
        ... [A bunch of compiler flags]

    [...]
    -------------------------------------------------------------------

It's hard for me to fit my own setup into this since autotools is
finding all the different files and linking them pretty automagically.
Basically what I need is (1) to signal some way for the tar procedure to
occur before the rest of the linking takes place and (2) to actually
signal to the linking phase that the object file that has been created
needs also to be added to the link itself.

Hopefully this isn't too confusing. I was reading about BUILT_SOURCES,
but I'm not totally sure that that is what I require. I also have added
in explicit Makefile rules into Makefile.am (e.g. the rule to tar up the
folder structure), but I'm having trouble getting (1) and (2) to work in
the last paragraph.

Any help is appreciated! Definitely yell at me if you need more info or
something I'm saying doesn't make sense! Thanks a lot!

Cheers,
Thomas


From MAILER-DAEMON Mon Aug 14 09:28:17 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dhFPl-00079W-LA
	for mharc-autoconf@gnu.org; Mon, 14 Aug 2017 09:28:17 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59288)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhFPj-00078u-NP
	for autoconf@gnu.org; Mon, 14 Aug 2017 09:28:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhFPe-00047J-NU
	for autoconf@gnu.org; Mon, 14 Aug 2017 09:28:15 -0400
Received: from mout.gmx.net ([212.227.15.18]:59983)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <tomuxiong@gmx.com>) id 1dhFPe-00046Q-Dc
	for autoconf@gnu.org; Mon, 14 Aug 2017 09:28:10 -0400
Received: from [192.168.0.9] ([80.216.5.236]) by mail.gmx.com (mrgmx002
	[212.227.17.184]) with ESMTPSA (Nemesis) id 0M2ts6-1dRECM29iA-00sbRP
	for <autoconf@gnu.org>; Mon, 14 Aug 2017 15:28:08 +0200
Subject: Re: "Packing" binary data into object files using autotools
To: autoconf@gnu.org
References: <048a6650-3dba-0f6a-df2a-002adbae6eb7@gmx.com>
From: Thomas Nyberg <tomuxiong@gmx.com>
Message-ID: <23b8c781-cc42-1538-f3ca-64f68801e36c@gmx.com>
Date: Mon, 14 Aug 2017 15:31:28 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <048a6650-3dba-0f6a-df2a-002adbae6eb7@gmx.com>
Content-Type: text/plain; charset=utf-8
Content-Language: sv
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:7UwavhYNMd01IKLsJE+/XjVpeSiyZhkjW3BIuWSC3uzYZ24E9jW
	pfpXya3VrVs3EKmQxkKSk4P/VjtpLHhhBRzFow1Id0OEWf7RqKqTVF5WRoIahQ+oTEKk4Io
	yKGfR0Xj3Cqz1HLAg4h5NWmblKKk0Zr9LQ5+2FQMu4HRfhHENZd2Lf0vODRVUulLnwT5iFE
	5bE0pxE+iYcYHyqq+ZQnA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:FdllZOn0jDs=:cRBJM/VRC+ur1tT85bRxnA
	5oY6Wh6jL28/XYdI1KyZZgXHzjmzCS5seSPYd8tzF9cpplqt2rBhZcHTeu6dHI8K+sPCEsc3Y
	545JHdo0jPuDLodtCZAcRNEVE/JAtnkCP7m8gNKw1P+txLYHoSZULSIWdqWZa3t5wFMMcyqK3
	tE890QmW2ToNatFhs5Ay8OMyZSBkUFaN4iYg61czNNOthsbdKHkvWjDGtgKI0+fyP2d8L06cP
	A7Daajon66Bt6OKT3Sc0lMWTFUaweIIk4GR5hV6iCZqVLRvXqm6Bxuf1qYp2I5f5WaG8EwCBz
	AOZYEbOKtRcMpBizQaKNgDYsKQErI/CjfvmLSieQ7rGAj+xP6cRiI5QLP06G8NNRpbgvCrXx1
	/nZu9ICDtEQQpnwnrMAjPbU+UdAn8Te7enZAR9mf2JAAeU6eDckPj3VFrj+t4/aNzjhIPH861
	elI9O+u/avkA93ZH2H9ZHIg/SpLWp/DVIyD5xUd4P0XE2QtVClkzths6k2YwjRaDE5UoRCOSU
	U0N5eysb4dxV/3Dzh5AFfdzi4cIjQk1P/KT6zW+rIRU34Wcs2dRTMkQ+XjVQmkGq8er0QzmZK
	fJqPAfvCqMmD3KZ/x84GD+WEEFbt1xwbaI2iotnIs7GvvgTGrIE8x4DBTR4HGQPQAZL0ncB9f
	nXBAvz1TtmvPU3OjkaVq7ps9/SPnhXuMzfoVkvCl7Rcn9yaFf2vYcO3G7ETH91oFrrpzYIU2R
	8doWW5swaLD5hHdEuR+Cd3dm36Ia6k6bljEdMayBpAlfCKspNtq9SEtkgkIHyvaWo8WpG7lhv
	aYPwxrW6bMTVwyXd6IutnAcC/fLX9oirCwu+wlkXUvs59SnSFM=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.15.18
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Aug 2017 13:28:16 -0000

Hello,

I just wanted to simplify my previous question. Say I'm starting with
this file:

    # Makefile.am
    -------------------------------------------------------------------
    [...]

    library_la_SOURCES = \
        ... [A bunch of files...]
	src/resources/code_archive.S
    -------------------------------------------------------------------

Where that `src/resources/code_archive.S` file is the assembly file from
my previous email. This works correctly, _if_ the file `code.tar` is
found in the current directory. In other words, what I would like is for
the the following rule to be executed prior to the compilation of
`src/resources/code_archive.S`:

    -------------------------------------------------------------------
    code_tar:
        tar c --exclude='*.o' code/ > code.tar
    -------------------------------------------------------------------

How do I add that as a pre-compilation "hook" for the
`src/resources/code_archive.S` file? (Also though not as important is it
possible to have the post-compilation hook removing it as well?)

Thanks again for any help.

Cheers,
Thomas


From MAILER-DAEMON Mon Aug 14 11:38:26 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dhHRh-00070P-ST
	for mharc-autoconf@gnu.org; Mon, 14 Aug 2017 11:38:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39027)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhHRf-0006yx-UH
	for autoconf@gnu.org; Mon, 14 Aug 2017 11:38:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tomuxiong@gmx.com>) id 1dhHRc-0000wE-Sz
	for autoconf@gnu.org; Mon, 14 Aug 2017 11:38:23 -0400
Received: from mout.gmx.net ([212.227.15.19]:59771)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <tomuxiong@gmx.com>) id 1dhHRc-0000vm-Iq
	for autoconf@gnu.org; Mon, 14 Aug 2017 11:38:20 -0400
Received: from [192.168.0.9] ([80.216.5.236]) by mail.gmx.com (mrgmx002
	[212.227.17.184]) with ESMTPSA (Nemesis) id 0LoVBq-1d6Jnc1q3O-00gZEI
	for <autoconf@gnu.org>; Mon, 14 Aug 2017 17:38:18 +0200
Subject: Re: "Packing" binary data into object files using autotools
To: autoconf@gnu.org
References: <048a6650-3dba-0f6a-df2a-002adbae6eb7@gmx.com>
	<23b8c781-cc42-1538-f3ca-64f68801e36c@gmx.com>
From: Thomas Nyberg <tomuxiong@gmx.com>
Message-ID: <d97573c6-b440-a516-3e85-6b3e7566b24f@gmx.com>
Date: Mon, 14 Aug 2017 17:41:38 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <23b8c781-cc42-1538-f3ca-64f68801e36c@gmx.com>
Content-Type: text/plain; charset=utf-8
Content-Language: sv
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:HgQIO4NHUktVHzltdKEa2zHrMIyaCPEsr9a+bFVcjPI2smOYbwZ
	WLyNwg6m93zUFCCwx6GSJjMceIwtVKQpT7718Ap+8S62gnCMZ4WWxC+vnEbzYgPbmQp+nvB
	sCZUk8MiBX2EzOrucb2Q4rSDXqzEdDBbTERRZaohqFXGXbyGNWQh/mMpuolotIBGXahkmHj
	Q8LRmgUfrBicOHNkliu+A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:XcLKzN2yTj4=:A+cGYj5ZjHB25tMQ5pQFmE
	xTGtLv8trGRLETLI/C8VTozzg3+w08/7kZr8tDvF9cEzut25MK+dMnrOWJAG/C9sCfqI8J0f6
	fj6cBfudptJCQnw/jfJ1G/jCj5lyWNhqG8mg9zfKv/BPXsrs2pXAfHzM7hd8r7mN85TWFhoKH
	YagH2oy8useD3AuW5v4K7SjUkk72Xx6YF5NaKIZ02oq0xXExqyx56xQ2WTpnq58NN2tGB28Ra
	FCfTFYZYF9wVjYLtYm7243zsTA5Rk+C44Ki8U83VgeZ8ONvRnUnIBL+CmiuYhYFVEKKqmCDHm
	UfjDup7SXBTAUyFBQtDhaxqJh92fNvzNhezz+GuasrYSHyzGj8RWqPw4+N8Ixer1ixfjY3hnx
	FZMlJxrqEeQ0zKdrAY44Rxr1s7tW8nnBrWbICxwsHjcMiDUFcqUgRA5ewyhG+h0+tQiy/V/y+
	7hmoqpaGTwc2fIrUzDE8oaQqKRrYKqMush/ttPgzOx5sMIOjCsluXBstCmdug7YDYsN42oFB1
	6KReTqz749il38a0xqBo2XbL6c33ZCu34A4sRThhY4bscwfA6Bd+EPs9FqORclS8QZFsIjt89
	tm8l/BVAXZ0gjywsxT9fCZYblqwWcRG9Mvx3Mg1Wv5ItRWrWXu5+Q/rwXhswt/k1ASWBlm3GX
	pg85hwg8p08c5rvxzZdaYpPIqUu/3q6s8YKMvcFei+faxXdLqqpC0RNPw/55PinmqYILQJUwC
	Pxqa4Zz+6lcF9Erd7IgduHcVyJCLI0BNOU1LCoze/0F6zi7awBMovP5Z3F4VGH6RalduobWMj
	i07v06GOhXVEJS4m0SzwMsxMwsxO6b/GRdm9VVAqS5nA+D9kJo=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 212.227.15.19
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Aug 2017 15:38:24 -0000

Hello,

I figured out the issue and wanted to resolve it on the list. It was
quite trivial to do this using BUILT_SOURCES (not so sure why I had so
much trouble...). Basically something like the following suffices:

    # Makefile.am
    -------------------------------------------------------------------
    [...]

    BUILT_SOURCES = code.tar

    code.tar:
        tar c code/ > code.tar

    CLEANFILES = code.tar

    library_la_SOURCES = \
        ... [A bunch of files...]
	src/resources/code_archive.S
    -------------------------------------------------------------------

This produces the necessary tar file in the current directory before
doing the rest of the compilation. The CLEANFILES target cleans it again
afterwards.

Cheers,
Thomas


From MAILER-DAEMON Mon Aug 14 16:18:28 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dhLoi-0008Rj-A9
	for mharc-autoconf@gnu.org; Mon, 14 Aug 2017 16:18:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35457)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gavinsmith0123@gmail.com>) id 1dhLof-0008PW-6s
	for autoconf@gnu.org; Mon, 14 Aug 2017 16:18:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gavinsmith0123@gmail.com>) id 1dhLoa-0008Nb-IS
	for autoconf@gnu.org; Mon, 14 Aug 2017 16:18:25 -0400
Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:38851)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <gavinsmith0123@gmail.com>)
	id 1dhLoa-0008N2-CV
	for autoconf@gnu.org; Mon, 14 Aug 2017 16:18:20 -0400
Received: by mail-wm0-x22e.google.com with SMTP id f15so1605263wmg.1
	for <autoconf@gnu.org>; Mon, 14 Aug 2017 13:18:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=from:date:to:cc:subject:message-id:references:mime-version
	:content-disposition:in-reply-to:user-agent;
	bh=3vgUJZwdn7UIZT/jj9wKwYNycjvxzIpA1NVfRE7f6t8=;
	b=IGYTsyULvhAlvFn64ue7ZS5nq6EAitUxgUKdBLQL5MJ3ieA20UXkIH0VyFue+LyCtt
	yvQa0yujd72Fwiq6mhMxeDAZXcCaPneoLFvJSfEvmt2JI2r5ZH3gNe8RCLln9f0D8Lvn
	GE/l43aZo8YZIaAO6KDNvq2ZKnSOpWGB1Lgq4ydw5A2cCnubbxr3cswB8+8fE6gjhjaN
	XNP/QpAeOmSimcN7QIsAxaX2r4yi3sIkk38dGAOx7umXsYtBv2l++iby0i1SGuLLuaIG
	nzmxRVK7twKxFsXXbG6yXz8BTOmgmtulkYm5HX2ORHrL6aeepxQLkcIS70owRkYIdX9C
	8vjw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:from:date:to:cc:subject:message-id:references
	:mime-version:content-disposition:in-reply-to:user-agent;
	bh=3vgUJZwdn7UIZT/jj9wKwYNycjvxzIpA1NVfRE7f6t8=;
	b=oomoFlKu2NteVHvLZKlhLFHNlcZu8hxaedO4A7t16+gK8CKyU+AdP55VDkKu9tOKjM
	uHUwOBiJKeFfpKz7d+NzzOegRHIbNbn4hpzuDREsPTweA9AQDWIeR4o+wx7QsYSgc+3q
	acIWbvAXixJ2jy38K8Q6XQypbDi2yxXgFUhXLIyVxepsh52/X9/V+4Cdqqpz1Ft1/+VD
	p07AyUgRA/31jGEWL7fiG0RVj/j+0zVREU6lyEwTK5nhGEbP8f/y7MiK5QMj9CHq6es1
	jfscpJxSiSeeXuVN285e+zmivGEx6dNqSNzuEje5HEYHP5fv9L32jGDf7Q/99jW6VrWq
	CLDA==
X-Gm-Message-State: AHYfb5ivYHIeyqsto6V69UK2mwPg7adhab1+0BjB7h7ROT3yba9hWwl1
	Vx3JoTTw3GOOoQ==
X-Received: by 10.28.155.84 with SMTP id d81mr65512wme.163.1502741898052;
	Mon, 14 Aug 2017 13:18:18 -0700 (PDT)
Received: from darkstar.example.net ([146.66.39.53])
	by smtp.gmail.com with ESMTPSA id
	m127sm122956wmm.46.2017.08.14.13.18.16
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Mon, 14 Aug 2017 13:18:16 -0700 (PDT)
From: Gavin Smith <gavinsmith0123@gmail.com>
X-Google-Original-From: Gavin Smith <GavinSmith0123@gmail.com>
Received: from darkstar.example.net (localhost [127.0.0.1])
	by darkstar.example.net (8.14.9/8.14.9) with ESMTP id v7EKJCJb029793;
	Mon, 14 Aug 2017 21:19:24 +0100
Received: (from g@localhost)
	by darkstar.example.net (8.14.9/8.14.9/Submit) id v7EKJClI029786;
	Mon, 14 Aug 2017 21:19:12 +0100
Date: Mon, 14 Aug 2017 21:19:12 +0100
To: Thomas Nyberg <tomuxiong@gmx.com>
Cc: autoconf@gnu.org
Subject: Re: "Packing" binary data into object files using autotools
Message-ID: <20170814201912.GA20000@darkstar>
References: <048a6650-3dba-0f6a-df2a-002adbae6eb7@gmx.com>
	<23b8c781-cc42-1538-f3ca-64f68801e36c@gmx.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <23b8c781-cc42-1538-f3ca-64f68801e36c@gmx.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2a00:1450:400c:c09::22e
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Aug 2017 20:18:26 -0000

On Mon, Aug 14, 2017 at 03:31:28PM +0200, Thomas Nyberg wrote:
> Hello,
> 
> I just wanted to simplify my previous question. Say I'm starting with
> this file:
> 
>     # Makefile.am
>     -------------------------------------------------------------------
>     [...]
> 
>     library_la_SOURCES = \
>         ... [A bunch of files...]
> 	src/resources/code_archive.S
>     -------------------------------------------------------------------
> 
> Where that `src/resources/code_archive.S` file is the assembly file from
> my previous email.


I don't know if it is any better than the solution you found, but 
another possibility may be to use the library_la_LIBADD variable, which 
I read is supposed to be used to list objects to be added into the library.
The idea is to list a file generated from 'src/resources/code_archive.S'
in this variable. However, according to the documentation I read, this
would have to be a *.lo file (Libtool object), so you would have to 
write Makefile rules to create such a thing (i.e. code_archive.lo 
instead of code_archive.o).

There are various suggestions on how to deal with built sources in the 
Automake manual:

https://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html


From MAILER-DAEMON Thu Aug 17 23:54:59 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1diYN9-00067l-4E
	for mharc-autoconf@gnu.org; Thu, 17 Aug 2017 23:54:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35696)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1diYN5-00066s-S7
	for autoconf@gnu.org; Thu, 17 Aug 2017 23:54:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <batmanustc@gmail.com>) id 1diYN4-0007zC-IA
	for autoconf@gnu.org; Thu, 17 Aug 2017 23:54:55 -0400
Received: from mail-qk0-x22b.google.com ([2607:f8b0:400d:c09::22b]:35365)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <batmanustc@gmail.com>)
	id 1diYN4-0007xW-CM
	for autoconf@gnu.org; Thu, 17 Aug 2017 23:54:54 -0400
Received: by mail-qk0-x22b.google.com with SMTP id 130so12416960qkg.2
	for <autoconf@gnu.org>; Thu, 17 Aug 2017 20:54:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc; bh=68L85xLH5V4Kg71FACqcd71+y1aD6/n89muYDk9ihT8=;
	b=DsccaMHTEwQgJjYR/CGTaXdwtwiABnVIbC2Z3nUs63+D6nJXtIvkK5jKj/bwaKgPdN
	+Uovq7JvbuX3shQ2WaR4LCR+huUQVsya2pp275Z1zPnSSVLALiL1+f5fSkmvJ5UOeXx1
	1X5G5F3zEvRRRhIy4fzsWTYs1OcV2UKdUf5hHyJhuGcoikMYJTBEPbJPlBzPcTJK1bo/
	hM5W7VnPl6Gv+nTHPgvCLVCFrc4X5UM3gWhTQ5pthrqCYWEog+3H+akeMUDCcyDYhvpu
	1StoKRfl/7as/6QGnLa3xVAXIkUu9Q+LOa0mFfvqqGGFPZAhUyzbIa0o1YIZscGwcJLQ
	W4zQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc;
	bh=68L85xLH5V4Kg71FACqcd71+y1aD6/n89muYDk9ihT8=;
	b=lOMCNjYjoL+nKouX5VllUb7vPWwqI8X5Xcuaj5PPwYGP3e+qzVEn7o1NHYZ/hrtba6
	9d8w3zAuHTysFkrC4CWXrOFqBIaagTEJehUJ0L+bivE3g5fHe+kEgw4V97phIZahOups
	M0/yLk9edhiE1mHYxZ1hbcZGeuPZVM+zfFbu+uJ/kFrTSDHz7OMeqkVdOJ5G5tAGu6jl
	pwDszYvVCN+0ZKqwZuxSVo0zrQFewoap4WgIwQ8ptrid44ojm0C8CtAgzdRLXmaqR6HB
	os35OlPgWIrQy2jRyxYXi6gzkgKC4QWr4IyLIBlbdxDOUHldnix7iEnAYm182LmzKOHc
	NsAg==
X-Gm-Message-State: AHYfb5ir/CR4qy/TgM0Z3M/xHGaQqTXD6RrZxWv89Wyx2AyCyIJ7Ttp9
	w3At9gXzkMacnir2hGoPeWTlb8EIjA==
X-Received: by 10.55.177.133 with SMTP id a127mr9460596qkf.303.1503028492499; 
	Thu, 17 Aug 2017 20:54:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.22.231 with HTTP; Thu, 17 Aug 2017 20:54:51 -0700 (PDT)
In-Reply-To: <9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
	<CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
	<9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
From: Sam <batmanustc@gmail.com>
Date: Fri, 18 Aug 2017 11:54:51 +0800
Message-ID: <CAOE=1Z273b5a55evMCg78n74mQ9Yab8Qr4n_0FMoMD31h0eCHQ@mail.gmail.com>
Subject: Re: Why my AT_CHECK() can't work?
To: Eric Blake <eblake@redhat.com>
Cc: autoconf@gnu.org
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:400d:c09::22b
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Aug 2017 03:54:58 -0000

Could I use regular match in AT_CHECK? Like this:

m4_define([OVS_VSWITCHD_STOP],
>   [AT_CHECK([/etc/init.d/openvswitch stop], [0], [stdout], [])
>   AT_CHECK([[awk '/Killing ovsdb-server/' stdout | sed  -e 's/[ ]*$//g']],
> [0], [Killing ovsdb-server ([0-9]*)
> ])
> ])


2017-08-10 21:40 GMT+08:00 Eric Blake <eblake@redhat.com>:

> On 08/09/2017 09:56 PM, Sam wrote:
> > Yes, it's because a space at the end of line:
> >
> > --- -^I2017-08-10 10:51:06.097868811 +0800$
> >> +++
>
> > but in my match, I add a space, I don't know why it doesn't work.
> >
> > AT_CHECK([[awk '/ACTIVE/' stdout | head -4]], [0], [LACP actor_state
> ACTIVE
> >> AGGREGATION SYNC COLLECTING DISTRIBUTING $
> >>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> >> LACP actor_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> >>      partner_state ACTIVE AGGREGATION SYNC COLLECTING DISTRIBUTING $
> >> ])$
>
> Because autoconf eats trailing spaces by default (it's a feature).  You
> can work around it by TELLING autoconf that you intend for there to be
> trailing space:
>
> AT_CHECK(..., [[trailing space preserved here: @&t@
> but not here
> more text]])
>
> The @&t@ quadrigraph (mnemonic 'and-t' sounds similar to 'empty')
> expands to nothing, but is converted after the point when trailing
> whitespace is eaten.
>
> The manual documents this:
> https://www.gnu.org/software/autoconf/manual/autoconf.html#Quadrigraphs
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
>
>

From MAILER-DAEMON Fri Aug 18 11:48:52 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1dijVz-0003T5-TE
	for mharc-autoconf@gnu.org; Fri, 18 Aug 2017 11:48:51 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50810)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dijVx-0003R4-BQ
	for autoconf@gnu.org; Fri, 18 Aug 2017 11:48:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eblake@redhat.com>) id 1dijVu-0007mP-7z
	for autoconf@gnu.org; Fri, 18 Aug 2017 11:48:49 -0400
Received: from mx1.redhat.com ([209.132.183.28]:42942)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <eblake@redhat.com>) id 1dijVt-0007lw-UW
	for autoconf@gnu.org; Fri, 18 Aug 2017 11:48:46 -0400
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com
	[10.5.11.12])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.redhat.com (Postfix) with ESMTPS id A551480469;
	Fri, 18 Aug 2017 15:48:44 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A551480469
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
	dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com;
	spf=fail smtp.mailfrom=eblake@redhat.com
Received: from [10.10.122.167] (ovpn-122-167.rdu2.redhat.com [10.10.122.167])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 2BA8670658;
	Fri, 18 Aug 2017 15:48:44 +0000 (UTC)
Subject: Re: Why my AT_CHECK() can't work?
To: Sam <batmanustc@gmail.com>
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
	<CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
	<c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
	<CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
	<9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
	<CAOE=1Z273b5a55evMCg78n74mQ9Yab8Qr4n_0FMoMD31h0eCHQ@mail.gmail.com>
Cc: autoconf@gnu.org
From: Eric Blake <eblake@redhat.com>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <372bc114-83ea-ee42-5ff7-b0e925f2f0ed@redhat.com>
Date: Fri, 18 Aug 2017 10:48:43 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
	Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <CAOE=1Z273b5a55evMCg78n74mQ9Yab8Qr4n_0FMoMD31h0eCHQ@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="9jePkg56Blj9pMNrCdP32MlKQWxelCHM5"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(mx1.redhat.com [10.5.110.28]);
	Fri, 18 Aug 2017 15:48:44 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.132.183.28
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Aug 2017 15:48:50 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--9jePkg56Blj9pMNrCdP32MlKQWxelCHM5
From: Eric Blake <eblake@redhat.com>
To: Sam <batmanustc@gmail.com>
Cc: autoconf@gnu.org
Message-ID: <372bc114-83ea-ee42-5ff7-b0e925f2f0ed@redhat.com>
Subject: Re: Why my AT_CHECK() can't work?
References: <CAOE=1Z0mFYK-n7ETAFkCBhtn4KS8Jr_Fn9ykYOJ5un7kKww7mA@mail.gmail.com>
 <CAOE=1Z1y4wZaXeHYCDJho_6NGfggewBOzwrKLTNaFxrhaYftYQ@mail.gmail.com>
 <c0df32bf-8524-32ad-fe03-7519621fa197@redhat.com>
 <CAOE=1Z2_NsQoAcGDd+1GG0OvFK97VUBZ8hW_6xqQsye_WObE8g@mail.gmail.com>
 <9218e867-9701-8b13-38d1-a5f1a6bc2925@redhat.com>
 <CAOE=1Z273b5a55evMCg78n74mQ9Yab8Qr4n_0FMoMD31h0eCHQ@mail.gmail.com>
In-Reply-To: <CAOE=1Z273b5a55evMCg78n74mQ9Yab8Qr4n_0FMoMD31h0eCHQ@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 08/17/2017 10:54 PM, Sam wrote:
> Could I use regular match in AT_CHECK? Like this:

Please don't top-post on technical lists; it makes it harder to follow
the conversation.

>=20
> m4_define([OVS_VSWITCHD_STOP],
>>   [AT_CHECK([/etc/init.d/openvswitch stop], [0], [stdout], [])
>>   AT_CHECK([[awk '/Killing ovsdb-server/' stdout | sed  -e 's/[ ]*$//g=
']],

That's a lot of typing and a waste of a process.  Why not just use the
shorter:

AT_CHECK([sed -n '/Killing ovsdb-server/ s/ *$//p' stdout],

(that is, using 'awk' as a longhand for 'grep' followed immediately by
piping through 'sed' is pointless, when you can do it all in 'sed'; and
using 'g' on a substitution anchored at the end of a line is pointless).

>> [0], [Killing ovsdb-server ([0-9]*)

AT_CHECK only does direct textual matches.  But never fear - you can do
filtering as part of your command to pre-process the actual text into
something that will match your expected text - similar to how you are
eating trailing space, you can also convert random pids into a stable
placeholder, as in this example:

AT_CHECK([sed -n '/Killing ovsdb-server/ { s/ *$//; s/[0-9]*/PID/; p }'
stdout],
         [0], [Killing ovsdb-server (PID)

--=20
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


--9jePkg56Blj9pMNrCdP32MlKQWxelCHM5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlmXDFsACgkQp6FrSiUn
Q2rWtwf/a05aNwJHPjAFoyCL2A17WvsJ0jWs045vpASu/pFrLx9A35SeenNOcOYD
0Y7ftUx21nNAji8poVVh9ScfiLkHsXSasCQG22Ner+NuhdBjvr5mEZw7q41JJ5iD
BxDJezaKeyd/T/OHjhQ6nqgzhtQS85TcBYqaOcqoUgjPHHCcTe9kVrvc9ASFN+j7
6Dfe0oeHjVKAfh9ZR5DDBNdgW7TflXVgNh77h87+DolK7p5Xh7qNWUO4zEGMaTxy
K+a+YA/W0Cppl2uAePNZuXhdKKXRkLo6lpf5GKPvZpxtHYhnk0R56jA09oTkDkM5
0APP7hAs2ZJA0dA48ntOpRYSNw88kg==
=dunM
-----END PGP SIGNATURE-----

--9jePkg56Blj9pMNrCdP32MlKQWxelCHM5--


From MAILER-DAEMON Mon Aug 21 02:22:07 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1djg6B-0007sN-PD
	for mharc-autoconf@gnu.org; Mon, 21 Aug 2017 02:22:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48302)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <pfaffben@gmail.com>) id 1djg69-0007rj-Ju
	for autoconf@gnu.org; Mon, 21 Aug 2017 02:22:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <pfaffben@gmail.com>) id 1djg64-0007N2-Lq
	for autoconf@gnu.org; Mon, 21 Aug 2017 02:22:05 -0400
Received: from mail-pg0-f50.google.com ([74.125.83.50]:36043)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <pfaffben@gmail.com>) id 1djg64-0007Mj-Eh
	for autoconf@gnu.org; Mon, 21 Aug 2017 02:22:00 -0400
Received: by mail-pg0-f50.google.com with SMTP id i12so94087762pgr.3
	for <autoconf@gnu.org>; Sun, 20 Aug 2017 23:22:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:date:from:to:cc:subject:message-id:references
	:mime-version:content-disposition:in-reply-to:user-agent;
	bh=hoEKbsIfIcpMKJJHVmYoBnzdw6OZQDJo2i/R8wD9Tbg=;
	b=EckWqp5Mfi69Ohv9KSzRrG7tX17f5dRG2ClDVL6PhyurVLrzWcXkraHDsUkS+U/E7k
	rV84z6DtnXXPhWZjdqBhKz1AVXbYcr8G5mSzGXkKi1qeq5cBRDwuWA57mgYRKGay/WRF
	5e93/+ucTl8inO/iU0foWTRv+imaJq3SHvTWxbJSG7XxxKEE0yJgFK10BaUG7vvqKDu1
	5lKH7ccij+K6RMSxMTj9PxjMwN78xf4QmcN5Ktlo6hL+7Nw3S2Pla8R31jANMn4bMWpA
	YOX0kL1eQlvsNocki2Mhovs4y3Y3AEM1ip/vCa37IcOkS2OS5Sen4AOoX6bwMkPXoCIH
	XRwA==
X-Gm-Message-State: AHYfb5jLxaZAYakHFv76oK9dgCD3guM1M7ORcqvUwIt2x92NqUlBPxPc
	lL2JL2tD6o3hNA==
X-Received: by 10.98.90.196 with SMTP id o187mr1146907pfb.48.1503296519233;
	Sun, 20 Aug 2017 23:21:59 -0700 (PDT)
Received: from sigabrt.benpfaff.org
	(173-228-112-34.dsl.dynamic.fusionbroadband.com. [173.228.112.34])
	by smtp.gmail.com with ESMTPSA id
	b9sm25195908pfl.13.2017.08.20.23.21.58
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sun, 20 Aug 2017 23:21:58 -0700 (PDT)
Date: Sun, 20 Aug 2017 23:21:55 -0700
From: Ben Pfaff <blp@cs.stanford.edu>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: Jens Reyer <jre.winesim@gmail.com>, 850329@bugs.debian.org,
	autoconf@gnu.org
Subject: Re: Bug#850329: autoconf tries to execute foreign binaries
Message-ID: <20170821062155.GW26012@sigabrt.benpfaff.org>
References: <20170820180128.GU26012@sigabrt.benpfaff.org>
	<20170820191844.GQ2492@zira.vinc17.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20170820191844.GQ2492@zira.vinc17.org>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 74.125.83.50
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Aug 2017 06:22:06 -0000

I'm adding the autoconf mailing list.  For more background, take a look
at the Debian bug log:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850329

On Sun, Aug 20, 2017 at 09:18:44PM +0200, Vincent Lefevre wrote:
> On 2017-08-20 11:01:28 -0700, Ben Pfaff wrote:
> > This bug regards how Autoconf decides whether it's cross-compiling.
> > This is a somewhat tricky issue.  The following is summarized from
> > https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html
> > (and quotes come from there):
> > 
> >    1. Without --host or --build, Autoconf aborts if it can't run the
> >       binaries that the compiler produces.  It assumes that's a
> >       problem in the system configuration, such as a broken
> >       compiler.
> > 
> >    2. With --host and --build, Autoconf decides that it's
> >       cross-compiling if the host and the build system are
> >       different.
> > 
> >           "If you specify both, and they're different, configure enters
> >           cross compilation mode, so it doesn't run any tests that
> >           require execution."
> > 
> >    3. With --host, but not --build, Autoconf decides that it's
> >       cross-compiling if it can't run a binary produced by the
> >       compiler:
> > 
> >           "If you specify --host, but not --build, when configure
> >           performs the first compiler test it tries to run an executable
> >           produced by the compiler. If the execution fails, it enters
> >           cross-compilation mode. This is fragile. Moreover, by the time
> >           the compiler test is performed, it may be too late to modify
> >           the build-system type: other tests may have already been
> >           performed."
> > 
> > The issue here is what Autoconf should do in case #3, which is what wine
> > is doing.  Is there a better way to detect whether the system can run a
> > binary, than to try to run the binary?  Or is there a way to avoid the
> > broken dash behavior?
> 
> In case 3, can't Autoconf use the guessed value of BUILD, so that
> it would be like case 2?
> 
> > But I am a little concerned about whether we should do anything at all,
> > because case #3 is deprecated:
> > 
> >     "**Do not rely on [case 3]**, as it will be removed in the near
> >     future...  Therefore, whenever you specify --host, be sure to
> >     specify --build too."
> 
> As the --build value can be guessed, I think that it would be annoying
> for the user to force him to use --build in case of cross-compilation.
> IMHO, making case 3 like case 2 with the guessed value of BUILD (as
> I've proposed above) would make sense. That would be the typical case
> for cross-compilation, as in general, one builds on the machine where
> one runs configure.

Hmm.  I'm comfortable with the idea of trying to figure out some way to
avoid trying to execute binaries as if they were shell scripts.  On the
other hand, while I don't personally object to changing this basic
Autoconf behavior, this is getting well into the territory where I'd be
uncomfortable proposing it myself.  Does anyone on the autoconf mailing
list have thoughts?


From MAILER-DAEMON Mon Aug 21 08:48:28 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1djm84-0000QL-Oj
	for mharc-autoconf@gnu.org; Mon, 21 Aug 2017 08:48:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33083)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eboyd53sf@gmail.com>) id 1djm81-0000PY-Rg
	for autoconf@gnu.org; Mon, 21 Aug 2017 08:48:27 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eboyd53sf@gmail.com>) id 1djm7y-0002VC-NM
	for autoconf@gnu.org; Mon, 21 Aug 2017 08:48:25 -0400
Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]:35163)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <eboyd53sf@gmail.com>) id 1djm7y-0002UD-IF
	for autoconf@gnu.org; Mon, 21 Aug 2017 08:48:22 -0400
Received: by mail-io0-x232.google.com with SMTP id 1so16715076ioy.2
	for <autoconf@gnu.org>; Mon, 21 Aug 2017 05:48:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=sender:subject:to:references:from:message-id:date:user-agent
	:mime-version:in-reply-to:content-language:content-transfer-encoding;
	bh=UPZQi+4eLPKvvzuP+j1nnCaBEBCboM41/KzFWO/sJ9U=;
	b=cLDTLWOagXvr5Be1TZxGlz4AxKv9IgGxEC+5GKACQ+eXH3xFf3VeHEmTKepqAqsJoy
	n70PPatDuOVY9Re1odu5YqbS2OyRFj9lixLncdXvjZ/qNOVSIAOb5UomP5sI5Bebn1fm
	Qmpn9wjextqBvlrLBFRcfOdOwC2ZE9WtV70Exlum4biUGzo2hZoG2R8Ds+Xrg03CG3/x
	LqxSH/F60qAQDa7yQL5QJ/agwYaWuB1zZETC5VXcNfADEgzEPOO1TobN507V+glfK2XD
	wWLyq2OspsaXQovHdQ3zLuLRR3wjXdpFYUe6bdbNLdlG3+dxSQp0M/f86mvwL4Y1KhEK
	RTdQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:sender:subject:to:references:from:message-id
	:date:user-agent:mime-version:in-reply-to:content-language
	:content-transfer-encoding;
	bh=UPZQi+4eLPKvvzuP+j1nnCaBEBCboM41/KzFWO/sJ9U=;
	b=am5rRTGyL+ogIOX03yZDVROCwMQiqLPynP785HV4S6fmw1kaLXfzNUpzwbj2+5HFDw
	UjTLhzWkM4bBpxDzq0zKacgd9OiaIn9631QoLZsJ14EIfMvVMFnQn9nrYQCxCOULpWyi
	099tyCAN/mandNLE7HVPOJ7GwdnJUmIgIMGPA5BztNzd5am+8bPdz8x2FW0HaK/DNM1h
	UBvu7Lo1Eb4m3SubL8e+qnfRe6ZuRc7nfAhgWCa5rh8jl7IYhrLcnPSJCABqdpF5qapf
	HDDKXMwa4pD/mnsjZTMozPDxpRyeANRI8UJ9HxBDvEOBIjkGsb1eIA6aiyNW05Hz2DAP
	mU6w==
X-Gm-Message-State: AHYfb5hqqL67tVY++J9cTGLwBCWp+N1eg/td+TTxoabKrQ0bi0ToevOI
	pZ7/hEfUtw53huep
X-Received: by 10.107.9.203 with SMTP id 72mr8127792ioj.72.1503319700368;
	Mon, 21 Aug 2017 05:48:20 -0700 (PDT)
Received: from [192.168.0.6] (d4-50-42-50.try.wideopenwest.com. [50.4.50.42])
	by smtp.gmail.com with ESMTPSA id
	f11sm110970itf.1.2017.08.21.05.48.19 for <autoconf@gnu.org>
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Mon, 21 Aug 2017 05:48:19 -0700 (PDT)
Sender: Earnie Boyd <eboyd53sf@gmail.com>
Subject: Re: Bug#850329: autoconf tries to execute foreign binaries
To: autoconf@gnu.org
References: <20170820180128.GU26012@sigabrt.benpfaff.org>
	<20170820191844.GQ2492@zira.vinc17.org>
	<20170821062155.GW26012@sigabrt.benpfaff.org>
From: Earnie <earnie@users.sourceforge.net>
Message-ID: <3f63822a-2e87-cb76-3f42-5f11bac31e58@users.sourceforge.net>
Date: Mon, 21 Aug 2017 08:48:21 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
	Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <20170821062155.GW26012@sigabrt.benpfaff.org>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 2607:f8b0:4001:c06::232
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Aug 2017 12:48:27 -0000

On 8/21/2017 2:21 AM, Ben Pfaff wrote:
> I'm adding the autoconf mailing list.  For more background, take a look
> at the Debian bug log:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850329
> 
> On Sun, Aug 20, 2017 at 09:18:44PM +0200, Vincent Lefevre wrote:
>> On 2017-08-20 11:01:28 -0700, Ben Pfaff wrote:
>>> This bug regards how Autoconf decides whether it's cross-compiling.
>>> This is a somewhat tricky issue.  The following is summarized from
>>> https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html
>>> (and quotes come from there):
>>>
>>>    1. Without --host or --build, Autoconf aborts if it can't run the
>>>       binaries that the compiler produces.  It assumes that's a
>>>       problem in the system configuration, such as a broken
>>>       compiler.
>>>
>>>    2. With --host and --build, Autoconf decides that it's
>>>       cross-compiling if the host and the build system are
>>>       different.
>>>
>>>           "If you specify both, and they're different, configure enters
>>>           cross compilation mode, so it doesn't run any tests that
>>>           require execution."
>>>
>>>    3. With --host, but not --build, Autoconf decides that it's
>>>       cross-compiling if it can't run a binary produced by the
>>>       compiler:
>>>
>>>           "If you specify --host, but not --build, when configure
>>>           performs the first compiler test it tries to run an executable
>>>           produced by the compiler. If the execution fails, it enters
>>>           cross-compilation mode. This is fragile. Moreover, by the time
>>>           the compiler test is performed, it may be too late to modify
>>>           the build-system type: other tests may have already been
>>>           performed."
>>>
>>> The issue here is what Autoconf should do in case #3, which is what wine
>>> is doing.  Is there a better way to detect whether the system can run a
>>> binary, than to try to run the binary?  Or is there a way to avoid the
>>> broken dash behavior?
>>
>> In case 3, can't Autoconf use the guessed value of BUILD, so that
>> it would be like case 2?
>>
>>> But I am a little concerned about whether we should do anything at all,
>>> because case #3 is deprecated:
>>>
>>>     "**Do not rely on [case 3]**, as it will be removed in the near
>>>     future...  Therefore, whenever you specify --host, be sure to
>>>     specify --build too."
>>
>> As the --build value can be guessed, I think that it would be annoying
>> for the user to force him to use --build in case of cross-compilation.
>> IMHO, making case 3 like case 2 with the guessed value of BUILD (as
>> I've proposed above) would make sense. That would be the typical case
>> for cross-compilation, as in general, one builds on the machine where
>> one runs configure.
> 
> Hmm.  I'm comfortable with the idea of trying to figure out some way to
> avoid trying to execute binaries as if they were shell scripts.  On the
> other hand, while I don't personally object to changing this basic
> Autoconf behavior, this is getting well into the territory where I'd be
> uncomfortable proposing it myself.  Does anyone on the autoconf mailing
> list have thoughts?

With --host alone autoconf should assume it is a cross compile without
doing any further testing even if the guessed BUILD environment is
identical to the specified --host.  This would aid in testing the cross
build before the package is published.

For a native build don't specify --host or specify --build the same as
--host.  If the specified --build is different from the guessed --build
then perhaps a warning but that is questionable as some new system
cannot be guessed due to aging config files; maybe make that idea an
option to configure that can be specified by the user.

-- 
Earnie


From MAILER-DAEMON Mon Aug 21 11:29:38 2017
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1djoe2-0000U3-JH
	for mharc-autoconf@gnu.org; Mon, 21 Aug 2017 11:29:38 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51854)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <kdmarsha111953@gmail.com>) id 1djoe0-0000TL-9W
	for autoconf@gnu.org; Mon, 21 Aug 2017 11:29:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <kdmarsha111953@gmail.com>) id 1djodx-0002Hx-5k
	for autoconf@gnu.org; Mon, 21 Aug 2017 11:29:36 -0400
Received: from mail-wr0-f195.google.com ([209.85.128.195]:34560)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <kdmarsha111953@gmail.com>)
	id 1djodw-0002EZ-RW
	for autoconf@gnu.org; Mon, 21 Aug 2017 11:29:33 -0400
Received: by mail-wr0-f195.google.com with SMTP id p14so12972619wrg.1
	for <autoconf@gnu.org>; Mon, 21 Aug 2017 08:29:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:subject:to:references:from:message-id:date
	:user-agent:mime-version:in-reply-to;
	bh=D49HccbXW4vwUYXV+t6A0fCdCQXlwm7cHjq8LD19hsk=;
	b=oFZqeAJ5G58QEaSaEcAUXwJAGd67oZbQN8AICmxdjbh3Sxos/F6h49xbIqKUJMFZ1r
	HvZ5AuZ2XozAdkWoRFqXd3wlgN4RlWm1hj17pirPtI4GthEqjOYjcmr0nL5g8M0MUrgi
	tC2TWCQBNgnJHV1u0EmtFB5sakSrMYuf7vxOz+9LsOHEm4wdzVH/neVPgE4b/UV2jbPz
	O46lMAsN2Cw6YwzWYOpOZy/nfqaf/x7zw8bSaoGDhgXOg1neCSwYr+bP0HjQjzhk4ecC
	uRyK7JBz4mW61fyxe6fvGputMiDOaogHGsBUJw8Q7Fol5DrDri8SPTCHMLX7BFbEHUtP
	+uJw==
X-Gm-Message-State: AHYfb5gwJorMtmdrETCo68p1UWUM51uFdajgTluZD0ce7W7WTSf0sDqA
	K+dXdU1YPbrhP9EK
X-Received: by 10.28.29.130 with SMTP id d124mr6054518wmd.78.1503329369981;
	Mon, 21 Aug 2017 08:29:29 -0700 (PDT)
Received: from [192.168.0.10]
	(cpc80299-grim18-2-0-cust238.12-3.cable.virginm.net. [86.10.185.239])
	by smtp.googlemail.com with ESMTPSA id
	g51sm5184486wrg.92.2017.08.21.08.29.27 for <autoconf@gnu.org>
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Mon, 21 Aug 2017 08:29:28 -0700 (PDT)
Subject: Re: Bug#850329: autoconf tries to execute foreign binaries
To: autoconf@gnu.org
References: <20170820180128.GU26012@sigabrt.benpfaff.org>
	<20170820191844.GQ2492@zira.vinc17.org>
	<20170821062155.GW26012@sigabrt.benpfaff.org>
From: Keith Marshall <keith.d.marshall@ntlworld.com>
Message-ID: <599AFC49.1090702@ntlworld.com>
Date: Mon, 21 Aug 2017 16:29:13 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
	Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <20170821062155.GW26012@sigabrt.benpfaff.org>
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature";
	boundary="nIfeRsTbCI1SLb7S8S1BlkD5uTswb8L7L"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 209.85.128.195
X-Content-Filtered-By: Mailman/MimeDel 2.1.21
X-BeenThere: autoconf@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Discussion list for the autoconf build system <autoconf.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/autoconf/>
List-Post: <mailto:autoconf@gnu.org>
List-Help: <mailto:autoconf-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/autoconf>,
	<mailto:autoconf-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Aug 2017 15:29:38 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--nIfeRsTbCI1SLb7S8S1BlkD5uTswb8L7L
From: Keith Marshall <keith.d.marshall@ntlworld.com>
To: autoconf@gnu.org
Message-ID: <599AFC49.1090702@ntlworld.com>
Subject: Re: Bug#850329: autoconf tries to execute foreign binaries
References: <20170820180128.GU26012@sigabrt.benpfaff.org>
 <20170820191844.GQ2492@zira.vinc17.org>
 <20170821062155.GW26012@sigabrt.benpfaff.org>
In-Reply-To: <20170821062155.GW26012@sigabrt.benpfaff.org>
Content-Type: multipart/mixed;
 boundary="------------090609020705050304010806"

--------------090609020705050304010806
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 21/08/17 07:21, Ben Pfaff wrote:
>> As the --build value can be guessed, I think that it would be annoying=

>> for the user to force him to use --build in case of cross-compilation.=

>> IMHO, making case 3 like case 2 with the guessed value of BUILD (as
>> I've proposed above) would make sense. That would be the typical case
>> for cross-compilation, as in general, one builds on the machine where
>> one runs configure.
>=20
> Hmm.  I'm comfortable with the idea of trying to figure out some way to=

> avoid trying to execute binaries as if they were shell scripts.  On the=

> other hand, while I don't personally object to changing this basic
> Autoconf behavior, this is getting well into the territory where I'd be=

> uncomfortable proposing it myself.  Does anyone on the autoconf mailing=

> list have thoughts?

As a MinGW.org developer who uses LinuxMint Debian Edition as my primary =

development platform, I've certainly found this autoconf behaviour to be =

annoying, for some considerable time; (this annoyance is compounded by=20
config.sub, which forces me to specify the fully qualified build=20
triplet, for any project which uses AC_CANONICAL_SYSTEM, or even just=20
AC_CANONICAL_BUILD).  Nonetheless, I do always specify both --build and=20
--host, because of the ambiguity introduced by specifying --host alone).

While I agree that this is an annoying (mis)feature of autoconf design,=20
as I see it, the ambiguity is triggered, not by any feature of whichever =

shell is employed, but by the Linux kernel's own miscellaneous binaries=20
(binfmt_misc) support, which allows Windows binaries to be executed via=20
wine, providing it is installed, without it being explicitly specified:

  $ uname -a
  Linux ... 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13)
  x86_64 GNU/Linux

  $ file dist/staged/bin/gcc.exe
  dist/staged/bin/gcc.exe: PE32 executable (console) Intel 80386=20
  (stripped to external PDB), for MS Windows

  $ dist/staged/bin/gcc.exe --version
  gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
  Copyright (C) 2016 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.

--=20
Regards,
Keith


--------------090609020705050304010806
Content-Type: application/pgp-keys;
 name="0xBDA28E02.asc"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0xBDA28E02.asc"

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.20 (GNU/Linux)

mQINBFSkBD0BEAC3d3bG1P2oqzy5DDJ8Af04NuC9IYBbO+aVBmqNsKMfVL7x8JVO
Hm1NqP1RA1ZslUDwg0AgFfOKKi0udM/Mtb9n6iTxrbuXfwTFr4EbQp2WVNTnRJ8y
FAmPDczNLu0g0TwUbTvYWwPA3ymbou3sd7ANlyfx79TUIdzuZyFYrs/LCMIF+UvH
RfLUq9i2c8fyYMFbzBNlyElbdEhQeisdiQQhIS82I7r5JzPKaYeQTQUrTB5N/uJH
MY79kY0G6yFl1TSjDHp2eBF1ZPJNf367heBYdUmxdHAYn7VmdbUk8qVG5ujYEl20
pdZg072VIrnfB4Hlv7ppUH/ApX9IaFEHNOwQVnYqrViGf5yY6xgPOo30yY36IcS7
10vJJTjoxa6UARBb4kcIJK7mUVIe1Wk1wFKkidoSxkFNBJYdnzzhD9YqbKlylonu
toB5L+aXZPgveDEXczfvfTnlaZPfHQZWAcfqG+hp9r+gbgsqn+VNx1rpleOh0lay
w91VWK65mmxi1aXDYNTONP7DJPIoyvKIZgDPvYzTBeRZ2rcAHWWDBXkDnHphgPOl
9IETLtAXShcBJm/4ib2Nob5y3z/ZRmigplS5tOH+g2HMHoT7plJT8ri3SU+sPa2C
S/cUxWDLNFZ01uXgq2W3kmv/SVg/kaD9i5WzJCUl8hkhLZet2KLs0eGoHQARAQAB
tC5LZWl0aCBNYXJzaGFsbCA8a2VpdGguZC5tYXJzaGFsbEBudGx3b3JsZC5jb20+
iQI+BBMBAgAoBQJUpAQ9AhsjBQkJZgGABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIX
gAAKCRC7dRwUvaKOAn2aD/4j+H5rX+3SkEgU6c6p9SekeAaezsCaHJGZLBLLC8gB
AZ8hr2t5ISjRb2VXE3KLvrDEj9Ne0B5DuCcx7an1LhhULKgkE4yH3MmtPKYVVvkc
tQTca6PPm9WXk/5dw6v4wAvqjxZ3mMNkKM0BbG5Z1hpeKI2pMuM8rCp8iUIsNzS6
39v2G8hvlNdpr1ChFqAiUQ5/lgLUZLlG/di3dBGLHRYrVmYn6zyl4AN83xiaevd8
ovnSerrLSPIpqvoBvUj7fxbKfTpyMLkB5zRTPacGCb50UBzdnKwn0xJO1MiWPM17
7l+wD+MVKORHwar0McWb5evQc4l5lH6i7Xuagh1fSm1DLBNcaRhXkblabYm48rYl
W6ol3EWoaJ37ccPvR3OPNBEjiumL3Gl0voDox9MdRyGYbs/9/kKt5kDyhNVh6f74
55k03hsANs87UoJzIkrzBusxODcnvgVeZ2GcOJMmhbSgr0ubEn7CuKXbpL64HoV2
r7qAHb0twGJbmrwOQL75fDihYXmoQR8bj1CtwAlVJIdE4uckkCedRgnwxLEQibRg
MAP/WgthNE0X9pn8n/NHsGeqacSRBNeSmsC+u5NRFe/rIhBZFVOB2F7cpVaBpCBZ
mtYKKZBYWkyrBGsIzwZDFNbXt9ZlpGfRJmxHNQZlBoy3FUwGhkNzOPrDSJsfmq7f
YbkCDQRUpAQ9ARAAxwYhLewbzT+x/XlpE2lIBgycOGck/12lzracc9diBgQfIHr3
4MtQR4kSEa4jkPVYePOYmc8sfDqWa4Id88gNPyj4HRVqVPRFmTWX7aR9TFQ9GXJ6
6z0VQLvnomWEF8CEpsb70QTLTtYy6WiTTP8uD48Nab+hgvJ5S7vkVB0SMvsSdSA5
3hateJW3Zg9eA8zYQj3EQ/1dnQXebvZKT25OXMy43Yku7Bh88zPQobzELxUP60z4
q1yvcKZM4UhmcMFK6BhkdoTiNonB+PQbNHpSf9KstLIdyt2KnJqcKPuB70htRjg5
AC34haH7yTrjR+CHIpkDH3az/YQE6G7NzHRbYAWh4I3qHqsp7/1zqOS19arkSb2d
zYUDju8gcE2w/BlgjIkTOGCcbYUXbguic6drxi3GJxqT63BIJIgGC/410Vs7V2IX
QFGnDxfAbziyz810GLOqVuhrPVsQ5Yl+GVW7i51w7rq7uht0oCTzICXyNbukr26z
XgE/zRYQvXUFYtw4WxCrrYKcmx7lxnR4ulsA2WSlQMeiU3ScxuMbWQUP3gxDQGKn
643EXxsHO66gWu3i20vf7Cj5p3suMxo/zOmKlAdAHViLUbCHy3+ZvYVwh3iEbLZv
oVhXkZVjeSkPY5KIQuezpFhV3NcF7wSdlKvgXwvQ6jDP/ZIl8K68U7MUrIkAEQEA
AYkCJQQYAQIADwUCVKQEPQIbDAUJCWYBgAAKCRC7dRwUvaKOAnrND/9Mf789TebP
ZRPVgFmq8uzi186rqWicB6yvbhgUnlo8DYWQG+Sgbq6BnhqgXv6D+QE6UnLOcbF3
A9Pa7cbSTCAk1BjkpO2AE9vQ7By2LFGVSgmzmdWh8LGiDgUzNsN85Hf1KRkyIst4
fF48Fni0mHyPbIxC6G/vi85GBcUR2fhX2q0CmIRXtcBPzthgBxO3d2lmEyioNoLv
+g0SoE2CJtgVnTEQeLWUxZENc6/5CpoaHe2TpxbJ1tHis4r/dxZSlscjZF79acm2
teOLfCHs7n4Fg6nTWnpfBamBQjaUTXoxGGKCfPBx6yi6WQqtOjIQhVkxXgv09tWb
a/Z3rqD9S9ka2Xjs9Ek2BhjV3z7ahCvhLK4gydQi7Dn+Geq58q+KJO9TPPA5BGQK
BI343Kc4SKCrtHSDhKFuFdV0tI2EXH8UOttI21IqkkivmsXqBXZaanS2meuBnVZD
CFetg2pDR0Z8Qr2EJLwWFhrRrDPX35Y7Mq/NHEFPJDm5WMboqNOfiWBh0adPr7w0
RwVHIXV/DkBTU/0Zx8EuKz7mAWLtObfTOhKIuDmvlA7gnXn+oVLu2K6oiTlnc3F2
3OfneOzAWQ1rwqgY6ky4UB/XKIVrx2VRzNX20x148her4uzfQrneADzNHijIu+5Q
DOOT5/d3M4vsv9NMprBvKE2i4NJVQTQvFA=3D=3D
=3DVDmL
-----END PGP PUBLIC KEY BLOCK-----

--------------090609020705050304010806--

--nIfeRsTbCI1SLb7S8S1BlkD5uTswb8L7L
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJZmvxWAAoJELt1HBS9oo4CRo0P/jFDatTD+oYN7LKxrgZoc9Dc
s3SMtp9I8ew61HYgqNUllvfd2/MjtY91Y3hvbkpragYgGEPfDK+YSaEHhYruwHRa
Ck84lZV63PtVZdHdDt1VTK0TCKpXcfwp5DrtfqmgqJCLObEOBhFZKrvrmD4H1bBw
dmZ4lZ6Sb4dtiIPMH9n1OxS5Oo0VNgakd7p12buwmNf2jYogncVZfMmp2owpD244
0Lx6g/c7bWGAn5x73183P71LKlCi9X/ARe+Y92PSgd+UOPr2ny9UkV5apPASgUAG
hILbxQKo9dk2r9lzSaByyJ0LFyxyYInD1HYzxDZIBApUu8YfHMGfP1bfLZ3MVFrh
aJvDbQEbfpvU11qaBKYpPwjFtueW9/q7sDUN/Z7YlEGZhlfIZgawqg6J4RWzLfrG
tE2dZuVTZE2EVB6xdq1pbYOkMtQ6We6+4fiBOoVfS4FZoALPKLBUbmpmRxjYt3nU
cNd/tudHBSgcXVlioWSk9Vu/8ddnPgAYwYi+W5OBKGhGzGtNoazJOl696EMnikgH
FT0YOvzDKu55eZSuGolTlnYCWnjj6Xodc6ymh8t1hp05qf3V1GfLN3Nas32xfaSt
eWaTQWloVFE8n9OsqBWbleEi5ubdRj9bmtX9NmXyuzQNXhseouEIxIGdymSJX3Kr
VGlpCwVS9J7joFGTUuKF
=XHmb
-----END PGP SIGNATURE-----

--nIfeRsTbCI1SLb7S8S1BlkD5uTswb8L7L--


