Opened 4 years ago

Last modified 2 years ago

#61406 assigned defect

emacs @27.1_2+x11: dyld: lazy symbol binding failed: Symbol not found: _aligned_alloc

Reported by: texas-swift (Spencer Swift) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc: mascguy (Christopher Nielsen), cooljeanius (Eric Gallager)
Port: emacs

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello,

I have so far been unable to build any version of Emacs 27 +x11. I keep getting this message during bootstrap build:

:info:build ./temacs --batch  -l loadup --temacs=pbootstrap
:info:build dyld: lazy symbol binding failed: Symbol not found: _aligned_alloc
:info:build   Referenced from: /opt/local/var/macports/build/_opt_local_var_mac\
ports_sources_rsync.macports.org_macports_release_tarballs_ports_editors_emacs/\
emacs/work/emacs-27.1/src/./temacs
:info:build   Expected in: /usr/lib/libSystem.B.dylib

I can successfully build emacs 27.1_2 W/O x11, but I am a heavy X11 user and prefer that variant. I have also successfully built emacs 26+x11.

macOS 10.14.6 Mojave
Xcode 11.3.1

Attachments (1)

main.log (550.4 KB) - added by texas-swift (Spencer Swift) 4 years ago.
emacs@27.1_2+x11 build log

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by texas-swift (Spencer Swift)

Attachment: main.log added

emacs@27.1_2+x11 build log

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: emacs +x11 removed
Owner: set to drkp
Port: emacs added; emacs@27.1_2+x11 removed
Status: newassigned
Summary: Emacs 27.1_2 +x11 fails to build with undefined symbolemacs @27.1_2+x11: dyld: lazy symbol binding failed: Symbol not found: _aligned_alloc

There are several other reports of this problem by searching Google.

Here is the upstream bug report, I think: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36172

The problem occurs because Xcode 11 has the macOS 10.15 SDK. Aligned alloc was apparently introduced in 10.15 and the emacs configure script erroneously takes it presence in the SDK as an indication that it can be used at runtime on 10.14, which it cannot. The developers of emacs appear to be unaware of how macOS SDKs work.

You could avoid the problem by downgrading to Xcode 10 and the Xcode 10 version of the command line tools.

comment:2 Changed 4 years ago by texas-swift (Spencer Swift)

Okay. I did Google, but guess I didn't comprehend the Xcode downgrade step.

Thanks,

comment:3 in reply to:  1 Changed 3 years ago by barracuda156

Replying to ryandesign:

The problem occurs because Xcode 11 has the macOS 10.15 SDK. Aligned alloc was apparently introduced in 10.15 and the emacs configure script erroneously takes it presence in the SDK as an indication that it can be used at runtime on 10.14, which it cannot. The developers of emacs appear to be unaware of how macOS SDKs work.

I got this error now when building algol68g on 10.6:

Undefined symbols:
  "_aligned_alloc", referenced from:
      _a68_alloc in a68g-mem.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

comment:4 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:5 Changed 2 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.