-
Notifications
You must be signed in to change notification settings - Fork 558
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
add recipe for EGL #3192
base: master
Are you sure you want to change the base?
add recipe for EGL #3192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unfortunate that Libglvnd
provides a library with the same name. This will likely cause a warning if a user loads both packages
E/EGL/build_tarballs.jl
Outdated
cd build | ||
apk add py3-mako meson wayland-dev | ||
|
||
# pkgconfig returns the wrong path here. It's an ugly hack, but it works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a look about what is going on there, but in any case you must delete this link at the end, otherwise it'll end up inside the tarball
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right! I forgot.
E/EGL/build_tarballs.jl
Outdated
|
||
# Bash recipe for building across all platforms | ||
script = raw""" | ||
mkdir build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The automatic installation of the license looks for files with reasonable names in the only directory inside /workspace/srcdir
. If there are more than one directory here, this will fail. So it's better to enter the mesa directory and create the build folder inside it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will change that
Will it just cause a warning or could it also lead to the wrong library being used? Any idea what this means?
|
Whatever happens when two packages export the same variable. Warning + you must qualify the variable with its module? |
Ah, I thought it was something specific to BB. I don't think it should matter too much then, since I think this warning is only shown in interactive usage, not when it's done in a package. Packages only need to remember to qualify the module. |
Now that I think of it, you can't dlopen two libraries with the same soname, the first one will win |
E/EGL/build_tarballs.jl
Outdated
# `julia build_tarballs.jl --help` to see a usage message. | ||
using BinaryBuilder, Pkg | ||
|
||
name = "EGL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called EGL and not Mesa, which we have already, but only for Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a bit confused about this as well TBH. I think the current MESA jll should definitely have a different name. I named this EGL, because that is what my goal of building was initially, but I will need GBM and GLESv2 as well, so I wasn't unhappy that they were built alongside as well. MESA does have additional components like OpenCL and some stuff relating to Xorg as well, which I don't build here, but naming this jll MESA
probably makes a lot more sense than the package we currently call MESA
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason we can't fold this into the existing Mesa_jll
? You should be able to enable multiple APIs in one build, and make the Unix-only options conditional on the OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that sounds like a good plan. I plan to pick this up eventually, but I am just a bit busy ATM. Feel free to take this over if you are interested in this though.
Would you be okay with merging a fixed-up version of this with a more obscure name for now? I think we can probably separate out some of the components into separate jlls, but I looked into it a bit and the interdependencies and dealing with the right driver components didn't seem very straightforward. |
For the name, yes, I don't think calling this Mesa is an option at all at this point, so we have to stick to something like this. I'm a bit worried about the clash with libglvnd, that's a real concern at runtime. Have you seen how Linux distributions go about this? Maybe the mark the two packages as conflicting? |
It looks like Debian declares |
Oh, no wait! I think |
Yes, that's what I was looking at now: they just split the libglvnd source into multiple binary packages. But as far as I can see the package you're building here isn't involved |
It appears that the package they build out of this source has |
|
Also, in Debian they build with glvnd=true (option in |
So the way that things work between Mesa and Libglvnd is the following:
Basically, if you're going to link Libglvnd into a process, then Mesa better have been built with |
Pinging @Wimmerer who's also interested in Mesa |
I think we should probably name this |
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Yeah, I double-checked locally that this doesn't make a difference |
I get different errors locally, relating to using an old version of Wayland_protocols_jll. I'll work on this locally and see how far I can get. |
Just a quick update: I've got a local build that works great with GLFW! I've been able to run a CImGui demo as well, proving that it actually works. I'm in the process of working out the last bug before pushing changes (which are somewhat extensive, but we also now enable a lot more mesa functionality). |
Patch meson's finding of wayland-scanner Patch mesa's loader to attempt relpath dlopen first Enable X11 support Build libGL.so
Not sure what's up with the Aside: Do we need/want this built on glibc? |
Alternatively: this is now building the full set of userspace graphics drivers. Do we instead want to move this to |
Would be nice at least. Not everyone's using Alpine you know... 😅
I don't really care either way. Perhaps @giordano has some thoughts? |
Oops, sorry, I had assumed this was to fix issues on musl-based distros! |
My initial motivation for this was actually because I had the silly idea to build a window manager entirely using BinaryBuilder... |
Awesome! @giordano I'm 👍 to merging this. I can send another PR for the augmented platform support for supporting multiple LLVM versions. |
M/Mesa_EGL/build_tarballs.jl
Outdated
|
||
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
BuildDependency("Wayland_jll"), # FIXME: HostBuildDependency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the FIXME refer to?
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
# TODO: symbol mangling | ||
|
||
if with_platform_wayland | ||
- dep_wl_scanner = dependency('wayland-scanner', native: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, why is this patch necessary? If they need a native wayland-scanner
isn't the solution to add HostBuildDependency("Wayland_jll")
? We do that already in
Yggdrasil/G/GTK3/build_tarballs.jl
Lines 76 to 77 in 061fca6
# Need a host Wayland for wayland-scanner | |
HostBuildDependency("Wayland_jll"; platforms=linux), |
Yggdrasil/G/GTK4/build_tarballs.jl
Lines 94 to 95 in 7b2b452
# Need a host Wayland for wayland-scanner | |
HostBuildDependency("Wayland_jll"; platforms=x11_platforms), |
HostBuildDependency("Wayland_jll"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the FIXME were there because meson had problems with choosing to use the provided wayland-scanner
from HostBuildDependency("Wayland_jll")
; I don't remember the error, but it was cryptic and unhelpful 😄 I've reverted that change, and am trying to figure out the build failure.
@jpsamaroo bump 🙂 There are a couple of questions above |
How do we deal with pkg-config files for |
If the problem is that
|
@giordano would appreciate any advice on the current failure. |
You have |
# Dependencies that must be installed before this package can be built | ||
dependencies = [ | ||
HostBuildDependency("Wayland_jll"), | ||
Dependency("libLLVM_jll"; compat="11.0.0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will work only in julia v1.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires LLVM >= 11 (and I tested successfully on LLVM 12). What's the compat notation for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, seeing that this links directly to libLLVM-11jl.so
I think the the LLVMExtra's approach is the way to go. I'm actually surprised it worked for you with other Julia versions with different LLVM 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, it didn't 😄 I had to switch which libLLVM I imported.
No description provided.