Closed andlabs closed 9 years ago
jrick (the conformal/gotk3 guy) seems to think this is a clang-specific problem. (I wouldn't be surprised...) [11:30] <jrick> andlabs: I think issue #8238 is related to clang, when I build go 1.3 with gcc, cgo doesn't panic (but I get other weirdness with *C.T and *C.struct__T errors) [11:32] <jrick> what's even more odd is that the *C.struct__T errors don't seem deterministic [11:32] <jrick> i.e. run go get once, and the build fails [11:33] <jrick> run it again, and everything works :/ [11:33] <jrick> I wonder if my glib/gtk packages are built with clang That being said, I can try both comments's requests on OS X later (and then remember how to use GNUstep for a Linux-based example).
"Try changing that line to do nothing if there is no entry in the typedef map and see what happens." No panic; everything seems to compile and run fine. Minimal test: package main // #cgo LDFLAGS: -framework Foundation -lobjc // #include <objc/message.h> // #include <objc/objc.h> // #include <objc/runtime.h> import "C" func main() { var x C.id; println(x) } Can't reproduce on Linux; compilation works fine but fails during link due to incompatible linker options in the LDFLAGS above. pietro@pietro-laptop:/tmp$ gcc --version gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. pietro@pietro-laptop:/tmp$ clang --version Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4) Target: x86_64-pc-linux-gnu Thread model: posix
I've been able to build gotk3 using a clang-built go tip several times now with no panics or other issues (that also includes the missing typedef issues from issue #8463).