google / wuffs

Wrangling Untrusted File Formats Safely
Other
4.07k stars 129 forks source link

Explain what the Wuffs root directory is #35

Closed xobs closed 3 years ago

xobs commented 3 years ago

The benchmark page seems to say that Wuffs benchmarks can be run by running "wuffs bench". However, this simply results in it saying that it can not find the Wuffs root directory. This happens even when running it from the repo where there is a directory called wuffs-root-directory.txt:

xobs@nas ~/C/wuffs> wuffs bench
could not find Wuffs root directory
xobs@nas ~/C/wuffs> ls -l
total 68
-rw-------.  1 xobs xobs   647 Sep  2 14:31 AUTHORS
-rwx------.  1 xobs xobs  3463 Sep  2 14:31 build-all.sh*
-rwx------.  1 xobs xobs  2076 Sep  2 14:31 build-example.sh*
-rwx------.  1 xobs xobs  1123 Sep  2 14:31 build-fuzz.sh*
drwx------.  8 xobs xobs   102 Sep  2 14:31 cmd/
-rw-------.  1 xobs xobs   709 Sep  2 14:31 CONTRIBUTING.md
-rw-------.  1 xobs xobs  1716 Sep  2 14:31 CONTRIBUTORS
drwx------.  5 xobs xobs  4096 Sep  2 14:31 doc/
drwx------. 12 xobs xobs   199 Sep  2 14:31 example/
drwx------.  3 xobs xobs    15 Sep  2 14:31 fuzz/
-rw-------.  1 xobs xobs   235 Sep  2 14:31 go.mod
-rw-------.  1 xobs xobs   675 Sep  2 14:31 go.sum
drwx------.  2 xobs xobs    90 Sep  2 14:31 hello-wuffs-c/
drwx------.  4 xobs xobs    50 Sep  2 14:31 internal/
drwx------. 10 xobs xobs   135 Sep  2 14:31 lang/
drwx------. 17 xobs xobs   252 Sep  2 14:31 lib/
-rw-------.  1 xobs xobs 10174 Sep  2 14:31 LICENSE
-rw-------.  1 xobs xobs  9557 Sep  2 14:31 README.md
drwx------.  3 xobs xobs    15 Sep  2 14:31 release/
drwx------.  7 xobs xobs  4096 Sep  2 14:36 script/
drwx------. 13 xobs xobs   142 Sep  2 14:31 std/
drwx------.  4 xobs xobs    27 Sep  2 14:31 test/
-rw-------.  1 xobs xobs   151 Sep  2 14:31 wuffs-root-directory.txt
xobs@nas ~/C/wuffs> wuffs bench
could not find Wuffs root directory
xobs@nas ~/C/wuffs> more wuffs-root-directory.txt
This placeholder file indicates the root of the Wuffs repository.

For example, filenames like "test/data/pi.txt" are relative to this root
directory.
xobs@nas ~/C/wuffs> wuffs bench
could not find Wuffs root directory
xobs@nas ~/C/wuffs>
nigeltao commented 3 years ago

Sorry about that.

What does go env and go version say for you?

xobs commented 3 years ago
xobs@nas ~/C/wuffs> go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/xobs/.cache/go-build"
GOENV="/home/xobs/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/xobs/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/xobs/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/xobs/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/xobs/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/xobs/Code/wuffs/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build279270757=/tmp/go-build -gno-record-gcc-switches"
xobs@nas ~/C/wuffs> go version
go version go1.15.1 linux/amd64
xobs@nas ~/C/wuffs>

I just installed go today by downloading it from https://golang.org/dl/, extracting it, and adding it to my PATH.

nigeltao commented 3 years ago

Might be fixed now. Please try again.

xobs commented 3 years ago

Yes, that does fix the issue. Thank you!