GNU bug report logs - #36172
27.0.50; linking error in git head on macos: _aligned_alloc

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Tue, 11 Jun 2019 15:51:02 UTC

Severity: normal

Tags: notabug

Merged with 40741

Found in version 27.0.50

Done: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Sam Steingold <sds <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 36172 <at> debbugs.gnu.org
Subject: bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
Date: Tue, 11 Jun 2019 16:14:25 -0400
$ gcc e.c
e.c:6:13: warning: 'aligned_alloc' is only available on macOS 10.15 or newer
      [-Wunguarded-availability-new]
  char *p = aligned_alloc (8, 1);
            ^~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:50:10:
note:
      'aligned_alloc' has been marked as being introduced in macOS
10.15 here, but the deployment
      target is macOS 10.14.0
void    *aligned_alloc(size_t __alignment, size_t __size)
__result_use_check __alloc_size(...
         ^
e.c:6:13: note: enclose 'aligned_alloc' in a __builtin_available check
to silence this warning
  char *p = aligned_alloc (8, 1);
            ^~~~~~~~~~~~~
e.c:7:13: warning: 'aligned_alloc' is only available on macOS 10.15 or newer
      [-Wunguarded-availability-new]
  char *q = aligned_alloc (8, 2);
            ^~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:50:10:
note:
      'aligned_alloc' has been marked as being introduced in macOS
10.15 here, but the deployment
      target is macOS 10.14.0
void    *aligned_alloc(size_t __alignment, size_t __size)
__result_use_check __alloc_size(...
         ^
e.c:7:13: note: enclose 'aligned_alloc' in a __builtin_available check
to silence this warning
  char *q = aligned_alloc (8, 2);
            ^~~~~~~~~~~~~
2 warnings generated.

my system is 10.14.5

On Tue, 11 Jun 2019 at 16:08, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
>
> 'configure' says you have aligned_alloc, because it successfully built
> an executable that calls aligned_alloc. However, the dynamic linker
> fails, in that when temacs runs and calls aligned_alloc, its dynamic
> linker fails to find an implementation. Please figure out why that is.
> For example, you can compile and run this program with the same flags
> you use to compile Emacs:
>
>    #include <stdlib.h>
>
>    int
>    main (int argc, char **argv)
>    {
>      char *p = aligned_alloc (8, 1);
>      char *q = aligned_alloc (8, 2);
>      return p && q && p == q;
>    }
>
> If it compiles and runs successfully, you can then investigate why it
> works but temacs doesn't. Otherwise, you can investigate why it doesn't
> work.
>


-- 
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net>
<http://steingoldpsychology.com>




This bug report was last modified 5 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.