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: building dkolbly/wl package brought symbol lookup error: /lib/libgo.so.12git: undefined symbol: main.main #41881

Closed
advancedwebdeveloper opened this issue Oct 9, 2020 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@advancedwebdeveloper
Copy link

Hi.

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

$ 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="https://proxy.golang.org,direct"
GOROOT="/home/oceanfish81/gollvm_dist"
GOSUMDB="sum.golang.org"
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"

I got such errors:

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

$ file /lib/libgo.so.12git
/lib/libgo.so.12git: 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

command-line-arguments

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

This one seems to be related to Wayland itself - so I will try resolve that (manually):

$ ~/go/bin/img ~/go/src/github.com/dkolbly/wl/ui/examples/img/bsd_daemon.jpg
Connect to Wayland server failed dial unix /run/user/1000/wayland-0: connect: no such file or directory

CC @sternix @dkolbly
CC @thanm @cherrymui

@ianlancetaylor
Copy link
Contributor

Same as #41880. Which one do you want to keep?

@ianlancetaylor ianlancetaylor added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 9, 2020
@ianlancetaylor ianlancetaylor added this to the gollvm milestone Oct 9, 2020
@advancedwebdeveloper
Copy link
Author

Same as #41880. Which one do you want to keep?

Probably the second one.
Thanks, @ianlancetaylor

@ianlancetaylor
Copy link
Contributor

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

I don't think this is a bug at all.

@golang golang locked and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants