mxcl/homebrew — Issue #9727: libcaca doesn't compile with --use-clang
Author: hackeron
Created: 2012-01-22 21:02:51+00:00
State: open

libcaca doesn't compile normally or with --use-clang. It does however compile fine with --use-gcc

```
➜ ~ brew install libcaca --use-clang
==> Downloading http://caca.zoy.org/files/libcaca/libcaca-0.99.beta17.tar.gz
File already downloaded in /Users/hackeron/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/libcaca/0.99b17 --mandir=/usr/local/Cellar/libcaca/0.99b17/share/man --disable-imlib2 --disable-doc --disable-slang --disable-java --disable-csharp
==> make install
Making install in kernel
test -z "/usr/local/Cellar/libcaca/0.99b17/lib" || ../.auto/install-sh -c -d "/usr/local/Cellar/libcaca/0.99b17/lib"
make[2]: Nothing to be done for `install-data-am'.
Making install in caca
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I.. -DPLUGINDIR=\"\" -D__LIBCACA__ -I/usr/local/Cellar/gettext/0.18.1.1/include -O3 -w -pipe -march=native -Xclang -target-feature -Xclang -aes -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -c -o libcaca_la-caca.lo `test -f 'caca.c' || echo './'`caca.c
libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -I.. -DPLUGINDIR=\"\" -D__LIBCACA__ -I/usr/local/Cellar/gettext/0.18.1.1/include -O3 -w -pipe -march=native -Xclang -target-feature -Xclang -aes -g -O2 -fno-strength-reduce -fomit-frame-pointer -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -c caca.c -fno-common -DPIC -o .libs/libcaca_la-caca.o
clang: warning: argument unused during compilation: '-fno-strength-reduce'
caca.c:474:38: error: only weak aliases are supported on darwin
char const * cucul_get_version(void) CACA_ALIAS(caca_get_version);
^
./caca.h:649:52: note: instantiated from:
# define CACA_ALIAS(x) __attribute__ ((weak, alias(#x)))
^
1 error generated.
make[1]: *** [libcaca_la-caca.lo] Error 1
make: *** [install-recursive] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/libcaca.rb#L31
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 03a4f011b2c625537935d62c20c6c7128711fe51
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: 8-core 64-bit nehalem
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2.1
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.0 build 211
MacPorts or Fink? false
X11 installed? true
==> Build Flags
"--use-clang" was specified
CC: /usr/bin/clang
CXX: /usr/bin/clang++ => /usr/bin/clang
LD: /usr/bin/clang
CFLAGS: -O3 -w -pipe -march=native -Xclang -target-feature -Xclang -aes
CXXFLAGS: -O3 -w -pipe -march=native -Xclang -target-feature -Xclang -aes
CPPFLAGS: -I/usr/local/Cellar/gettext/0.18.1.1/include
LDFLAGS: -L/usr/local/Cellar/gettext/0.18.1.1/lib
PKG_CONFIG_PATH: /usr/local/Cellar/gettext/0.18.1.1/lib/pkgconfig
```

Here is my brew doctor output:

```
➜ brew doctor
Your system is raring to brew.
```