mxcl/homebrew — Issue #10811: brew install go error: r60.3.
Author: cashplk
Created: 2012-03-09 08:05:12+00:00
State: open

use command line to install go language:

brew install go

Error is this:

/usr/local/Cellar/go/r60.3/src/libmach/executable.c:787:25: error: argument to 'sizeof' in '__builtin___memset_chk' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror,-Wsizeof-pointer-memaccess]
memset(buf, 0, sizeof buf);
~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/secure/_string.h:77:41: note: expanded from macro 'memset'
? __builtin___memset_chk (dest, val, len, __darwin_obsz0 (dest)) \
^
/usr/local/Cellar/go/r60.3/src/libmach/executable.c:965:25: error: argument to 'sizeof' in '__builtin___memset_chk' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror,-Wsizeof-pointer-memaccess]
memset(buf, 0, sizeof buf);
~~~~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/secure/_string.h:77:41: note: expanded from macro 'memset'
? __builtin___memset_chk (dest, val, len, __darwin_obsz0 (dest)) \
^
2 errors generated.
make: *** [executable.o] Error 1
make: *** Waiting for unfinished jobs....
clang: warning: argument unused during compilation: '-ggdb'
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/go.rb#L33
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 2e63ae9f71e64abb6629797ebd11ca4becee3b98
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.1
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11: /usr/X11
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/bin/python
Which Ruby: /Users/cashplk/.rvm/rubies/ruby-1.9.3-p0-falcon/bin/ruby
==> Build Flags
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: -j2

but when I enter to `~/Library/Caches/Homebrew/go--hg/src`, run `./make.bash`, Install is ok.