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

go get failed on Wayland system #9

Open
michal-halenka-datasentics opened this issue Mar 5, 2020 · 7 comments
Open

go get failed on Wayland system #9

michal-halenka-datasentics opened this issue Mar 5, 2020 · 7 comments

Comments

@michal-halenka-datasentics

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
@esimov
Copy link
Owner

esimov commented Mar 5, 2020

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 #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.

@esimov
Copy link
Owner

esimov commented Mar 5, 2020

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

@HalisCz
Copy link

HalisCz commented Mar 5, 2020

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

@esimov
Copy link
Owner

esimov commented Mar 5, 2020

Try this one: GO111MODULE=off go get github.com/esimov/diagram. The -mod vendor directive is used only on builds.

@michal-halenka-datasentics
Copy link
Author

I've tried. Nothing changed on the output.

@esimov
Copy link
Owner

esimov commented Mar 7, 2020

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?

@michal-halenka-datasentics
Copy link
Author

Not even. The error is still the same.

@setop setop mentioned this issue Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants