GNU bug report logs -
#23764
[bug-gnu-emacs] emacs-25.0.95 fails to build on DragonFlyBSD, and an easy repair
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23764 in the body.
You can then email your comments to 23764 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23764
; Package
emacs
.
(Mon, 13 Jun 2016 20:11:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Nelson H. F. Beebe" <beebe <at> math.utah.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 13 Jun 2016 20:11:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> math.utah.edu -
- 155 S 1400 E RM 233 beebe <at> acm.org beebe <at> computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Added indication that bug 23764 blocks19759
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 13 Jun 2016 20:42:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Tue, 14 Jun 2016 17:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Nelson H. F. Beebe" <beebe <at> math.utah.edu>
:
bug acknowledged by developer.
(Tue, 14 Jun 2016 17:41:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 23764-done <at> debbugs.gnu.org (full text, mbox):
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
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 13 Jul 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 344 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.