How to compile it?


#1

Hello. I recently download snapcraft 3.4 to compile it from the source with the purpose of being able to run snap applications. However there is no README or INSTALL file with the instructions. There is also no configure, autogen.sh or nothing similar. So I ask: Where are the installation instructions (hopefully with a list of dependencies) ? Thanks for the support.


#2

Hello.

If you’re looking for the software to enable snap applications you should be looking for Snapd. Snapcraft is a tool for building snap packages, not running them.

Installing snapd - Documentation for snaps: Universal Linux packages

The proper way to install Snapd is to install it via your distro’s software archive, if your distro doesn’t ship one there’s a chance that your distro doesn’t support Snap apps in the first place. Building from source is also possible, refer snapd/HACKING.md at master · snapcore/snapd for more details.


#3

@Lin-Buo-Ren is probably correct.

On the off-chance that you actually wanted to run snapcraft itself from source, instructions are in the HACKING.md file.


#4

I tried this: " ./go get -d -v github.com/snapcore/snapd/…
githubcom/snapcore/snapd (download)

cd .; git clone http//githubcom/snapcore/snapd /home/leopoldo/go/src/githubcom/snapcore/snapd

error: gnutls_handshake() failed: A TLS fatal alert has been received. while accessing http//githubcom/snapcore/snapd/info/refs

fatal: HTTP request failed
package githubcom/snapcore/snapd/…: exit status 128 "

P.S: I did small editions the in the messages as to avoid the two link by post limitation.

Anyway, how can I solve the above issue? Thanks for the input.


#5

For building and hacking on snapd, give HACKING.md a read. (I’m assuming you’re doing this already).

For posting the output of commands (especially when they include links that aren’t really links), tell the editor it’s “preformatted text” (the </> button in the editor).

Just in case, I tested the bit of snapd’s HACKING.md I think you’re at, and it should look like this:

$ GOPATH=/tmp/ggg/ GOBIN="" go get -d -v github.com/snapcore/snapd/...
github.com/snapcore/snapd (download)
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/debian
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/amzn-2
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/centos-7
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-25
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-26
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-27
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-28
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-29
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-rawhide
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-15.0
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.1
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.2
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.3
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-tumbleweed
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-14.04/source
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-16.10
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-17.04
github.com/snapcore/bolt (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
Fetching https://gopkg.in/tomb.v2?go-get=1
Parsing meta tags from https://gopkg.in/tomb.v2?go-get=1 (status code 200)
get "gopkg.in/tomb.v2": found meta tag get.metaImport{Prefix:"gopkg.in/tomb.v2", VCS:"git", RepoRoot:"https://gopkg.in/tomb.v2"} at https://gopkg.in/tomb.v2?go-get=1
gopkg.in/tomb.v2 (download)
Fetching https://golang.org/x/crypto/openpgp/packet?go-get=1
Parsing meta tags from https://golang.org/x/crypto/openpgp/packet?go-get=1 (status code 200)
get "golang.org/x/crypto/openpgp/packet": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/openpgp/packet?go-get=1
get "golang.org/x/crypto/openpgp/packet": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
Fetching https://golang.org/x/crypto/sha3?go-get=1
Parsing meta tags from https://golang.org/x/crypto/sha3?go-get=1 (status code 200)
get "golang.org/x/crypto/sha3": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/sha3?go-get=1
get "golang.org/x/crypto/sha3": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto/openpgp/armor?go-get=1
Parsing meta tags from https://golang.org/x/crypto/openpgp/armor?go-get=1 (status code 200)
get "golang.org/x/crypto/openpgp/armor": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/openpgp/armor?go-get=1
get "golang.org/x/crypto/openpgp/armor": verifying non-authoritative meta tag
github.com/ojii/gettext.go (download)
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/snapcore/squashfuse (download)
github.com/godbus/dbus (download)
github.com/jessevdk/go-flags (download)
Fetching https://gopkg.in/retry.v1?go-get=1
Parsing meta tags from https://gopkg.in/retry.v1?go-get=1 (status code 200)
get "gopkg.in/retry.v1": found meta tag get.metaImport{Prefix:"gopkg.in/retry.v1", VCS:"git", RepoRoot:"https://gopkg.in/retry.v1"} at https://gopkg.in/retry.v1?go-get=1
gopkg.in/retry.v1 (download)
github.com/mvo5/goconfigparser (download)
Fetching https://gopkg.in/macaroon.v1?go-get=1
Parsing meta tags from https://gopkg.in/macaroon.v1?go-get=1 (status code 200)
get "gopkg.in/macaroon.v1": found meta tag get.metaImport{Prefix:"gopkg.in/macaroon.v1", VCS:"git", RepoRoot:"https://gopkg.in/macaroon.v1"} at https://gopkg.in/macaroon.v1?go-get=1
gopkg.in/macaroon.v1 (download)
github.com/juju/ratelimit (download)
Fetching https://gopkg.in/mgo.v2/bson?go-get=1
Parsing meta tags from https://gopkg.in/mgo.v2/bson?go-get=1 (status code 200)
get "gopkg.in/mgo.v2/bson": found meta tag get.metaImport{Prefix:"gopkg.in/mgo.v2", VCS:"git", RepoRoot:"https://gopkg.in/mgo.v2"} at https://gopkg.in/mgo.v2/bson?go-get=1
get "gopkg.in/mgo.v2/bson": verifying non-authoritative meta tag
Fetching https://gopkg.in/mgo.v2?go-get=1
Parsing meta tags from https://gopkg.in/mgo.v2?go-get=1 (status code 200)
gopkg.in/mgo.v2 (download)
github.com/mvo5/libseccomp-golang (download)
github.com/coreos/go-systemd (download)
github.com/gorilla/mux (download)
Fetching https://gopkg.in/check.v1?go-get=1
Parsing meta tags from https://gopkg.in/check.v1?go-get=1 (status code 200)
get "gopkg.in/check.v1": found meta tag get.metaImport{Prefix:"gopkg.in/check.v1", VCS:"git", RepoRoot:"https://gopkg.in/check.v1"} at https://gopkg.in/check.v1?go-get=1
gopkg.in/check.v1 (download)
github.com/kr/pretty (download)
github.com/kr/text (download)
Fetching https://gopkg.in/tylerb/graceful.v1?go-get=1
Parsing meta tags from https://gopkg.in/tylerb/graceful.v1?go-get=1 (status code 200)
get "gopkg.in/tylerb/graceful.v1": found meta tag get.metaImport{Prefix:"gopkg.in/tylerb/graceful.v1", VCS:"git", RepoRoot:"https://gopkg.in/tylerb/graceful.v1"} at https://gopkg.in/tylerb/graceful.v1?go-get=1
gopkg.in/tylerb/graceful.v1 (download)
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/debian
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/amzn-2
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/centos-7
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-25
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-26
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-27
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-28
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-29
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/fedora-rawhide
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-15.0
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.1
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.2
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-42.3
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/opensuse-tumbleweed
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-14.04/source
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-16.10
warning: ignoring symlink /tmp/ggg/src/github.com/snapcore/snapd/packaging/ubuntu-17.04

(the GOPATH= and GOBIN= is to override my environment which is set up to point at places that already have snapd :slight_smile: )

Good luck!


#6

If I repeat you three commands GOPATH=/tmp/ggg/ GOBIN="" go get -d -v github.com/snapcore/snapd/... I receive the same error as above.

If I enter the three commands mentioned before in the link:
export GOPATH=${HOME}/work mkdir $GOPATH

PATH="$PATH:$GOPATH/bin"

the same error message persists. What can I do now? Thanks for the help so far


#7

your network seems to be at fault, here. Maybe you’re behind some kind of proxy?

What happens if you try

git clone -v https://github.com/snapcore/snapd

?


#8

Hi Chipaca. This happens:

Initialized empty Git repository in /home/leopoldo/snapd/.git/
error: gnutls_handshake() failed: A TLS fatal alert has been received.  while accessing https://github.com/snapcore/snapd/info/refs

fatal: HTTP request failed

#9

so… are you going to tell me why that might be happening, or are you going to leave me to guess?


#10

That’s definitely a networking problem at your end, contact your internet service provider for assistance.