* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
@ 2019-06-11 15:49 Sam Steingold
2019-06-11 17:37 ` Paul Eggert
2019-08-04 7:15 ` Keith Irwin
0 siblings, 2 replies; 7+ messages in thread
From: Sam Steingold @ 2019-06-11 15:49 UTC (permalink / raw)
To: 36172
make bootstrap fails with:
--8<---------------cut here---------------start------------->8---
rm -f bootstrap-emacs.pdmp
./temacs --batch -l loadup --temacs=pbootstrap
dyld: lazy symbol binding failed: Symbol not found: _aligned_alloc
Referenced from: /Users/sam.steingold/src/emacs/trunk/build/src/./temacs
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _aligned_alloc
Referenced from: /Users/sam.steingold/src/emacs/trunk/build/src/./temacs
Expected in: /usr/lib/libSystem.B.dylib
make[2]: *** [bootstrap-emacs.pdmp] Abort trap: 6
--8<---------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 7, x86_64-apple-darwin18.6.0, NS appkit-1671.50 Version 10.14.5 (Build 18F203))
of 2019-06-05 built on BZ-C02XR5CGJG5L
Repository revision: 7ad5e3915fe0fad7c8053b53cab1aa7aa74193fe
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1671
System Description: Mac OS X 10.14.5
Configured using:
'configure --with-mailutils --with-ns
PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/imagemagick/lib/pkgconfig:/usr/local/opt/gnutls/lib/pkgconfig:/usr/local/opt/jansson/lib/pkgconfig'
Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS
JSON PDUMPER LCMS2 GMP
Important settings:
value of $LANG: C
locale-coding-system: utf-8-unix
Load-path shadows:
None found.
--
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://memri.org http://islamexposedonline.com http://mideasttruth.com
DRM "access management" == prison "freedom management".
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 15:49 bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc Sam Steingold
@ 2019-06-11 17:37 ` Paul Eggert
2019-06-11 18:20 ` Sam Steingold
2019-08-04 7:15 ` Keith Irwin
1 sibling, 1 reply; 7+ messages in thread
From: Paul Eggert @ 2019-06-11 17:37 UTC (permalink / raw)
To: sds; +Cc: 36172
This vaguely looks like the configure-time check for aligned_alloc
disagrees with what's actually installed in your runtime library. If
your runtime library is older than what you built Emacs with, that might
explain the problem.
What are the values of HAVE_ALIGNED_ALLOC, HYBRID_MALLOC,
HAVE_POSIX_MEMALIGN, SYSTEM_MALLOC, and DOUG_LEA_MALLOC in your
src/config.h file? Do these values correspond to what is actually on
your system?
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 17:37 ` Paul Eggert
@ 2019-06-11 18:20 ` Sam Steingold
2019-06-11 20:08 ` Paul Eggert
0 siblings, 1 reply; 7+ messages in thread
From: Sam Steingold @ 2019-06-11 18:20 UTC (permalink / raw)
To: Paul Eggert; +Cc: 36172
On Tue, 11 Jun 2019 at 13:37, Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> This vaguely looks like the configure-time check for aligned_alloc
> disagrees with what's actually installed in your runtime library. If
> your runtime library is older than what you built Emacs with, that might
> explain the problem.
I see this after make bootstrap, so the configure was run just now.
> What are the values of HAVE_ALIGNED_ALLOC, HYBRID_MALLOC,
> HAVE_POSIX_MEMALIGN, SYSTEM_MALLOC, and DOUG_LEA_MALLOC in your
> src/config.h file?
here are the relevant parts of config.h:
#define HAVE_ALIGNED_ALLOC 1
#define HAVE_DECL_ALIGNED_ALLOC 1
/* #undef HYBRID_MALLOC */
/* #undef HAVE_POSIX_MEMALIGN */
#define SYSTEM_MALLOC 1
/* #undef DOUG_LEA_MALLOC */
> Do these values correspond to what is actually on
> your system?
how do I find that out?
Darwin BZ-C02XR5CGJG5L 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25
23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
--
Sam Steingold <http://sds.podval.org> <http://www.childpsy.net>
<http://steingoldpsychology.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 18:20 ` Sam Steingold
@ 2019-06-11 20:08 ` Paul Eggert
2019-06-11 20:14 ` Sam Steingold
0 siblings, 1 reply; 7+ messages in thread
From: Paul Eggert @ 2019-06-11 20:08 UTC (permalink / raw)
To: Sam Steingold; +Cc: 36172
'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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 20:08 ` Paul Eggert
@ 2019-06-11 20:14 ` Sam Steingold
2019-06-11 21:17 ` Paul Eggert
0 siblings, 1 reply; 7+ messages in thread
From: Sam Steingold @ 2019-06-11 20:14 UTC (permalink / raw)
To: Paul Eggert; +Cc: 36172
$ 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@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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 20:14 ` Sam Steingold
@ 2019-06-11 21:17 ` Paul Eggert
0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggert @ 2019-06-11 21:17 UTC (permalink / raw)
To: Sam Steingold; +Cc: 36172
On 6/11/19 1:14 PM, Sam Steingold wrote:
> $ 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);
> ^~~~~~~~~~~~~
So your include files declare alloc_aligned and it links, but it doesn't
run? Sounds like your development environment is messed up.
You might try running the shell command 'xcode-select --install'; this
solved a similar problem when building Ruby, as described in
<https://github.com/rbenv/ruby-build/issues/1133>.
Or you might try configuring with flags that say "build for the macOS
I'm currently running, not for some future version of macOS". Perhaps
something like "-mmacosx-version-min=10.14"? I don't use macOS so I'm
afraid you may have to do some research here.
<https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15518> may help you
get started.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc
2019-06-11 15:49 bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc Sam Steingold
2019-06-11 17:37 ` Paul Eggert
@ 2019-08-04 7:15 ` Keith Irwin
1 sibling, 0 replies; 7+ messages in thread
From: Keith Irwin @ 2019-08-04 7:15 UTC (permalink / raw)
To: 36172
For what it’s worth, I had the same issue when xcode-select used Xcode 11 beta 5 on Mojave 10.14.6.
$ sudo xcode-select -s /Applications/Xcode.app # (Version 10.3)
and then a new ./configure solved the problem for me.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-08-04 7:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 15:49 bug#36172: 27.0.50; linking error in git head on macos: _aligned_alloc Sam Steingold
2019-06-11 17:37 ` Paul Eggert
2019-06-11 18:20 ` Sam Steingold
2019-06-11 20:08 ` Paul Eggert
2019-06-11 20:14 ` Sam Steingold
2019-06-11 21:17 ` Paul Eggert
2019-08-04 7:15 ` Keith Irwin
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).