All, I hope this question belongs here.
I am following a Blockgeeks tutorial, trying to set up my environment for Ethereum blockchain development. I have basically gotten to the final step, installing swarm, but I am receiving an error that seems to be related to the structure of a folder on github. How should I fix this?
Handy info:
-OS: Windows 10, running this project within cygwin with proper gcc dependencies installed
-Go version: 1.11.4
I have tried to find a solution for days now, but nothing I've found has worked. Any help is appreciated.
Basically, everyone says these steps work for them: https://swarm-guide.readthedocs.io/en/latest/installation.html#generic-linux
Maybe it's something with cygwin?
When I attempt this command: $ go install -v ./cmd/swarm
I expect it to install properly, but i get this error:
unexpected directory layout:
import path: github.com/naoina/toml
root: C:\cygwin64\home\di203179\go\src
dir: C:\cygwin64\home\di203179\go\src\github.com\ethereum\go-ethereum\vendor\github.com\naoina\toml
expand root: C:\cygwin64\home\di203179\go\src
expand dir: C:\cygwin64\home\di203179\go\src\github.com\ethereum\go-ethereum\vendor\github.com\naoina\toml
separator: \
Any help is appreciated.
Update:
I think I found the code that throws this error here: https://golang.org/src/cmd/go/internal/load/pkg.go
And here is the snippet:
// dirAndRoot returns the source directory and workspace root
// for the package p, guaranteeing that root is a path prefix of dir.
func dirAndRoot(p *Package) (dir, root string) {
dir = filepath.Clean(p.Dir)
root = filepath.Join(p.Root, "src")
if !str.HasFilePathPrefix(dir, root) || p.ImportPath != "command-line-arguments" && filepath.Join(root, p.ImportPath) != dir {
// Look for symlinks before reporting error.
dir = expandPath(dir)
root = expandPath(root)
}
if !str.HasFilePathPrefix(dir, root) || len(dir) <= len(root) || dir[len(root)] != filepath.Separator || p.ImportPath != "command-line-arguments" && !p.Internal.Local && filepath.Join(root, p.ImportPath) != dir {
base.Fatalf("unexpected directory layout:\n"+
" import path: %s\n"+
" root: %s\n"+
" dir: %s\n"+
" expand root: %s\n"+
" expand dir: %s\n"+
" separator: %s",
p.ImportPath,
filepath.Join(p.Root, "src"),
filepath.Clean(p.Dir),
root,
dir,
string(filepath.Separator))
}
return dir, root
}
It seems there are several path-related issues that could make a Go project throw this error. But I feel my path is correct, so I'm still at a loss...
Upddate 2:
I have confirmed that the first if-statement from that snippet is running, and the first three conditions of the second if statement resolve to false (meaning they are not the cause of the error), so that means the last condition that is composed of multiple AND statements must be returning true since the error is throwing. Still can't tell why, though. Thanks for any help.