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

gollvm: #41880

advancedwebdeveloper opened this issue Oct 9, 2020 · 2 comments

gollvm: #41880

advancedwebdeveloper opened this issue Oct 9, 2020 · 2 comments


Copy link

@advancedwebdeveloper advancedwebdeveloper commented Oct 9, 2020

$ go version

go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

go env go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY=",direct" GOROOT="/home/oceanfish81/gollvm_dist" GOSUMDB="" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools" GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build938164654=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
$ go env

I was trying to build wl project, using my "release" build of gollvm.

~/golang_projects/wl/ui/examples/img$ go run image.go
/tmp/go-build853824791/b001/exe/image: symbol lookup error: /lib/ undefined symbol: main.main
exit status 127

~/golang_projects/wl/ui/examples/img$ file /lib/
/lib/ ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, with debug_info, not stripped

~/golang_projects/wl/ui/examples/img$ go run img.go


./img.go:39:14: error: reference to undefined name 'ImageFromFile'

Running a pre-compiled executable lad to this:

~/go/bin/img ~/go/src/
Connect to Wayland server failed dial unix /run/user/1000/wayland-0: connect: no such file or directory
. This is some sort of misconfiguration, on Ubuntu 20.04, related to Wayland.
I will try to resolve this, to ensure that there wouldn't be any other runtime issues.

CC @dkolbly @sternix
CC @thanm @cherrymui

Copy link

@ianlancetaylor ianlancetaylor commented Oct 9, 2020

I would not expect go run image.go to work, as the main function is in img.go.

Copy link

@ianlancetaylor ianlancetaylor commented Oct 13, 2020

Dup of #41881.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.