From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 15:45:26 2015 Received: (at submit) by debbugs.gnu.org; 28 Apr 2015 19:45:27 +0000 Received: from localhost ([127.0.0.1]:43009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnBRd-000353-Ue for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:45:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48358) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnBLU-0002vU-PJ for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnBLO-0006Bq-2B for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:38:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBLN-0006Bl-V0 for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:38:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBLM-00014n-Q6 for bug-coreutils@gnu.org; Tue, 28 Apr 2015 15:38:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnBLL-0006AN-K7 for bug-coreutils@gnu.org; Tue, 28 Apr 2015 15:38:56 -0400 Received: from mail-ie0-x235.google.com ([2607:f8b0:4001:c03::235]:35294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBLL-00068R-BC for bug-coreutils@gnu.org; Tue, 28 Apr 2015 15:38:55 -0400 Received: by iejt8 with SMTP id t8so26777094iej.2 for ; Tue, 28 Apr 2015 12:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vVIKg6ll3iB0SvMyMnrdE4n7grd0IAZ0zFua3k6BX9o=; b=RRpSTe0jMJ7ZsPbXuriHADNbyTbTe9XgdIIRz7FdY7z16tL5Wdlg+u/Myz03W2iy22 rpI6AjX8hanIQuRtZavmfIaaP9D8tqIjF0LmYSlCgUcvPWvBBkcpwoAbOGpJmPJDG2fE vHOvIi9LGVlI58KNPF1RDaC49ofF4yjBYGpsXz+cjt3vK/XC13LEIlex2Qc9zG6DHkUS pkySgbYWKHFUBEvmJFaEqjPYQ8bUOkEchf7Y9eeHAyKDtpCqY7DTac4Prm4gtT2Jpz5x O460V7Bk+1oiElRWW9p0dlQ1XPHu3/5LF/L4c1AvfMFWneym/ykHgtSWXoE3CjrxHxsC DdoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vVIKg6ll3iB0SvMyMnrdE4n7grd0IAZ0zFua3k6BX9o=; b=dne/rFLD5ScwvCYjLMX1SbpUEeMS+WoE3xiZ2nPTkxd9QMDvxwiZLc1WvevuxA36vT Nnas7toFk5YIfbfngx9A3q5Zv/R99wYjsue6de451VcRtanV8AeKD9IBpjUZ7YcNMIdO H7CGz3UOLQPiCvZPciupjmTs852rReoCqetys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=vVIKg6ll3iB0SvMyMnrdE4n7grd0IAZ0zFua3k6BX9o=; b=Dk8Tb/bpz03JK6YuUxeUfIfIIvnuwChFR1X0Wojh+saOjBL4Jfx3moixAl9NOe7dI0 N1uMjeyW4jPrSR8sZ/hwOmzXLv01TriFwp935T61wBiirK3ALeUCGLQqHmZ2aqXzqjiW 0hzp5fbtEFh5MvcXRaalf9BImn91gQDgR9MFJOr/7eYp9kLU9ihrN0HyFSzoYLq2RWcB 7sjmZupRFx5oxhPmip1HgmXHr0z/g/zxZ9qPZ3S+RXvtf2hjas/BJBlqo9lRcqPf6m2H 5lHchpAdzEO4Dvl2dqn1KqOcVvrGP7R1UELrKnA5K5QZj8jTCSz/3uFr5vXEtHW3oekQ lgdQ== X-Gm-Message-State: ALoCoQnw1lyqimn5T6X5G50VHuQyY1X5suRnBTf6FousiDmlsYpV5qCm8XXYnUN3Skwcy1eV5VtK MIME-Version: 1.0 X-Received: by 10.50.143.33 with SMTP id sb1mr22469973igb.33.1430249934000; Tue, 28 Apr 2015 12:38:54 -0700 (PDT) Received: by 10.79.75.129 with HTTP; Tue, 28 Apr 2015 12:38:53 -0700 (PDT) Date: Tue, 28 Apr 2015 12:38:53 -0700 X-Google-Sender-Auth: scq6pEUMUBjrJCbNuA8Ybt8NVV0 Message-ID: Subject: coreutils cannot built with clang From: Yunlian Jiang To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=001a1134b38a41dd1f0514ce0388 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 28 Apr 2015 15:45:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a1134b38a41dd1f0514ce0388 Content-Type: text/plain; charset=UTF-8 Hi, When I try to use clang to build coreutils, I got some thing like src/coreutils.c:81:3: AR src/libsinglebin_printenv.a error: embedding a #include directive within macro arguments is not supported # include "coreutils.h" ^ And I have the following ugly patch to make it work. Thanks --- src/coreutils.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/coreutils.c b/src/coreutils.c index 9f798b8..c46f0c7 100644 --- a/src/coreutils.c +++ b/src/coreutils.c @@ -70,15 +70,22 @@ Execute the PROGRAM_NAME built-in program with the given PARAMETERS.\n\ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); - printf ("\n\ -Built-in programs:\n" #ifdef SINGLE_BINARY /* XXX: Ideally we#d like to present "install" here, not "ginstall". */ + const char * prog_list_name = # define SINGLE_BINARY_PROGRAM(prog_name_str, main_name) " " prog_name_str # include "coreutils.h" # undef SINGLE_BINARY_PROGRAM + ; +#endif + + printf ("\n\ +Built-in programs:\n"); + +#ifdef SINGLE_BINARY + printf("%s", prog_list_name); #endif - "\n"); + printf("\n"); printf (_("\ \n\ -- 2.2.0.rc0.207.ga3a616c --001a1134b38a41dd1f0514ce0388 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi, 
   When I try to use clang to build coreu=
tils, I got some thing like
s=
rc/coreutils.c:81:3:   AR       src/libsinglebin_printenv.a
error: embedding a #include directive within macro arguments is not support=
ed
# include "coreutils.h"
  ^
And I have the following =
ugly patch to make it work.
T=
hanks

---
 src/coreutils.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/coreutils.c b/src/coreutils.c
index 9f798b8..c46f0c7 100644
--- a/src/coreutils.c
+++ b/src/coreutils.c
@@ -70,15 +70,22 @@ Execute the PROGRAM_NAME built-in program with the give=
n PARAMETERS.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);

