Go-sqlite3: Trouble installing on windows

Created on 3 Sep 2013  路  16Comments  路  Source: mattn/go-sqlite3

I'm installing into Windows 8 64 bit

When I run: go get github.com/mattn/go-sqlite3
I get this:
# github.com/mattn/go-sqlite3
In file included from sqlite3.go:4:
sqlite3.h:35: stdarg.h: No such file or directory
sqlite3.go:5: stdlib.h: No such file or directory
sqlite3.go:6: string.h: No such file or directory
sqlite3.go:35: stdio.h: No such file or directory
sqlite3.go:36: stdint.h: No such file or directory

Any ideas of what's screwing up?

I saw that there's an issue for a Windows 64 bit bug here:
https://github.com/mattn/go-sqlite3/issues/27

But I don't think it's the same issue..?

Most helpful comment

For a smooth win64 build experience I recommend using http://tdm-gcc.tdragon.net/ (the 64 bit version) instead.

All 16 comments

Probably, you don't install mingw/gcc.

Is this closable?

Ooops sorry

I never actually got it working... I'm still getting the same error.
I tried a couple things for a couple hours, and I never got it working...

I have mingw installed. I also tried re-installing it.
I also tried messing with cygwin, but that didn't really do much either.

C:\Users\Andrew>gcc --version
2.95

gcc version is too old. I'm using:

gcc (gcc-4.6.3 release with patches [build 20121012 by perlmingw.sf.net]) 4.6.3
Copyright (C) 2011 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.

I'm having trouble with MinGW...

It fails to install gcc, it says this:

...
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/dir.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/direct.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/dirent.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/dos.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/errno.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/excpt.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/fcntl.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/fenv.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/float.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/getopt.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/glob.h: extraction failed
mingw-get: *** ERROR *** cannot replace existing file
mingw-get: *** ERROR *** C:\MinGW\/mingw32/include/inttypes.h: extraction failed
...

It just spams this for everything it's trying to do. I tried a couple of different things:
I tried running mingw gui as administrator, it doesn't make a difference.

I tried it on the command line:
mingw-get install gcc

... that gives me the same error messages.

I also tried changing the file permissions for the mingw folder...

It looks like I have this old version of gcc from WinAVR:
http://sourceforge.net/projects/winavr/

I'll see if uninstalling that helps

I just used where gcc.exe and it turns out it was using a version of gcc that came with this garbage:
http://www.cse.yorku.ca/~roumani/fortran/ftn.htm

I rooted out that junk gcc version, and so now I have this:

C:\Users\Andrew>gcc --version
gcc (GCC) 4.8.1
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.

I then tried installing go-sqlite3 again like this:

C:\Users\Andrew\gotestsite>go get github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

But it seems I have some new error...

It looks like I need to get the 64 bit version of mingw...
http://sourceforge.net/projects/mingw-w64/

I'll try that out later.

Hello, I am having the same problem CC1.exe

For the record, I had the same problem, tried the 64-bit version (Mingw-w64), and it worked.

http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.8.2/threads-win32/seh/

I have the same problem like

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

and tried MinGW-W64, it worked too.

For a smooth win64 build experience I recommend using http://tdm-gcc.tdragon.net/ (the 64 bit version) instead.

Any update on this? If not, I'll close this.

thanks rusco, it works!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mhat picture mhat  路  7Comments

ghost picture ghost  路  6Comments

KrisCarr picture KrisCarr  路  11Comments

SaekiRaku picture SaekiRaku  路  3Comments

gaorongfu picture gaorongfu  路  10Comments