therecipe / qt

Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
GNU Lesser General Public License v3.0
10.5k stars 748 forks source link

/usr/bin/ld: cannot find -lGL #1260

Closed myInstagramAlternative closed 2 years ago

myInstagramAlternative commented 2 years ago

Hello guys,

Just to report, I wasn't been able to install QT bindings, looks like it fails on running tests step.

OS: Ubuntu 20.04.3 LTS ld version: GNU ld (GNU Binutils for Ubuntu) 2.34

❯ export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false
github.com/therecipe/qt (download)
github.com/therecipe/env_linux_amd64_513 (download)
github.com/sirupsen/logrus (download)
get "golang.org/x/sys/unix": found meta tag vcs.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at //golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
golang.org/x/sys (download)
get "golang.org/x/tools/imports": found meta tag vcs.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/imports?go-get=1
get "golang.org/x/tools/imports": verifying non-authoritative meta tag
golang.org/x/tools (download)
get "golang.org/x/mod/semver": found meta tag vcs.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at //golang.org/x/mod/semver?go-get=1
get "golang.org/x/mod/semver": verifying non-authoritative meta tag
golang.org/x/mod (download)
get "golang.org/x/mod/module": found meta tag vcs.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at //golang.org/x/mod/module?go-get=1
get "golang.org/x/mod/module": verifying non-authoritative meta tag
get "golang.org/x/xerrors": found meta tag vcs.metaImport{Prefix:"golang.org/x/xerrors", VCS:"git", RepoRoot:"https://go.googlesource.com/xerrors"} at //golang.org/x/xerrors?go-get=1
golang.org/x/xerrors (download)
github.com/therecipe/env_linux_amd64_513
github.com/therecipe/qt/internal/binding/files/docs/5.12.0
golang.org/x/xerrors/internal
golang.org/x/sys/internal/unsafeheader
github.com/therecipe/qt/internal/binding/files/docs/5.13.0
github.com/therecipe/qt/cmd/env
github.com/therecipe/qt/internal/binding/files/docs
golang.org/x/mod/semver
golang.org/x/sys/unix
golang.org/x/mod/internal/lazyregexp
golang.org/x/sys/execabs
golang.org/x/tools/internal/event/label
golang.org/x/xerrors
golang.org/x/tools/internal/fastwalk
golang.org/x/tools/internal/typeparams
golang.org/x/tools/internal/event/keys
golang.org/x/tools/internal/gopathwalk
golang.org/x/mod/module
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/internal/event/core
golang.org/x/tools/internal/event
golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/imports
github.com/sirupsen/logrus
github.com/therecipe/qt/internal/utils
golang.org/x/tools/imports
github.com/therecipe/qt/internal/cmd
github.com/therecipe/qt/internal/binding/parser
github.com/therecipe/qt/internal/binding/converter
github.com/therecipe/qt/internal/binding/templater
github.com/therecipe/qt/internal/cmd/moc
github.com/therecipe/qt/internal/cmd/rcc
github.com/therecipe/qt/cmd/qtmoc
github.com/therecipe/qt/internal/cmd/minimal
github.com/therecipe/qt/cmd/qtrcc
github.com/therecipe/qt/cmd/qtminimal
github.com/therecipe/qt/internal/cmd/deploy
github.com/therecipe/qt/cmd/qtdeploy
github.com/therecipe/qt/internal/cmd/setup
github.com/therecipe/qt/cmd/qtsetup
INFO[0000] running: 'qtsetup test linux' [docker=false] [vagrant=false] 
INFO[0000] testing showcases/wallet                     
ERRO[0050] failed to run command                         _func=RunCmd cmd="go build -p 8 -v -ldflags=all=\"-s\" \"-w\" -trimpath -o /home/fam/go/src/github.com/therecipe/qt/internal/examples/showcases/wallet/deploy/linux/wallet -tags=minimal" dir=/home/fam/go/src/github.com/therecipe/qt/internal/examples/showcases/wallet env="CGO_ENABLED=1 DESKTOP_SESSION=ubuntu GO111MODULE=off LC_NUMERIC=sr_RS QT_DIR=/home/fam/go/src/github.com/therecipe/env_linux_amd64_513 XDG_SESSION_TYPE=x11 TERM=xterm-256color INVOCATION_ID=444414d12f2744ed8e86bc9a0d3321eb SSH_AUTH_SOCK=/run/user/1000/keyring/ssh GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh LESS=-R DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path SHELL=/usr/bin/zsh GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 LC_MEASUREMENT=sr_RS APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=true GOPATH=/home/fam/go MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/126ac1f1_385a_49fe_831c_da13126a2d1c LC_TELEPHONE=sr_RS LC_TIME=sr_RS ZSH=/home/fam/.oh-my-zsh JOURNAL_STREAM=8:56394 SESSION_MANAGER=local/boi:@/tmp/.ICE-unix/2295,unix/boi:/tmp/.ICE-unix/2295 CHROME_DESKTOP=code-url-handler.desktop PATH=/usr/local/go/bin:/home/fam/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin GOARCH=amd64 MANAGERPID=2063 _=/home/fam/go/bin/qtsetup XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop STARSHIP_SHELL=zsh LSCOLORS=Gxfxcxdxbxegedabagacad LOGNAME=fam PWD=/home/fam/go/src/github.com/myInstagramAlternative/go-p2p-chat USER=fam LC_MONETARY=sr_RS COLORTERM=truecolor LC_NAME=sr_RS GDMSESSION=ubuntu VTE_VERSION=6003 OLDPWD=/home/fam/go/src/github.com/myInstagramAlternative/go-p2p-chat XDG_MENU_PREFIX=gnome- XDG_RUNTIME_DIR=/run/user/1000 XDG_CURRENT_DESKTOP=Unity ORIGINAL_XDG_CURRENT_DESKTOP=ubuntu:GNOME BREAKPAD_DUMP_LOCATION=/home/fam/.config/Code/exthost Crash Reports VSCODE_GIT_ASKPASS_EXTRA_ARGS=--ms-enable-electron-run-as-node DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus IM_CONFIG_PHASE=1 LANG=en_US.UTF-8 LC_IDENTIFICATION=sr_RS XDG_SESSION_DESKTOP=ubuntu STARSHIP_CONFIG=/home/fam/.starship/config.toml STARSHIP_SESSION_KEY=2487523393478815 TERM_PROGRAM=vscode VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-f12ccabfc8.sock VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js GOOS=linux SHLVL=2 HOME=/home/fam XDG_SESSION_CLASS=user LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: QT_IM_MODULE=ibus XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg CGO_LDFLAGS=-Wl,-rpath,$ORIGIN/lib -Wl,--disable-new-dtags GNOME_DESKTOP_SESSION_ID=this-is-deprecated WINDOWPATH=2 DISPLAY=:0 QT_ACCESSIBILITY=1 LC_PAPER=sr_RS VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code SSH_AGENT_PID=2251 PAGER=less XMODIFIERS=@im=ibus XAUTHORITY=/run/user/1000/gdm/Xauthority GDK_BACKEND=x11 TERM_PROGRAM_VERSION=1.63.2 GOROOT=/usr/local/go GNOME_SHELL_SESSION_MODE=ubuntu LC_ADDRESS=sr_RS GNOME_TERMINAL_SERVICE=:1.252 GTK_MODULES=gail:atk-bridge USERNAME=fam" error="exit status 2" name="build for linux on linux"
internal/unsafeheader
internal/race
runtime/internal/sys
math/bits
unicode/utf8
runtime/internal/atomic
internal/cpu
sync/atomic
unicode
runtime/cgo
runtime/internal/math
encoding
unicode/utf16
internal/bytealg
math
runtime
internal/reflectlite
sync
internal/testlog
math/rand
errors
sort
internal/oserror
path
io
strconv
syscall
strings
bytes
reflect
internal/syscall/execenv
internal/syscall/unix
time
github.com/therecipe/qt/internal/examples/showcases/wallet/dashboard
github.com/therecipe/qt/internal/examples/showcases/wallet/hosting
github.com/therecipe/qt/internal/examples/showcases/wallet/assets
context
io/fs
internal/poll
encoding/binary
internal/fmtsort
# github.com/therecipe/qt/internal/examples/showcases/wallet/dashboard
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/therecipe/qt/internal/examples/showcases/wallet/assets
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
# github.com/therecipe/qt/internal/examples/showcases/wallet/hosting
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
encoding/base64
os
path/filepath
fmt
os/exec
log
encoding/json
math/big
github.com/therecipe/qt
github.com/therecipe/qt/core
# github.com/therecipe/qt/core
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
angiglesias commented 2 years ago

Hello @myInstagramAlternative , sounds like your Ubuntu installation is missing OpenGL development libs. Try after installing the packet libgl-dev

myInstagramAlternative commented 2 years ago

Thank you @angiglesias for taking time to help me, tests and installation went w/o any error this time.

Happy holidays! Wish you a safe and prosperous 2022!