Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Build/Install instructions cleanup #268

Closed
clach04 opened this issue Aug 16, 2020 · 5 comments
Closed

Build/Install instructions cleanup #268

clach04 opened this issue Aug 16, 2020 · 5 comments

Comments

@clach04
Copy link

clach04 commented Aug 16, 2020

I'd like to propose moving install instructions into the readme (from the wiki https://github.com/go-shiori/shiori/wiki/Installation). Any concerns with that? I can update the wiki instead but that won't go through a review (PR) process. This applies to both manual and Docker build

#264 shows an alternative technique.

From my notes https://github.com/clach04/shiori

Shiori can be built but not using the original wiki instructions to use go get ..., with go1.13.11 under Raspbian GNU/Linux 9 (stretch) get:

../golang/src/github.com/go-shiori/shiori/internal/cmd/root.go:93:32: too many arguments in call to gap.NewScope
        have (gap.ScopeType, string, string)
        want (gap.ScopeType, string)
../golang/src/github.com/go-shiori/shiori/internal/cmd/root.go:94:27: userScope.DataDir undefined (type *gap.Scope has no field or method DataDir)

Original wiki documents minimum version of Go 1.12. So unclear why go get ... fails, the alternative is to build from source (manually or with Docker).

See Dockerfile for deployment with Docker, image uses Alpine (which requires Alpine Go to build, Debian builds of Shiori do not work in Alpine, will see not found errors).

To build issue:

git clone https://github.com/go-shiori/shiori.git
cd shiori
go build  # NOTE this assumes GOPATH is set and go in the path, manual install of go described below

Quick setup of Go:

wget https://dl.google.com/go/go1.13.11.linux-armv6l.tar.gz
tar -ztvf go1.13.11.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf  go1.13.11.linux-armv6l.tar.gz
sudo apt-get remove golang-1.7
sudo apt autoremove

Then in .profile (etc.)

PATH=$PATH:/usr/local/go/bin
GOPATH=$HOME/golang
if [ ! -d "$GOPATH/src" ] ; then
    mkdir -p $GOPATH/src
fi

Later versions should work, #243 (comment) indicates go1.14.1 works

@deanishe
Copy link
Contributor

deanishe commented Aug 20, 2020

Thanks for helping out.

Any concerns with that? I can update the wiki instead but that won't go through a review (PR) process.

I think updating the wiki is fine for now. Changes can always be rolled back. I'll probably move most of the wiki contents to the docs/ folder at some point.

Quick setup of Go

Please don't add instructions for installing Go. Perhaps add a link to Go's own docs? I'd prefer to keep the docs (and especially the questions people ask) Shiori-specific.

Original wiki documents minimum version of Go 1.12. So unclear why go get ... fails, the alternative is to build from source (manually or with Docker).

Go modules make go get fail or succeed depending on where you run the command from. From the error, it's downloading the wrong version of some dependency, so you likely need to use GO111MODULE=on go get ... to get it to work.

@constraintAutomaton
Copy link

I'm still getting the error when I'm building using GO111MODULE=on go get -u -v github.com/go-shiori/shiori

internal/cmd/root.go:93:32: too many arguments in call to gap.NewScope
	have (gap.ScopeType, string, string)
	want (gap.ScopeType, string)
internal/cmd/root.go:94:27: userScope.DataDir undefined (type *gap.Scope has no field or method DataDir)

@clach04
Copy link
Author

clach04 commented Apr 23, 2021

@constraintAutomaton what version of go is the build failing with?

I've seen a number of build failures (on the SBCs I use) when the go version was below version go1.14.1 (EDIT, as per my original note, version 1.13.11 worked for me at one point, but I did not document the Shiori version that was true for!).

I just checked and https://github.com/go-shiori/shiori/wiki/Installation still mentions 1.12 so I'm about to go update that :)

@constraintAutomaton
Copy link

constraintAutomaton commented Apr 25, 2021

I'm using go version go1.13.8 linux/amd64. I finally used a release version of the software instead of cloning the master.

@fmartingr
Copy link
Member

Thanks for raising this, it's on my mind as well. I've opened #336 to discuss moving documentation directly into the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants