Skip to content

Instantly share code, notes, and snippets.

@dje
Created July 8, 2013 19:28
Show Gist options
  • Save dje/5951741 to your computer and use it in GitHub Desktop.
Save dje/5951741 to your computer and use it in GitHub Desktop.
Erlang failing to build on OS X 10.9
brew: superenv removed: -m64 [16/1943]
Undefined symbols for architecture x86_64:
"___sync_val_compare_and_swap_1", referenced from:
_ethr_dw_atomic_cmpxchg in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_ddrb in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_rb in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_wb in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_acqb in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_relb in libethread.a(ethr_atomics.o)
_ethr_dw_atomic_cmpxchg_mb in libethread.a(ethr_atomics.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/private/tmp/erlang-h2cL/otp-OTP_R15B03-1/bin/i386-apple-darwin13.0.0/beam.smp] Error 1
make[2]: *** [opt] Error 2
make[1]: *** [smp] Error 2
make: *** [emulator] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.4
HEAD: f8a50a75df4c6996e2b206f864119c4f35193845
CPU: quad-core 64-bit haswell
OS X: 10.9-x86_64
Xcode: 5.0 => /Applications/Xcode5-DP.app/Contents/Developer
X11: N/A
==> ENV
HOMEBREW_CC: clang
MAKEFLAGS: -j4
@sferik
Copy link

sferik commented Jul 30, 2013

I’m getting this same error trying to install erlang-r16 on my new MacBook Air (OS X 10.8.4 build 12E3067). Were you able to get this working on your machine?

@leifg
Copy link

leifg commented Aug 2, 2013

I have the same issue (exact same build with new macbook)

@KeeperPat
Copy link

I was able to work around this error by using gcc to compile. Here's what I did:

brew tap homebrew/dupes
brew install apple-gcc42
brew install -v --use-gcc erlang-r16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment