From unknown Sat Jun 21 10:46:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#23764: [bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and an easy repair Resent-From: "Nelson H. F. Beebe" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Jun 2016 20:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 23764@debbugs.gnu.org Cc: beebe@math.utah.edu X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.146584864624413 (code B ref -1); Mon, 13 Jun 2016 20:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jun 2016 20:10:46 +0000 Received: from localhost ([127.0.0.1]:39310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYC2-0006Ld-LF for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYBy-0006LN-Tq for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYBs-0003vH-0A for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBr-0003vA-SZ for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBp-0007jD-BE for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYBj-0003uT-Q0 for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:28 -0400 Received: from mail.math.utah.edu ([155.101.98.135]:57418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBj-0003sw-Bh for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:23 -0400 Received: from gamma.math.utah.edu (gamma.math.utah.edu [155.101.96.20]) by mail.math.utah.edu (8.14.8/8.14.8) with ESMTP id u5DKA7gB011347; Mon, 13 Jun 2016 14:10:12 -0600 (MDT) Received: from gamma.math.utah.edu (localhost [127.0.0.1]) by gamma.math.utah.edu (8.15.1/8.15.1) with ESMTP id u5DKA7Rs017879; Mon, 13 Jun 2016 14:10:07 -0600 Received: (from beebe@localhost) by gamma.math.utah.edu (8.15.1/8.15.1/Submit) id u5DKA7IJ017877; Mon, 13 Jun 2016 14:10:07 -0600 Date: Mon, 13 Jun 2016 14:10:07 -0600 From: "Nelson H. F. Beebe" X-US-Mail: "Department of Mathematics, 110 LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA" X-Telephone: +1 801 581 5254 X-FAX: +1 801 581 4148 X-URL: http://www.math.utah.edu/~beebe Message-ID: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.8 (mail.math.utah.edu [155.101.98.135]); Mon, 13 Jun 2016 14:10:12 -0600 (MDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -5.0 (-----) emacs-25.0.95 fails to build on DragonFlyBSD 3.8, 3.9, 4.0, 4.2, 4.4, and 4.6, independent of the compiler (various gcc or clang versions) used. On each system, src/alloc.c fails to compile: CC alloc.o alloc.c:474:32: error: macro "ALIGN" passed 2 arguments, but takes just 1 ALIGN (void *ptr, int alignment) ^ alloc.c:475:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '' token { ^ alloc.c: In function 'pure_alloc': alloc.c:5171:66: error: macro "ALIGN" passed 2 arguments, but takes just 1 result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); ^ alloc.c:5171:16: error: 'ALIGN' undeclared (first use in this function) result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); ^ alloc.c:5171:16: note: each undeclared identifier is reported only once for each function it appears in Makefile:378: recipe for target 'alloc.o' failed gmake[1]: [alloc.o] Error 1 (ignored) The conflict with the all-to-generic macro name ALIGN() appears to come from these DragonFlyBSD definitions: % find /usr/include -type f | xargs grep '[^_A-Z]_ALIGN[^_A-Z]' /usr/include/cpu/param.h:#define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) /usr/include/cpu/param.h:#define ALIGN(p) _ALIGN(p) whereas alloc.c has static void * ALIGN (void *ptr, int alignment) { return (void *) ROUNDUP ((uintptr_t) ptr, alignment); } As an experiment, I made these patches to alloc.c on DragonFlyBSD 4.6: % diff alloc.c.org alloc.c 474c474 < ALIGN (void *ptr, int alignment) --- > EMACS_ALIGN (void *ptr, int alignment) 1245c1245 < abase = ALIGN (base, BLOCK_ALIGN); --- > abase = EMACS_ALIGN (base, BLOCK_ALIGN); 5171c5171 < result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); --- > result = EMACS_ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); That solved the build problem on DragonFlyBSD 4.6, and I've installed the new emacs on that system. The same fix repaired all of the five other versions of that O/S in my lab. Another, and simpler solution, would be to insert #undef ALIGN before the first use of ALIGN() in alloc.c. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: beebe@math.utah.edu - - 155 S 1400 E RM 233 beebe@acm.org beebe@computer.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - ------------------------------------------------------------------------------- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 13 16:41:31 2016 Received: (at control) by debbugs.gnu.org; 13 Jun 2016 20:41:31 +0000 Received: from localhost ([127.0.0.1]:39331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYfr-0000EI-Ei for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:41:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYfq-0000E6-3e for control@debbugs.gnu.org; Mon, 13 Jun 2016 16:41:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYfk-0002yB-CJ for control@debbugs.gnu.org; Mon, 13 Jun 2016 16:41:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYfk-0002y5-94 for control@debbugs.gnu.org; Mon, 13 Jun 2016 16:41:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bCYfi-0004lW-SD for control@debbugs.gnu.org; Mon, 13 Jun 2016 16:41:22 -0400 Subject: control message for bug 19759 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Mon, 13 Jun 2016 16:41:22 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.4 (------) block 19759 by 23764 From unknown Sat Jun 21 10:46:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Nelson H. F. Beebe" Subject: bug#23764: closed (Re: bug#23764: [bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and an easy repair) Message-ID: References: <0by467pt26.fsf@fencepost.gnu.org> X-Gnu-PR-Message: they-closed 23764 X-Gnu-PR-Package: emacs Reply-To: 23764@debbugs.gnu.org Date: Tue, 14 Jun 2016 17:41:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1465926062-17260-1" This is a multi-part message in MIME format... ------------=_1465926062-17260-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #23764: [bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and a= n easy repair which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 23764@debbugs.gnu.org. --=20 23764: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D23764 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1465926062-17260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 23764-done) by debbugs.gnu.org; 14 Jun 2016 17:40:59 +0000 Received: from localhost ([127.0.0.1]:40824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCsKg-0004U1-ON for submit@debbugs.gnu.org; Tue, 14 Jun 2016 13:40:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCsKf-0004Tm-Ef for 23764-done@debbugs.gnu.org; Tue, 14 Jun 2016 13:40:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCsKZ-0003D6-7X for 23764-done@debbugs.gnu.org; Tue, 14 Jun 2016 13:40:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCsKZ-0003CK-3F for 23764-done@debbugs.gnu.org; Tue, 14 Jun 2016 13:40:51 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bCsKX-0002BC-9V; Tue, 14 Jun 2016 13:40:49 -0400 From: Glenn Morris To: 23764-done@debbugs.gnu.org Subject: Re: bug#23764: [bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and an easy repair References: X-Spook: Mexican army Power lines DMAT Montenegro Lon Horiuchi X-Ran: STOc`q2qdaV4d0F{pRpyE|4t@|28K`qc7}@"zgn:LS8fwD=\*}F2wm^14(e;h]&?G,VYAH X-Hue: white X-Attribution: GM Date: Tue, 14 Jun 2016 13:40:49 -0400 In-Reply-To: (Nelson H. F. Beebe's message of "Mon, 13 Jun 2016 14:10:07 -0600") Message-ID: <0by467pt26.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23764-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.4 (------) Version: 25.0.96 Thanks; fixed. I see DragonFly BSD has known about this for months, eg https://github.com/DragonFlyBSD/DPorts/blob/master/editors/emacs-devel/dragonfly/patch-src_alloc.c ------------=_1465926062-17260-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Jun 2016 20:10:46 +0000 Received: from localhost ([127.0.0.1]:39310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYC2-0006Ld-LF for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCYBy-0006LN-Tq for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYBs-0003vH-0A for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBr-0003vA-SZ for submit@debbugs.gnu.org; Mon, 13 Jun 2016 16:10:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBp-0007jD-BE for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYBj-0003uT-Q0 for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:28 -0400 Received: from mail.math.utah.edu ([155.101.98.135]:57418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYBj-0003sw-Bh for bug-gnu-emacs@gnu.org; Mon, 13 Jun 2016 16:10:23 -0400 Received: from gamma.math.utah.edu (gamma.math.utah.edu [155.101.96.20]) by mail.math.utah.edu (8.14.8/8.14.8) with ESMTP id u5DKA7gB011347; Mon, 13 Jun 2016 14:10:12 -0600 (MDT) Received: from gamma.math.utah.edu (localhost [127.0.0.1]) by gamma.math.utah.edu (8.15.1/8.15.1) with ESMTP id u5DKA7Rs017879; Mon, 13 Jun 2016 14:10:07 -0600 Received: (from beebe@localhost) by gamma.math.utah.edu (8.15.1/8.15.1/Submit) id u5DKA7IJ017877; Mon, 13 Jun 2016 14:10:07 -0600 Date: Mon, 13 Jun 2016 14:10:07 -0600 From: "Nelson H. F. Beebe" To: bug-gnu-emacs@gnu.org X-US-Mail: "Department of Mathematics, 110 LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA" X-Telephone: +1 801 581 5254 X-FAX: +1 801 581 4148 X-URL: http://www.math.utah.edu/~beebe Subject: [bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and an easy repair Message-ID: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.8 (mail.math.utah.edu [155.101.98.135]); Mon, 13 Jun 2016 14:10:12 -0600 (MDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: beebe@math.utah.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -5.0 (-----) emacs-25.0.95 fails to build on DragonFlyBSD 3.8, 3.9, 4.0, 4.2, 4.4, and 4.6, independent of the compiler (various gcc or clang versions) used. On each system, src/alloc.c fails to compile: CC alloc.o alloc.c:474:32: error: macro "ALIGN" passed 2 arguments, but takes just 1 ALIGN (void *ptr, int alignment) ^ alloc.c:475:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '' token { ^ alloc.c: In function 'pure_alloc': alloc.c:5171:66: error: macro "ALIGN" passed 2 arguments, but takes just 1 result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); ^ alloc.c:5171:16: error: 'ALIGN' undeclared (first use in this function) result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); ^ alloc.c:5171:16: note: each undeclared identifier is reported only once for each function it appears in Makefile:378: recipe for target 'alloc.o' failed gmake[1]: [alloc.o] Error 1 (ignored) The conflict with the all-to-generic macro name ALIGN() appears to come from these DragonFlyBSD definitions: % find /usr/include -type f | xargs grep '[^_A-Z]_ALIGN[^_A-Z]' /usr/include/cpu/param.h:#define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) /usr/include/cpu/param.h:#define ALIGN(p) _ALIGN(p) whereas alloc.c has static void * ALIGN (void *ptr, int alignment) { return (void *) ROUNDUP ((uintptr_t) ptr, alignment); } As an experiment, I made these patches to alloc.c on DragonFlyBSD 4.6: % diff alloc.c.org alloc.c 474c474 < ALIGN (void *ptr, int alignment) --- > EMACS_ALIGN (void *ptr, int alignment) 1245c1245 < abase = ALIGN (base, BLOCK_ALIGN); --- > abase = EMACS_ALIGN (base, BLOCK_ALIGN); 5171c5171 < result = ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); --- > result = EMACS_ALIGN (purebeg + pure_bytes_used_lisp, GCALIGNMENT); That solved the build problem on DragonFlyBSD 4.6, and I've installed the new emacs on that system. The same fix repaired all of the five other versions of that O/S in my lab. Another, and simpler solution, would be to insert #undef ALIGN before the first use of ALIGN() in alloc.c. ------------------------------------------------------------------------------- - Nelson H. F. Beebe Tel: +1 801 581 5254 - - University of Utah FAX: +1 801 581 4148 - - Department of Mathematics, 110 LCB Internet e-mail: beebe@math.utah.edu - - 155 S 1400 E RM 233 beebe@acm.org beebe@computer.org - - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ - ------------------------------------------------------------------------------- ------------=_1465926062-17260-1--