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

Include EGL #63

Closed
Closed

Conversation

TheDrawingCoder-Gamer
Copy link

Includes EGL as a dependency. Wayland needs this dependency to use LayerGLSkija.

@TheDrawingCoder-Gamer TheDrawingCoder-Gamer marked this pull request as draft December 6, 2023 23:47
@TheDrawingCoder-Gamer
Copy link
Author

converting to draft bc this is going to be more complex than anticipated

@tonsky
Copy link
Contributor

tonsky commented Dec 7, 2023

Ok let me know when it’s ready to merge

@TheDrawingCoder-Gamer
Copy link
Author

Ready to merge - much less complex than anticipated.

@TheDrawingCoder-Gamer TheDrawingCoder-Gamer marked this pull request as ready for review December 8, 2023 17:13
tonsky added a commit that referenced this pull request Dec 8, 2023
@tonsky
Copy link
Contributor

tonsky commented Dec 8, 2023

@TheDrawingCoder-Gamer
Copy link
Author

Bumping version, works on my machine. Maybe lack of dependencies?

@tonsky
Copy link
Contributor

tonsky commented Dec 8, 2023

Yeah, which ones?

@TheDrawingCoder-Gamer
Copy link
Author

Unsure, maybe EGL version is outdated? My local version is 1.1.0 (with an archlinux package version of 1.7.0 for libglvnd). If it were missing though, it shouldn't be able to build.

@TheDrawingCoder-Gamer
Copy link
Author

TheDrawingCoder-Gamer commented Dec 8, 2023

It looks like others have to pull in libEGL:
https://github.com/BlGene/egl_check/blob/master/.github/workflows/c-cpp.yml

(which makes sense - you already have to install mesa for normal gl)

@tonsky
Copy link
Contributor

tonsky commented Dec 11, 2023

What’s the name of the dependency? To add here

sudo apt-get update
sudo apt-get --quiet --yes install ninja-build libglu1-mesa-dev g\+\+-9-aarch64-linux-gnu
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --config gcc

@dzaima
Copy link
Contributor

dzaima commented Dec 11, 2023

libegl1-mesa libegl1-mesa-dev I think.

tonsky added a commit that referenced this pull request Dec 11, 2023
@tonsky
Copy link
Contributor

tonsky commented Dec 11, 2023

Still doesn’t work

Screenshot 2023-12-11 at 16 30 01

Screenshot 2023-12-11 at 16 29 42

@dzaima
Copy link
Contributor

dzaima commented Dec 11, 2023

dpkg-query -S /usr/lib/x86_64-linux-gnu/libEGL.so gives libegl-dev for me, so that maybe? Unsure though, weird that it compiles but then fails to run.

@tonsky
Copy link
Contributor

tonsky commented Dec 12, 2023

still no, same error

@TheDrawingCoder-Gamer
Copy link
Author

It's possible EGL is like GLX, although I had thought that it was more compatible. You may have to pull in stuff.

Maybe mesa-utils-extra?

this is why I don't like CI : (

@tonsky
Copy link
Contributor

tonsky commented Dec 13, 2023

this is why I don't like CI

Why? Because you have to spell out every dependency? What other way is there? Building it on your own computer?

@TheDrawingCoder-Gamer
Copy link
Author

it's a lot of trial and error for something that takes 30 minutes to run

@tonsky
Copy link
Contributor

tonsky commented Dec 14, 2023

I think you should be able to enable github actions in your fork and play with the dependency name there. The environment should be the same, sans secrets (these are only needed for publishing, so shouldn’t be a problem)

@TheDrawingCoder-Gamer
Copy link
Author

@TheDrawingCoder-Gamer
Copy link
Author

compare to my local build:

local ldd

	linux-vdso.so.1 (0x00007ffc459c8000)
	libEGL.so.1 => /usr/lib/libEGL.so.1 (0x00007f5240acd000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f52409ff000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f523f17a000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f523f12b000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f523ee00000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f523ed13000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f523f106000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f523eb31000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f5240b20000)
	libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x00007f523ea79000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f523f0ec000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f523f0d9000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f523f09f000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f523e96b000)
	libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f523f090000)
	libGLX.so.0 => /usr/lib/libGLX.so.0 (0x00007f523e939000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f523e90e000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f523e7c2000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f523e79f000)
	libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f523e77c000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f523e639000)
	libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f523e59e000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f523e573000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f52409f2000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f523f088000)

@TheDrawingCoder-Gamer
Copy link
Author

pacman -Qo /usr/lib/libEGL.so returns libglvnd - but I download libglvnd-dev : /.
is it possible that it never actually looks in /usr/lib? https://packages.ubuntu.com/focal/amd64/libegl-dev/filelist this is the file list of libegl-dev.... /usr/lib/x86_64-linux-gnu/libEGL.so.... this doesn't really make sense tho. No idea why it's pointing into /lib and not /usr/lib.

@TheDrawingCoder-Gamer
Copy link
Author

ld can still find libEGL, so it's defo installed. No idea why it's missing a link. Notably, I also have libEGL_mesa installed but this isn't required in any way. This SHOULD be working but for some reason it just... isn't? Again this is why I don't like CI, trial and error where each trial takes 5 minutes, instead of the 1 minute for local builds.

@TheDrawingCoder-Gamer
Copy link
Author

ldconfig says that yes, EGL is installed?

 	libEGL_mesa.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL_mesa.so.0
	libEGL.so.1 (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so.1
	libEGL.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libEGL.so

@TheDrawingCoder-Gamer
Copy link
Author

It also finds EGL while linking, but it finds it in /usr/lib/x86_64-linux-gnu/libEGL.so

No idea why ldd says it isn't linked. It SHOULD be linking.

also, I can't actually build locally without including <cstdint>. No idea what is different, I'm trying to install gcc-9 rn to try to use the correct gcc version.

@TheDrawingCoder-Gamer
Copy link
Author

!!!
You have to link it in earlier.

Look at changes to the FindSkia cmake file and CMakeLists file.

Works for me : )

@tonsky
Copy link
Contributor

tonsky commented Dec 16, 2023

Ok I published 0.116.2, let me know if it works for you and if it does, please close this PR

@TheDrawingCoder-Gamer
Copy link
Author

Yep, works locally. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants