Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.34k forks source link

brew install go fails #2256

Closed olivere closed 14 years ago

olivere commented 14 years ago

Seems like some tests won't pass:

...
--- cd ../misc/cgo/stdio
rm -rf *.o *.a *.[568vq] [568vq].out hello fib chain run.out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
CGOPKGPATH= /usr/local/Cellar/go/HEAD/bin/cgo --  align.go file.go test.go 
Error running gcc:
$ 6c -m64 -E -dM -xc - <<EOF

typedef struct { char *p; int n; } _GoString_;
_GoString_ GoString(char *p);
char *CString(_GoString_);
#include <stdio.h>

typedef unsigned char Uint8;
typedef unsigned short Uint16;

typedef enum {
 MOD1 = 0x0000,
 MODX = 0x8000
} SDLMod;

typedef enum {
 A = 1,
 B = 322,
 SDLK_LAST
} SDLKey;

typedef struct SDL_keysym {
        Uint8 scancode;
        SDLKey sym;
        SDLMod mod;
        Uint16 unicode;
} SDL_keysym;

typedef struct SDL_KeyboardEvent {
        Uint8 typ;
        Uint8 which;
        Uint8 state;
        SDL_keysym keysym;
} SDL_KeyboardEvent;

void makeEvent(SDL_KeyboardEvent *event) {
 unsigned char *p;
 int i;

 p = (unsigned char*)event;
 for (i=0; i<sizeof *event; i++) {
   p[i] = i;
 }
}

int same(SDL_KeyboardEvent* e, Uint8 typ, Uint8 which, Uint8 state, Uint8 scan, SDLKey sym, SDLMod mod, Uint16 uni) {
  return e->typ == typ && e->which == which && e->state == state && e->keysym.scancode == scan && e->keysym.sym == sym && e->keysym.mod == mod && e->keysym.unicode == uni;
}

void cTest(SDL_KeyboardEvent *event) {
 printf("C: %#x %#x %#x %#x %#x %#x %#x\n", event->typ, event->which, event->state,
   event->keysym.scancode, event->keysym.sym, event->keysym.mod, event->keysym.unicode);
 fflush(stdout);
}

EOF
make: *** [_cgo_defun.c] Error 2
Exit status: 2

http://github.com/mxcl/homebrew/blob/master/Library/Formula/go.rb#L32

==> Environment
HOMEBREW_VERSION: 0.7
HEAD: 3066bc9c042dd81e74d22fbe4eacf28b31ff08f3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_CACHE: /Users/oliver/Library/Caches/Homebrew
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: dual-core 64-bit penryn
OS X: 10.6.4
Kernel Architecture: i386
Ruby: 1.8.7-174
GCC-4.0: build 5493 (5493 or newer recommended)
GCC-4.2: build 5659 (5659 or newer recommended)
LLVM: build 2207 (2207 or newer recommended)
MacPorts or Fink? false
X11 installed? true

==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe
Error: Failure while executing: ./all.bash 
Please report this bug at http://github.com/mxcl/homebrew/issues
These existing issues may help you:
http://github.com/mxcl/homebrew/issues/#issue/1915
http://github.com/mxcl/homebrew/issues/#issue/2077

Also try:
  `brew doctor` to check your setup for common problems.
  `brew missing` to check installed packages for missing deps.
sophiebits commented 14 years ago

I have the same problem.

adamv commented 14 years ago

Our brew tracks trunk, and doesn't have a stable url pegged. I might suggest submitting a patch with a "url" pointing to a known-good release.

adamv commented 14 years ago

Someone should find a stable mercurial tag that builds and passes tests: http://code.google.com/p/go/source/browse