shibukawa / nanogui-go

177 stars 27 forks source link

Import path and Compilation issues #1

Open zet4 opened 8 years ago

zet4 commented 8 years ago

The example code uses an invalid package name in import, nanogui.go instead of nanogui-go which results in errors, after fixing the packages and trying to build I still get this error while compiling (go build) nanogui itself or its example (note that nanovgo works just fine.):

panic: bad store type

goroutine 1 [running]:
panic(0x8b9380, 0xc0443d0c80)
        c:/go/src/runtime/panic.go:500 +0x1af
cmd/compile/internal/amd64.storeByType(0xae9640, 0xb1d880, 0xc0443d0c60)
        c:/go/src/cmd/compile/internal/amd64/ssa.go:116 +0xdc
cmd/compile/internal/amd64.ssaGenValue(0xc043b52360, 0xc0444ef3b0)
        c:/go/src/cmd/compile/internal/amd64/ssa.go:742 +0x2989
cmd/compile/internal/gc.genssa(0xc044406c30, 0xc0420e2278, 0xc043b1f8f0, 0xc043b1fb90)
        c:/go/src/cmd/compile/internal/gc/ssa.go:3976 +0x245
cmd/compile/internal/gc.compile(0xc0430014d0)
        c:/go/src/cmd/compile/internal/gc/pgen.go:482 +0x761
cmd/compile/internal/gc.funccompile(0xc0430014d0)
        c:/go/src/cmd/compile/internal/gc/dcl.go:1287 +0x18d
cmd/compile/internal/gc.Main()
        c:/go/src/cmd/compile/internal/gc/main.go:467 +0x19ff
cmd/compile/internal/amd64.Main()
        c:/go/src/cmd/compile/internal/amd64/galign.go:93 +0x301
main.main()
        c:/go/src/cmd/compile/main.go:33 +0x2aa

I've spent good 2 hours or so trying to figure out how to get any kind of verbosity but to no avail.

h:\gopath\src\github.com\mimameidr>go version

go version go1.7.1 windows/amd64

h:\gopath\src\github.com\mimameidr>gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=H:/MinGW/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 5.1.0 (tdm64-1)

h:\gopath\src\github.com\mimameidr>go env

set GOARCH=amd64
set GOBIN=H:\gopath\bin\
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=H:\gopath\
set GORACE=
set GOROOT=H:\Go
set GOTOOLDIR=H:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\hunte\AppData\Local\Temp\go-build020369026=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
ianberdin commented 7 years ago

Downgrade to Go 1.6.3. It will work :(

zet4 commented 7 years ago

Would rather not downgrade

ianberdin commented 7 years ago

I tried find error, but could not :(

funnywwh commented 7 years ago

go build --gcflags "-ssa=false"

ianberdin commented 7 years ago

@funnywwh Wow, thank you!

SaadHafiane commented 7 years ago

Same issue on go 1.8.3, windows 10 64bit, and go build --gcflags "-ssa=false" returns:

>go build --gcflags "-ssa=false" # github.com/shibukawa/nanogui-go flag provided but not defined: -ssa usage: compile [options] file.go... -% debug non-static initializers -+ compiling runtime -B disable bounds checking ....