* alloc.c compilation error in current tip
@ 2016-02-08 19:55 John Yates
2016-02-09 3:51 ` Paul Eggert
2016-02-09 8:28 ` Paul Eggert
0 siblings, 2 replies; 4+ messages in thread
From: John Yates @ 2016-02-08 19:55 UTC (permalink / raw)
To: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 641 bytes --]
CC alloc.o
alloc.c:1137:1: error: static declaration of ‘aligned_alloc’ follows
non-static declaration
In file included from alloc.c:31:0:
lisp.h:3780:14: note: previous declaration of ‘aligned_alloc’ was here
make[2]: *** [alloc.o] Error 1
$ uname -a
Linux jyates-deb7-64 3.10-0.bpo.tmw5-amd64 #1 SMP Debian
3.10.40-0~bpo70+1.tmw5 (2014-05-14) x86_64 GNU/Linux
$
$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 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.
[-- Attachment #2: Type: text/html, Size: 698 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alloc.c compilation error in current tip
2016-02-08 19:55 alloc.c compilation error in current tip John Yates
@ 2016-02-09 3:51 ` Paul Eggert
2016-02-09 8:28 ` Paul Eggert
1 sibling, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2016-02-09 3:51 UTC (permalink / raw)
To: John Yates, Emacs developers
Is this the current emacs-25 tip, or the current master tip? What's the commit ID?
What command lines did you use to configure and build?
> CC alloc.o
> alloc.c:1137:1: error: static declaration of ‘aligned_alloc’ follows
> non-static declaration
> In file included from alloc.c:31:0:
> lisp.h:3780:14: note: previous declaration of ‘aligned_alloc’ was here
> make[2]: *** [alloc.o] Error 1
>
> $ uname -a
> Linux jyates-deb7-64 3.10-0.bpo.tmw5-amd64 #1 SMP Debian
> 3.10.40-0~bpo70+1.tmw5 (2014-05-14) x86_64 GNU/Linux
> $
> $ gcc --version
> gcc (Debian 4.7.2-5) 4.7.2
> Copyright (C) 2012 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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: alloc.c compilation error in current tip
2016-02-08 19:55 alloc.c compilation error in current tip John Yates
2016-02-09 3:51 ` Paul Eggert
@ 2016-02-09 8:28 ` Paul Eggert
2016-02-09 13:48 ` John Yates
1 sibling, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2016-02-09 8:28 UTC (permalink / raw)
To: John Yates, Emacs developers
[-- Attachment #1: Type: text/plain, Size: 112 bytes --]
On second thought I think I see the problem. I installed the attached patch into
master; please give it a try.
[-- Attachment #2: 0001-Avoid-aligned_alloc-static-extern-collision.patch --]
[-- Type: text/x-diff, Size: 911 bytes --]
From 022b037ad2e11c6d2e07209a40163a3759ceac0d Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 9 Feb 2016 00:26:00 -0800
Subject: [PATCH] Avoid aligned_alloc static/extern collision
* src/alloc.c (aligned_alloc): Define to private name when a
static function, to avoid collision with lisp.h extern decl.
Reported by John Yates in:
http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00439.html
---
src/alloc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/alloc.c b/src/alloc.c
index 92945bc..7364d7c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1133,6 +1133,7 @@ lisp_free (void *block)
# define USE_ALIGNED_ALLOC 1
# elif !defined HYBRID_MALLOC && defined HAVE_POSIX_MEMALIGN
# define USE_ALIGNED_ALLOC 1
+# define aligned_alloc my_aligned_alloc /* Avoid collision with lisp.h. */
static void *
aligned_alloc (size_t alignment, size_t size)
{
--
2.5.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: alloc.c compilation error in current tip
2016-02-09 8:28 ` Paul Eggert
@ 2016-02-09 13:48 ` John Yates
0 siblings, 0 replies; 4+ messages in thread
From: John Yates @ 2016-02-09 13:48 UTC (permalink / raw)
To: Paul Eggert; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
I pulled master and rebuilt. Problem seems resolved.
On Tue, Feb 9, 2016 at 3:28 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On second thought I think I see the problem. I installed the attached
> patch into master; please give it a try.
>
[-- Attachment #2: Type: text/html, Size: 538 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-09 13:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 19:55 alloc.c compilation error in current tip John Yates
2016-02-09 3:51 ` Paul Eggert
2016-02-09 8:28 ` Paul Eggert
2016-02-09 13:48 ` John Yates
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.