I am building Ethereum from sources (because I need to feed sources into debugger, to trace how it works) and I have an error during build:
[niko@localhost sources]$ go run github.com/ethereum/go-ethereum/cmd/geth/main.go ---verbosity 5 --ipcdisable --port 40401 --rpc --rpcport 9101 --pprof --datadir=/home/niko/saved-niko-home/myeth/ --networkid=15 console
# command-line-arguments
github.com/ethereum/go-ethereum/cmd/geth/main.go:115: undefined: configFileFlag
github.com/ethereum/go-ethereum/cmd/geth/main.go:146: undefined: initCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:147: undefined: importCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:148: undefined: exportCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:149: undefined: removedbCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:150: undefined: dumpCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:152: undefined: monitorCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:154: undefined: accountCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:155: undefined: walletCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:157: undefined: consoleCommand
github.com/ethereum/go-ethereum/cmd/geth/main.go:157: too many errors
[niko@localhost sources]$
All the undefined symbols are contained in these files:
[niko@localhost sources]$ ls -l github.com/ethereum/go-ethereum/cmd/geth/config.go github.com/ethereum/go-ethereum/cmd/geth/chaincmd.go github.com/ethereum/go-ethereum/cmd/geth/monitorcmd.go github.com/ethereum/go-ethereum/cmd/geth/accountcmd.go
-rw-rw-r--. 1 niko niko 11843 Sep 12 09:10 github.com/ethereum/go-ethereum/cmd/geth/accountcmd.go
-rw-rw-r--. 1 niko niko 10036 Sep 12 09:10 github.com/ethereum/go-ethereum/cmd/geth/chaincmd.go
-rw-rw-r--. 1 niko niko 5881 Sep 12 09:10 github.com/ethereum/go-ethereum/cmd/geth/config.go
-rw-rw-r--. 1 niko niko 11362 Sep 12 09:10 github.com/ethereum/go-ethereum/cmd/geth/monitorcmd.go
[niko@localhost sources]$
However, if I add these files to the command line, I will get another error (symbols get duplicated), which I submitted in another question: can not use function as type in Go
So, somehow, with automatic build process Ethereum is compiled to include these variables (configFileFlag,initCommand, etc) but when I am trying to do it manually I am missing some stuff. But which stuff?