-      printf ("\n\
-Built-in programs:\n"
 #ifdef SINGLE_BINARY
 /* XXX: Ideally we#d like to present "install" here, not "g=
install".  */
+      const char * prog_list_name =3D
 # define SINGLE_BINARY_PROGRAM(prog_name_str, main_name) " " pro=
g_name_str
 # include "coreutils.h"
 # undef SINGLE_BINARY_PROGRAM
+       ;
+#endif
+
+      printf ("\n\
+Built-in programs:\n");
+
+#ifdef SINGLE_BINARY
+      printf("%s", prog_list_name);
 #endif
-  "\n");
+      printf("\n");

       printf (_("\
 \n\
--=20
2.2.0.rc0.207.ga3a616c

--001a1134b38a41dd1f0514ce0388-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 18:24:33 2015 Received: (at 20450-done) by debbugs.gnu.org; 28 Apr 2015 22:24:33 +0000 Received: from localhost ([127.0.0.1]:55284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnDvc-0003hs-BE for submit@debbugs.gnu.org; Tue, 28 Apr 2015 18:24:32 -0400 Received: from mail3.vodafone.ie ([213.233.128.45]:14872) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnDvZ-0003hd-Rx for 20450-done@debbugs.gnu.org; Tue, 28 Apr 2015 18:24:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqkKAGAHQFVtT0tl/2dsb2JhbABcgwyCZ4FihwfCAYJdAoE9TAEBAQEBAYELQQWDWwEBBCMPAVYLDQsCAgUWCwICCQMCAQIBRQYBDAgBAYgrAbMUhWiOLQELIIEhiheFDIJogUUFnUeGLopLg1Ajg3U9gnYBAQE Received: from unknown (HELO localhost.localdomain) ([109.79.75.101]) by mail3.vodafone.ie with ESMTP; 28 Apr 2015 23:24:23 +0100 Message-ID: <55400896.8090902@draigBrady.com> Date: Tue, 28 Apr 2015 23:24:22 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Yunlian Jiang , 20450-done@debbugs.gnu.org Subject: Re: bug#20450: coreutils cannot built with clang References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20450-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 28/04/15 20:38, Yunlian Jiang wrote: > Hi, > > When I try to use clang to build coreutils, I got some thing like > > src/coreutils.c:81:3: AR src/libsinglebin_printenv.a > error: embedding a #include directive within macro arguments is not supported > # include "coreutils.h" > ^ > > And I have the following ugly patch to make it work. I can't reproduce with clang 3.5 on Fedora 22 here, but yes this will be an issue anywhere printf is a macro. I'll apply something like this fix in your name. thanks! Pádraig. From unknown Mon Aug 18 15:41:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 27 May 2015 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator