-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When building lxd.spec with release 3.6 or later, the go test of github.com/lxc/lxd/shared/generate/db aborts with:
+ go test -buildmode pie -compiler gc -v -tags libsqlite3 -ldflags ' -extldflags '\''-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\''' github.com/lxc/lxd/shared/generate/db
=== RUN TestPackages
--- FAIL: TestPackages (0.00s)
parse_test.go:25:
Error Trace: parse_test.go:25
Error: Expected value not to be nil.
Test: TestPackages
=== RUN TestParse
--- PASS: TestParse (0.00s)
FAIL
FAIL github.com/lxc/lxd/shared/generate/db 0.008s
Error happens on Fedora 28 (golang-1.10.5-1.fc28.x86_64) and CentOS 7 (golang-1.11.2-3.el7.x86_64). Issue originally mentioned in #11 (comment)
When running the test against the release tarball with manually compiled bundled libraries, the error cannot be reproduced:
[vagrant@localhost ~]$ export GOPATH=/home/vagrant/lxd-3.8/dist
[vagrant@localhost ~]$ export CGO_CFLAGS="-I/home/vagrant/lxd-3.8/dist/sqlite/ -I/home/vagrant/lxd-3.8/dist/dqlite/include/"
[vagrant@localhost ~]$ export CGO_LDFLAGS="-L/home/vagrant/lxd-3.8/dist/sqlite/.libs/ -L/home/vagrant/lxd-3.8/dist/dqlite/.libs/"
[vagrant@localhost ~]$ export LD_LIBRARY_PATH="/home/vagrant/lxd-3.8/dist/sqlite/.libs/:/home/vagrant/lxd-3.8/dist/dqlite/.libs/"
[vagrant@localhost ~]$ go test -v github.com/lxc/lxd/shared/generate/db
=== RUN TestPackages
--- PASS: TestPackages (0.04s)
=== RUN TestParse
--- PASS: TestParse (0.00s)
PASS
ok github.com/lxc/lxd/shared/generate/db 0.060s
Metadata
Metadata
Assignees
Labels
No labels