You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it doesn't work if the c code is in another directory (outside or subdirectory).
The text was updated successfully, but these errors were encountered:
alexd765
changed the title
cmd/go: go install doesn't recognise changes in c code in different directories
cmd/go: go install doesn't recognize changes to c code in different directories
Apr 7, 2017
alexd765
changed the title
cmd/go: go install doesn't recognize changes to c code in different directories
cmd/go: go install doesn't recognize changes to c code in another directory
Apr 7, 2017
This is obviously a minimal example. I want to give a little bit more context how I ran into this:
We have a not-so-thin wrapper around a C library that is a mix of Go and C code that we install with go install (without the -v). When we make changes to go code and c code at the same time everything works.
When we made only changes to the C Code it was quite surprising that the new version didn't get installed.
The workaround is to force rebuilding with go install -a.
The Go command essentially requires that your C code be in the same directory as the Go package using it, not in a subdirectory or other directory. This is by design: package directories are meant to be completely self-contained, although obviously this is difficult/impossible to enforce in all cases.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +a8b2e4a Fri Mar 31 21:24:09 2017 +0000 linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
go install -v
program with c codego install -v
againIf possible, provide a recipe for reproducing the error.
on github
What did you expect to see?
change to x=2 in test/test.h
What did you see instead?
change to x=2 in test/test.h
The text was updated successfully, but these errors were encountered: