diagram
diagram copied to clipboard
go get failed on Wayland system
Go get failed
$ go get github.com/esimov/diagram
# github.com/esimov/diagram/vendor/github.com/go-gl/glfw/v3.2/glfw
In file included from ./glfw/src/internal.h:169,
from ./glfw/src/context.c:28,
from ../go/src/github.com/esimov/diagram/vendor/github.com/go-gl/glfw/v3.2/glfw/c_glfw.go:4:
./glfw/src/x11_platform.h:39:10: fatal error: X11/Xcursor/Xcursor.h: No such file or directory
39 | #include <X11/Xcursor/Xcursor.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Go version
$ go version
go version go1.13.6 linux/amd64
System info
$ cat /etc/os-release
NAME=Fedora
VERSION="31 (Thirty One)"
ID=fedora
VERSION_ID=31
VERSION_CODENAME=""
PLATFORM_ID="platform:f31"
PRETTY_NAME="Fedora 31 (Thirty One)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:31"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f31/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=31
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=31
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
$ loginctl show-session 4 -p Type
Type=wayland
It's possible that the issue is related to the missing glfw library from your system. Can you check if glfw is installed on your system? If you can confirm that glfw is installed on your machine, then please check also this issue https://github.com/esimov/diagram/issues/7, though I think the two issues are not strictly related to each other.
Also it might be possible that the issue is related to wrong vendoring. Try to use the -mod vendor
directive. This command will instruct go mod
to use the main module's top-level vendor directory to satisfy dependencies. Check this thread: https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away.
If still not working i'll look into the issue more deeply.
Also you can try to get the module with this command:
GOFLAGS='' go get github.com/esimov/diagram
or
GO111MODULE=off go get github.com/esimov/diagram
Can you check if glfw is installed on your system?
It is installed
$ LANG=C dnfp glfw
Last metadata expiration check: 0:03:31 ago on Thu Mar 5 14:23:02 2020.
Installed Packages
Name : glfw
Epoch : 1
Version : 3.3.2
Release : 1.fc31
Architecture : x86_64
Size : 296 k
Source : glfw-3.3.2-1.fc31.src.rpm
Repository : @System
From repo : updates
Summary : A cross-platform multimedia library
URL : http://www.glfw.org/index.html
License : zlib
Description : GLFW is a free, Open Source, multi-platform library for OpenGL application
: development that provides a powerful API for handling operating system specific
: tasks such as opening an OpenGL window, reading keyboard, mouse, joystick and
: time input, creating threads, and more.
Try to use the -mod vendor directive.
It seems that go get
is not accepting this directive:
$ go get -mod=vendor github.com/esimov/diagram
build flag -mod=vendor only valid when using modules
Try this one: GO111MODULE=off go get github.com/esimov/diagram
. The -mod vendor
directive is used only on builds.
I've tried. Nothing changed on the output.
Not even with GOFLAGS='' go get github.com/esimov/diagram
? I'm afraid that go mod
is fetching a different version of glfw
then then one used in this library. That's the reason why you are getting the above error. Can you try with the above command?
Not even. The error is still the same.