mxcl/homebrew — Issue #10539: bdw-gc fails to compile
Author: apetresc
Created: 2012-02-27 20:19:30+00:00
State: open

I'm trying to install the latest autogen, which contains bdw-gc as a dependency. Here is the [full output](https://gist.github.com/1926730) of `brew install -v bdw-gc` on a fully-updated and doctor'ed Homebrew.

The key part is here:

```
libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -fexceptions -Os -w -pipe -march=native -Qunused-arguments -c os_dep.c -fno-common -DPIC -o .libs/os_dep.o
misc.c:943:7: error: array size is negative
GC_STATIC_ASSERT((ptr_t)(word)(-1) > (ptr_t)0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/private/gc_priv.h:2143:51: note: expanded from macro 'GC_STATIC_ASSERT'
# define GC_STATIC_ASSERT(expr) (void)sizeof(char[(expr)? 1 : -1])
^~~~~~~~~~~~~~
1 error generated.
```

It looks like a simple incompatibility with clang that will require a patch. Any ideas?

Here are all the details of my Homebrew installation:

```
➜ ~ brew --env
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
MAKEFLAGS: -j8
➜ ~ brew --config
HOMEBREW_VERSION: 0.8.1
HEAD: 7ad78046f22232114f7e3975de5ffe1590ae9885
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11 installed? true
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl: /usr/bin/perl
Which Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Which Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
```