Open kevcrumb opened 1 year ago
thanks for the report. Yes the codebase is not "module" enabled as required by newer golang releases. You should be able to compile it by disabling modules as follows:
GO111MODULE=off go build ......
Will leave this open as a reminder to update the source with go.mod support.
The errors are now:
linux/csminer.go:9:2: cannot find package "github.com/cryptonote-social/csminer" in any of:
/usr/lib/go/src/github.com/cryptonote-social/csminer (from $GOROOT)
/home/k/go/src/github.com/cryptonote-social/csminer (from $GOPATH)
linux/csminer.go:10:2: cannot find package "github.com/cryptonote-social/csminer/crylog" in any of:
/usr/lib/go/src/github.com/cryptonote-social/csminer/crylog (from $GOROOT)
/home/k/go/src/github.com/cryptonote-social/csminer/crylog (from $GOPATH)
linux/csminer.go:11:2: cannot find package "github.com/godbus/dbus/v5" in any of:
/usr/lib/go/src/github.com/godbus/dbus/v5 (from $GOROOT)
/home/k/go/src/github.com/godbus/dbus/v5 (from $GOPATH)
None of the paths actually exist. I remember there was always some hassle about setting these env vars when compiling Go, but I've forgotten the specifics.
I found my notes with your(?) hints from back then:
You should have a directory named "src" where you will use git clone to check out csminer. Then set your GOPATH to the directory that contains the "src" directory. E.g. I have /home/cs/src where i run "git clone" from. Then my GOPATH is just /home/cs then I can cd /home/cs/src/github.com/cryptonote-social/csminer/linux go build -a csminer.go
It works:
cd /tmp
git clone https://github.com/cryptonote-social/RandomX.git &&
mkdir -p RandomX/build && cd RandomX/build/ &&
cmake .. && make && cd ../rxlib/ && ./make.sh && cd ../../
git clone https://github.com/cryptonote-social/csminer
cd csminer
GOPATH=${PWD%/*} go build linux/csminer.go
It turned out, that it was not the GOPATH
that made compilation successful, but apparently some other commands I had executed during trail-and-error.
Anyway, the necessary steps are documented in the updated package template file linked below and csminer
version 0.3.3 is now available in the Split Linux x86_64 repository.
Trying to update the csminer Split Linux package,
go build linux/csminer.go
results in these errors:Roughly two years ago, the instructions outlined in the following package template would result in a successful build, but now the
go get
commands seem to be outdated.https://gitlab.com/kevcrumb/split-packages/-/blob/31e905090be9ee2a9dd9ab88bc0b1c918718ae40/srcpkgs/csminer/template#L28