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

Remove symbolic links when running generate-wayland-protocols.sh #315

Merged
merged 6 commits into from
Apr 10, 2021
Merged

Remove symbolic links when running generate-wayland-protocols.sh #315

merged 6 commits into from
Apr 10, 2021

Conversation

santiagocezar
Copy link
Contributor

According to golang/go#24057 (comment), Go modules do not support symbolic links.

It modifies the script so it removes the wayland-xdg-decoration-client-protocol.h link created by wayland-scanner when running generate-wayland-protocols.sh. It also regenerates the protocol files using the new script.

This pull request fixes #314.

This was generated on Fedora 34 using wayland-scanner 1.19.0.
It removes the wayland-xdg-decoration-client-protocol.h link too

Fixes #314
@pwaller
Copy link
Member

pwaller commented Apr 8, 2021

Thanks for looking into this and finding a fix.

It looks like something has gone a bit wrong though, please take a look at the travis log. If this goes green, it's an easy accept.

@santiagocezar
Copy link
Contributor Author

HEAD detached at FETCH_HEAD
Changes not staged for commit:
 (use "git add <file>..." to update what will be committed)
 (use "git restore <file>..." to discard changes in working directory)
  modified:   v3.2/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h
  modified:   v3.2/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h
  modified:   v3.2/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h
  modified:   v3.2/glfw/glfw/src/wayland-viewporter-client-protocol.h
  modified:   v3.2/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h
  modified:   v3.2/glfw/glfw/src/wayland-xdg-shell-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-idle-inhibit-unstable-v1-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-viewporter-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-xdg-decoration-client-protocol.h
  modified:   v3.3/glfw/glfw/src/wayland-xdg-shell-client-protocol.h
  modified:   v3.3/glfw/glfw_tree_rebuild.go

I can't reproduce this on my machine, looks like travis is using a version different to the one I have of the wayland tools, producing differences when generating the source files. Though I'm not sure how the glfw_tree_rebuild.go file gets modified.

I don't have an Ubuntu machine to test the build, so I don't know how to proceed.

@pwaller
Copy link
Member

pwaller commented Apr 9, 2021

Thanks for giving a good go at it.

I can't reproduce this on my machine, looks like travis is using a version different to the one I have of the wayland tools, producing differences when generating the source files.

Ah, this is unfortunate. Of course, if you don't have the same version of the wayland tools you won't necessarily end up with the same headers. I do not know if this is a significant problem or not. Looking at the diff in the build, it seems it is OK, the only difference being some #ifdef include guards which have been introduced on Ubuntu but not your system.

Though I'm not sure how the glfw_tree_rebuild.go file gets modified.

This is modified by 'go generate' (run in CI) and represents a hash of the sources, so if there is a diff, the hash will be different.

It looks to me like you should be able to take the diff as it appears in travis and paste it into patch -p1 run from the root of the repository. That should bring your sources inline with what travis expects. Please can you have a go at this? If you get stuck I can do it for you - if you need that please allow edits from maintainers on your PR so I can verify travis is green before merging.

The purpose of this check in Travis here is to ensure that what's committed in the repo is consistent with a version running in CI, to make sure everything is consistent with being autogenerated (and that we don't accidentally diverge from upstream).

TravisCI has a different version of the wayland toolkit.
This makes the build fail when files are generated from another system.
@santiagocezar
Copy link
Contributor Author

Thank you so much! Your suggestion worked, I hope this can be merged now.

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

Successfully merging this pull request may close these issues.

Wayland build not working because of missing symbolic link
2 participants