Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

installed mingw for 64bit windows, still cannot build #435

Closed
student020341 opened this issue Jul 8, 2017 · 9 comments
Closed

installed mingw for 64bit windows, still cannot build #435

student020341 opened this issue Jul 8, 2017 · 9 comments

Comments

@student020341
Copy link

I tried searching this issue,

# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

and it looks like most of the resolved issues had obvious problems. In my scenario, I installed mingw and added the bin folder to my path. I can do gcc -v and which gcc, and that yields...

$ which gcc
/c/Program Files/mingw-w64/x86_64-7.1.0-posix-seh-rt_v5-rev0/mingw64/bin/gcc

I am able to run go get and go install for "github.com/mattn/go-sqlite3" but I still get that error when I try to build. I think go install is working because I have go-sqlite3.a in my gopath pkg directory... is there some special way I need to use it if we can't figure out the gcc issue?

@mattn
Copy link
Owner

mattn commented Jul 9, 2017

May be space contained in Program Files. I can't help you because this is not depend on go-sqlite3.

@student020341
Copy link
Author

So windows can find it but go cannot because of the space? Thanks for the suggestion, will give that a try.

@mattn
Copy link
Owner

mattn commented Jul 10, 2017

Why you use gcc command from UNIX like shell? Try to do with command prompt.

@Jason-Abbott
Copy link
Contributor

FWIW, I played with getting a build to work in the Win10 Unix tools but gave up after time wasted. Instead, I recorded these steps in my project README. They've worked several times.

  • Download and install tdm64-gcc-5.1.0-2.exe from http://tdm-gcc.tdragon.net/download.
  • Go to Program Files and click on "MinGW Command Prompt". This will open a console with the correct environment for using MinGW with GCC.
  • Within this console, navigate to your GOPATH.
  • Enter the following commands:
go get -u github.com/mattn/go-sqlite3
go install github.com/mattn/go-sqlite3

@mattn
Copy link
Owner

mattn commented Jul 11, 2017

Yes, That's my expected.

@student020341
Copy link
Author

I have 4 things to try now the next moment I am at my work station, thank you both!

I thought the issue could be that gcc is in my user path but not my system path... but I will try all of these things.

Hey @Jason-Abbott , after I do go install, is there anything special I need to do to use the "installed" file? I thought I did go get & go install before, but it still told me it could not find gcc. Or is this perhaps a bug with liteide?

@Jason-Abbott
Copy link
Contributor

@student020341 I didn't have to do anything additional. It's in the path after installation so everything works as expected after that. I switch between Win10 and OSX once or twice a day (laptop/desktop) and the steps above have kept it seamless.

@gosp
Copy link

gosp commented Jul 21, 2017

Hello, @student020341
It is better to install mingw using msys2
It supports msys2 is installed in D:\Tools\msys64\

  • perform pacman -S mingw-w64-x86_64-gcc in msys2_shell after installing msys2
  • perform pacman -S mingw-w64-x86_64-sqlite3 to install sqlite3 native library
  • add D:\Tools\msys64\mingw64\bin to PATH environment

@student020341
Copy link
Author

Realized I never updated this, my apologies everyone!

After putting the path in the system variables, go under the hood was able to build this properly with gcc! 👍

gjrtimmer added a commit to gjrtimmer/go-sqlite3 that referenced this issue May 26, 2018
Compile Section Closes mattn#175
Compile Section Closes mattn#201
Compile Section Closes mattn#206
Compile Section Closes mattn#404
Compile Section Closes mattn#217
Compile Section Closes mattn#224
Compile Section Closes mattn#234
Compile Section Closes mattn#242
Feature table Closes mattn#255
Description Section Closes mattn#232
Golang:1.6 not supported Closes mattn#272
Golang:1.5 not supported + compilation section Closes mattn#283
usleep Implemented Closes mattn#285
FAQ Section Closes mattn#289
Compile Section closes mattn#295
FAQ Section Closes mattn#305
PR339 Closes mattn#318 mattn#321
Compilation Section Closes mattn#341
PR407 Closes mattn#364
Feature `sqlite_vtable` Closes mattn#393
Compile Section Closes mattn#416
sqlite_trace feature Closes mattn#433
Compilation Section Closes mattn#435
Compilation Section Closes mattn#443
Golang:1.6 Not Supported Closes mattn#445
Compilation Section Closes mattn#451
Compilation Section Closes mattn#467
Compilation Section Closes mattn#491
Compilation Section Closes mattn#495
Compilation Section Closes mattn#505
Compilation Section Closes mattn#557
Compilation Section Closes mattn#560
@mattn mattn closed this as completed in c9394b1 May 27, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants