Skip to content

Compile procedure? #270

@grioghar

Description

@grioghar

I apologize - this feels very basic, and yet I'm having zero luck.

Can someone help me understand what I'm not doing correctly here?

I'm feeling quite dense, like there's something terribly obvious I'm missing.

Can't build it as the command states regarding the RPI:

➜  code go get github.com/sselph/scraper
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

Tried go build <repo> to no luck:

➜  scraper git:(master) GOARM=7 GOARCH=arm GOOS=linux go build github.com/sselph/scraper
no required module provides package github.com/sselph/scraper: go.mod file not found in current directory or any parent directory; see 'go help modules'

So, tried to clone the source, then compile locally, and... nope:

➜ code git clone https://github.com/sselph/scraper
Cloning into 'scraper'...
remote: Enumerating objects: 2845, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 2845 (delta 1), reused 1 (delta 0), pack-reused 2838 (from 1)
Receiving objects: 100% (2845/2845), 8.54 MiB | 12.37 MiB/s, done.
Resolving deltas: 100% (1431/1431), done.
➜  code cd scraper
➜  scraper git:(master) LS
LICENSE			ds			mame-history		ovgdb-dl		scraper.go		scripts			testdata
README.md		gdb			mamedb			rename			scraper_pprof.go	shasum			vendor
adb			hash.csv		mix_experiment		rom			scraper_test.go		ss
➜  scraper git:(master) ls -la
total 9656
drwxr-xr-x@ 25 grio  staff      800 Feb  4 01:38 .
drwxr-xr-x  12 grio  staff      384 Feb  4 01:38 ..
drwxr-xr-x@ 12 grio  staff      384 Feb  4 01:38 .git
-rw-r--r--@  1 grio  staff      311 Feb  4 01:38 .gitignore
-rw-r--r--@  1 grio  staff      451 Feb  4 01:38 .travis.yml
-rw-r--r--@  1 grio  staff     1079 Feb  4 01:38 LICENSE
-rw-r--r--@  1 grio  staff     4710 Feb  4 01:38 README.md
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 adb
drwxr-xr-x@ 15 grio  staff      480 Feb  4 01:38 ds
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 gdb
-rw-r--r--@  1 grio  staff  4889965 Feb  4 01:38 hash.csv
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 mame-history
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 mamedb
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 mix_experiment
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 ovgdb-dl
drwxr-xr-x@  4 grio  staff      128 Feb  4 01:38 rename
drwxr-xr-x@  5 grio  staff      160 Feb  4 01:38 rom
-rw-r--r--@  1 grio  staff    22788 Feb  4 01:38 scraper.go
-rw-r--r--@  1 grio  staff      166 Feb  4 01:38 scraper_pprof.go
-rw-r--r--@  1 grio  staff      461 Feb  4 01:38 scraper_test.go
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 scripts
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 shasum
drwxr-xr-x@  5 grio  staff      160 Feb  4 01:38 ss
drwxr-xr-x@  3 grio  staff       96 Feb  4 01:38 testdata
drwxr-xr-x@  6 grio  staff      192 Feb  4 01:38 vendor
➜  scraper git:(master) go build
go: cannot find main module, but found .git/config in /Users/grio/code/scraper
	to create a module there, run:
	go mod init
➜  scraper git:(master) go mod init
go: cannot determine module path for source directory /Users/grio/code/scraper (outside GOPATH, module path must be specified)

Example usage:
	'go mod init example.com/m' to initialize a v0 or v1 module
	'go mod init example.com/m/v2' to initialize a v2 module

Run 'go help mod init' for more information.
➜  scraper git:(master) go mod init $ GOARM=7 GOARCH=arm GOOS=linux go build github.com/sselph/scraper
➜  scraper git:(master) GOARM=7 GOARCH=arm GOOS=linux go build -o .
go: cannot find main module, but found .git/config in /Users/grio/code/scraper
	to create a module there, run:
	go mod init
➜  scraper git:(master) GOARM=7 GOARCH=arm GOOS=linux go build scraper.go
scraper.go:20:2: no required module provides package github.com/mitchellh/go-homedir: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:21:2: no required module provides package github.com/sselph/scraper/ds: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:22:2: no required module provides package github.com/sselph/scraper/gdb: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:23:2: no required module provides package github.com/sselph/scraper/rom: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:26:2: no required module provides package github.com/sselph/scraper/rom/hash: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:24:2: no required module provides package github.com/sselph/scraper/ss: go.mod file not found in current directory or any parent directory; see 'go help modules'
➜  scraper git:(master) GOARM=7 GOARCH=arm GOOS=linux go build scraper.go -o scraper_arm7
named files must be .go files: -o
➜  scraper git:(master) GOARM=7 GOARCH=arm GOOS=linux go build -o scraper_arm7 scraper.go
scraper.go:20:2: no required module provides package github.com/mitchellh/go-homedir: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:21:2: no required module provides package github.com/sselph/scraper/ds: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:22:2: no required module provides package github.com/sselph/scraper/gdb: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:23:2: no required module provides package github.com/sselph/scraper/rom: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:26:2: no required module provides package github.com/sselph/scraper/rom/hash: go.mod file not found in current directory or any parent directory; see 'go help modules'
scraper.go:24:2: no required module provides package github.com/sselph/scraper/ss: go.mod file not found in current directory or any parent directory; see 'go help modules'
➜  scraper git:(master)

I appreciate any guidance on this.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions