-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unable to run HelloWorld on Fedora 35 #34
Comments
Hey, glad to see you here, we never actually had aardvark running on Fedora yet, so some issues were to be expected sadly. The OpenGL problem looks pretty weird to me since the The vulkan problem could possibly be related to the use of a different UI framework but essentially we just use GLFWs functionality for vulkan interop. Could you share the log output prior to the error? Maybe I can install Fedora on one of my machines, but sadly I'm quite busy at the Moment. Maybe @hyazinthh has some more ideas what happens here, he always keeps things running on linux. |
strange, i have never seen glfw to fail except for headless scenarios. do vulkaninfo or glxinfo/glxgears work? |
Here is the (long) log output from running with the
I'm also running on X11 if that matters. |
The GL issue should be fixed now. |
Awesome! I looked into trying it, but I don't know |
We released new packages (5.2.8) which contain the fix, please let us know if this resolves the GL issue for you. |
I updated the packages with 0: initializing aardvark ....................................................
0: System Information:
0: System: Linux 5.18.13-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 22 14:20:24 UTC 2022
0: Processor: 8 core x64
0: Process: x64
0: Framework: .NET Core 3.1.27
0: Loading plugins ........................................................
0: WARNING: [LoadPlugins] could not load plugins: Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
0: Loading plugins ................................................ 0.050 s
0: initializing CustomPicklerProvider ............................. 0.678 s
0: initializing Constants ......................................... 0.014 s
0: initializing PixImageSharp ..................................... 0.042 s
0: initializing aardvark .................................... [0.60x] 2.791 s
0: OpenGL 4.6 working
0: initializing OpenGL runtime ..............................................
0: vendor: "Intel"
0: renderer: "Mesa Intel(R) Xe Graphics (TGL GT2)"
0: version: OpenGL 4.6.0 / GLSL 4.6.0 Core
0: initializing OpenGL runtime ...................................... 0.235 s
Unhandled exception. System.Exception: mprotect failed
at Aardvark.Base.ExecutableMemory.alloc(IntPtr size)
at Aardvark.Rendering.Management.MemoryManager`1..ctor(Memory`1 mem, IntPtr initialCapacity)
at Aardvark.Rendering.GL.ChangeableProgram.FragmentProgram..ctor()
at Aardvark.Rendering.GL.Command.arg20@1265-1(Command x, CompilerInfo info, AdaptiveToken token)
at Aardvark.Rendering.GL.Command.Command.Update(AdaptiveToken token, CompilerInfo info)
at Aardvark.Rendering.GL.RenderTasks.NewRenderTask.ProcessDeltas(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.GL.RenderTasks.AbstractOpenGlRenderTask.Perform(AdaptiveToken token, RenderToken renderToken, OutputDescription desc)
at <StartupCode$Aardvark-Rendering>[email protected](AdaptiveToken token)
at Aardvark.Rendering.AbstractRenderTask.UseValues[a](AdaptiveToken token, OutputDescription output, FSharpFunc`2 f)
at <StartupCode$Aardvark-Rendering>.$AbstractRenderTask.arg10@83-9(AbstractRenderTask x, RenderToken renderToken, OutputDescription out, AdaptiveToken token)
at <StartupCode$Aardvark-Rendering>.$AbstractRenderTask.action@1-47(AbstractRenderTask x, AdaptiveToken token, RenderToken renderToken, OutputDescription out, Unit _arg1)
at Aardvark.Rendering.AbstractRenderTask.Run(AdaptiveToken token, RenderToken renderToken, OutputDescription out)
at Aardvark.Rendering.AbstractRenderTask.Aardvark.Rendering.IRenderTask.Run(AdaptiveToken token, RenderToken renderToken, OutputDescription out)
at [email protected](RenderingLockDisposable _arg2)
at Microsoft.FSharp.Core.Operators.Using[T,TResult](T resource, FSharpFunc`2 action) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\prim-types.fs:line 4750
at Aardvark.Application.Slim.OpenGL.createSwapchain@206.Aardvark.Glfw.ISwapchain.Run(IRenderTask task, IQuery query)
at Aardvark.Glfw.Window.Redraw()
at Aardvark.Glfw.Application.Run(Window[] ws)
at Aardvark.Glfw.Window.Run()
at Aardvark.Glfw.Window.Aardvark.Application.IRenderWindow.Run()
at Aardvark.Application.Utilities.SimpleRenderWindow.Run(FSharpOption`1 preventDisposal)
at Program.main(String[] argv) |
Hey, we never tested it on a fedora, but I think we're not too far away from seeing something. You could for the moment try to use the vulkan backend since it doesn't need that particular feature. If you want to help us out you could try to run the tests/demo in https://github.com/aardvark-community/aardvark.assembler and see if those crash too |
Will do! I actually tried Vulkan too and it also crashed. But, figured it was easier to focus on one code path at a time. |
Maybe nothing, but the log says
and then it tries to load net5.0 assembly
Could this just be some package dependency/resolve problem? @tymokvo If you let paket resolve everything from scratch in your project, does this change anything? E.g.
|
... or, alternatively, is it possible to up upgrade your project to net6.0? |
I'll give it a go! |
I did a little research and it may be that fedora prohibts executable&writable memory. We've had a similar issue on Mac M1, so I 'll setup a VM and test that once I have the time. However if the Aardvark.Assembler demo/tests run without crashing my theory is wrong |
I ran the Running the demo (with 0: initializing aardvark ....................................................
0: System Information:
0: System: Linux 5.18.13-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 22 14:20:24 UTC 2022
0: Processor: 8 core x64
0: Process: x64
0: Framework: .NET 6.0.6
0: Loading plugins ................................................ 0.109 s
0: initializing CustomPicklerProvider ............................. 0.283 s
0: initializing Constants ......................................... 0.014 s
0: initializing aardvark .................................... [0.20x] 0.619 s
Unhandled exception. System.Exception: mprotect failed
at Aardvark.Base.ExecutableMemory.alloc(IntPtr size)
at <StartupCode$Aardvark-Assembler>[email protected](IntPtr size)
at Aardvark.Base.MemoryManager..ctor(IntPtr capacity, MemoryManagerConfig config)
at Aardvark.Assembler.FragmentProgram`1..ctor(Boolean differential, FSharpFunc`2 compile) |
Thanks for trying, so I guess I won't get around setting up a fedora VM to fix this. Thankfully it happens without any GPU involvement s.t. i don't need a native machine... I will pursue the issue when I have a little time left and will get back to you. (Might be a few days) The fix should be fairly easy if my suspicions are confirmed... |
Hey, I had a little time today and may have a potential fix. Please test! |
I tested it on my native Manjaro (Arch) machine and it worked, the old version crashed just like yours (however i had to upgrade the projects to net6.0) |
Awesome, will do! How do I upgrade them to net6.0? Just change the |
Awesome, the patch on I added the output here in case it is useful at all. It still has the warning about 0: initializing aardvark ....................................................
0: System Information:
0: System: Linux 5.18.13-100.fc35.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 22 14:20:24 UTC 2022
0: Processor: 8 core x64
0: Process: x64
0: Framework: .NET Core 3.1.27
0: Loading plugins ........................................................
0: WARNING: [LoadPlugins] could not load plugins: Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
0: Loading plugins ................................................ 0.046 s
0: initializing CustomPicklerProvider ............................. 0.628 s
0: initializing Constants ......................................... 0.014 s
0: initializing PixImageSharp ..................................... 0.043 s
0: initializing aardvark .................................... [0.69x] 3.108 s
0: OpenGL 4.6 working
0: initializing OpenGL runtime ..............................................
0: vendor: "Intel"
0: renderer: "Mesa Intel(R) Xe Graphics (TGL GT2)"
0: version: OpenGL 4.6.0 / GLSL 4.6.0 Core
0: initializing OpenGL runtime ...................................... 0.215 s
0: Compiling shader:
1: #version 460
2: #define __SHADER_STAGE__
3:
4:
5:
6:
7: layout(std140, binding = 0)
8: uniform PerLight
9: {
10: vec3 LightLocation;
11: };
12:
13: layout(std140, binding = 1)
14: uniform PerModel
15: {
16: mat4x4 ModelTrafo;
17: mat4x4 ModelTrafoInv;
18: };
19:
20: layout(std140, binding = 2)
21: uniform PerView
22: {
23: mat4x4 ViewProjTrafo;
24: };
25:
26:
27: #ifdef Vertex
28:
29: layout(location = 0) in vec4 Colors;
30: layout(location = 1) in vec3 Normals;
31: layout(location = 2) in vec4 Positions;
32: layout(location = 0) out vec4 fs_Colors;
33: layout(location = 1) out vec3 fs_Normals;
34: layout(location = 2) out vec4 fs_WorldPosition;
35: void main()
36: {
37: vec4 wp = (Positions * ModelTrafo);
38: fs_Colors = Colors;
39: fs_Normals = (ModelTrafoInv * vec4(Normals, 0.0)).xyz;
40: gl_Position = (wp * ViewProjTrafo);
41: fs_WorldPosition = wp;
42: }
43:
44: #endif
45:
46:
47:
48: #ifdef Fragment
49:
50: layout(location = 0) in vec4 fs_Colors;
51: layout(location = 1) in vec3 fs_Normals;
52: layout(location = 2) in vec4 fs_WorldPosition;
53: layout(location = 0) out vec4 ColorsOut;
54: void main()
55: {
56: ColorsOut = vec4((fs_Colors.xyz * abs(dot(normalize((LightLocation - fs_WorldPosition.xyz)), normalize(fs_Normals)))), fs_Colors.w);
57: }
58:
59: #endif
0: Compiling shader:
1: #version 460
2: #define __SHADER_STAGE__
3:
4:
5:
6:
7: layout(std140, binding = 0)
8: uniform Global
9: {
10: float DepthBias;
11: bool FillGlyphs;
12: };
13:
14: layout(std140, binding = 1)
15: uniform PerModel
16: {
17: mat4x4 ModelViewTrafo;
18: };
19:
20: layout(std140, binding = 2)
21: uniform PerView
22: {
23: mat4x4 ProjTrafo;
24: };
25:
26:
27: #ifdef Vertex
28:
29: layout(location = 0) in vec4 KLMKind;
30: layout(location = 1) in vec4 PathColor;
31: layout(location = 2) in vec4 Positions;
32: layout(location = 3) in vec4 ShapeTrafoR0;
33: layout(location = 4) in vec4 ShapeTrafoR1;
34: layout(location = 0) sample out vec4 fs_KLMKind;
35: layout(location = 1) out vec4 fs_PathColor;
36: void main()
37: {
38: vec4 p = vec4(0.0, 0.0, 0.0, 0.0);
39: vec2 pm = vec2(dot(ShapeTrafoR0.xyz, vec3(Positions.xy, 1.0)), dot(ShapeTrafoR1.xyz, vec3(Positions.xy, 1.0)));
40: if((ShapeTrafoR0.w < 0.0))
41: {
42: if(((((abs(ProjTrafo[3][0]) < 1E-05) && (abs(ProjTrafo[3][1]) < 1E-05)) && (abs(ProjTrafo[3][2]) < 1E-05)) ? (ModelViewTrafo[0][0] > 0.0) : (dot(vec3(ModelViewTrafo[0][3], ModelViewTrafo[1][3], ModelViewTrafo[2][3]), vec3(ModelViewTrafo[0][2], ModelViewTrafo[1][2], ModelViewTrafo[2][2])) < 0.0)))
43: {
44: p = (vec4(pm.x, pm.y, Positions.z, Positions.w) * ModelViewTrafo);
45: }
46: else
47: {
48: p = (vec4((-pm.x), pm.y, Positions.z, Positions.w) * ModelViewTrafo);
49: }
50: }
51: else
52: {
53: p = (vec4(pm.x, pm.y, Positions.z, Positions.w) * ModelViewTrafo);
54: }
55: vec4 PositionsC = (p * ProjTrafo);
56: fs_KLMKind = KLMKind;
57: fs_PathColor = PathColor;
58: gl_Position = (PositionsC - vec4(0.0, 0.0, (0.0 * DepthBias), 0.0));
59: }
60:
61: #endif
62:
63:
64:
65: #ifdef Fragment
66:
67: layout(location = 0) sample in vec4 fs_KLMKind;
68: layout(location = 1) in vec4 fs_PathColor;
69: layout(location = 0) out vec4 ColorsOut;
70: void main()
71: {
72: float kind = (fs_KLMKind.w + (0.001 * gl_SamplePosition.x));
73: vec4 color = fs_PathColor;
74: if(FillGlyphs)
75: {
76: if(((kind > 1.5) && (kind < 3.5)))
77: {
78: if(((((fs_KLMKind.xyz.x * fs_KLMKind.xyz.x) - fs_KLMKind.xyz.y) * fs_KLMKind.xyz.z) > 0.0))
79: {
80: discard;
81: }
82: }
83: else
84: {
85: if(((kind > 3.5) && (kind < 5.5)))
86: {
87: if((((((fs_KLMKind.xyz.x * fs_KLMKind.xyz.x) + (fs_KLMKind.xyz.y * fs_KLMKind.xyz.y)) - 1.0) * fs_KLMKind.xyz.z) > 0.0))
88: {
89: discard;
90: }
91: }
92: else
93: {
94: if((kind > 5.5))
95: {
96: if(((((fs_KLMKind.xyz.x * fs_KLMKind.xyz.x) * fs_KLMKind.xyz.x) - (fs_KLMKind.xyz.y * fs_KLMKind.xyz.z)) > 0.0))
97: {
98: discard;
99: }
100: }
101: }
102: }
103: }
104: else
105: {
106: if(((kind > 1.5) && (kind < 3.5)))
107: {
108: color = vec4(1.0, 0.0, 0.0, 1.0);
109: }
110: else
111: {
112: if(((kind > 3.5) && (kind < 5.5)))
113: {
114: color = vec4(0.0, 1.0, 0.0, 1.0);
115: }
116: else
117: {
118: if((kind > 5.5))
119: {
120: color = vec4(0.0, 0.0, 1.0, 1.0);
121: }
122: }
123: }
124: }
125: ColorsOut = color;
126: }
127:
128: #endif |
Glad to see something working. I just pushed updated project files (net6.0) with some minor fixes for linux (wrong file-paths, etc.) |
Nice, that is working well for GL. Vulkan is still an issue though. But the GL performance seems pretty great for the hardware I'm using so that's minor. 0: WARNING: [Vulkan] renderpass order BackToFront not implemented
0: [Vulkan] using 1 descriptor pools
0: ERROR: [Vulkan] could not allocate DescriptorSet (-1000069000)
Unhandled exception. System.Exception: [Vulkan] could not allocate DescriptorSet (-1000069000)
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1433.Invoke(String message) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1433
at Aardvark.Rendering.Vulkan.Utilities.check(String str, VkResult err)
at Aardvark.Rendering.Vulkan.DescriptorSetModule.f@41-148(DescriptorSetLayout layout, DescriptorPool pool, VkDescriptorSetAllocateInfo* pInfo, VkDescriptorSet* pHandle)
at Aardvark.Rendering.Vulkan.DescriptorSetModule.f@41-147(DescriptorSetLayout layout, DescriptorPool pool, VkDescriptorSetAllocateInfo* pInfo)
at Aardvark.Rendering.Vulkan.DescriptorSetModule.f@41-146(DescriptorSetLayout layout, DescriptorPool pool, VkDescriptorSetLayout* pLayoutHandle)
at Aardvark.Rendering.Vulkan.DescriptorSetModule.action@1-41(DescriptorSetLayout layout, DescriptorPool pool, Unit unitVar0)
at Aardvark.Rendering.Vulkan.DescriptorSetModule.tryAlloc(DescriptorSetLayout layout, DescriptorPool pool)
at <StartupCode$Aardvark-Rendering-Vulkan>[email protected](DescriptorSetLayout layout, DescriptorPool pool)
at <StartupCode$Aardvark-Rendering-Vulkan>.$DescriptorSet.action@1-38(DescriptorPoolBag x, FSharpFunc`2 tryAllocSet, DescriptorSetLayout layout, Unit unitVar0)
at Aardvark.Rendering.Vulkan.DescriptorPoolBag.CreateSet(DescriptorSetLayout layout, FSharpFunc`2 tryAllocSet)
at Aardvark.Rendering.Vulkan.ContextDescriptorSetExtensions.CreateDescriptorSet(Device this, DescriptorSetLayout layout)
at Aardvark.Rendering.Vulkan.Resources.DescriptorSetResource.GetHandle(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.AbstractResourceLocation`1.Update(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.AbstractResourceLocation`1.Aardvark.Rendering.Vulkan.IResourceLocation<'a>.Update(AdaptiveToken t, RenderToken rt)
at Aardvark.Rendering.Vulkan.Resources.DescriptorSetBindingResource.Compute(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.AbstractPointerResource`1.GetHandle(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.AbstractResourceLocation`1.Update(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.AbstractResourceLocation`1.Aardvark.Rendering.Vulkan.IResourceLocation.Update(AdaptiveToken t, RenderToken rt)
at <StartupCode$Aardvark-Rendering-Vulkan>.$ResourceManager.arg20@1974(ResourceLocationReader x, RenderToken renderToken, AdaptiveToken t)
at <StartupCode$Aardvark-Rendering-Vulkan>.$ResourceManager.arg10@1-1(ResourceLocationReader x, RenderToken renderToken, AdaptiveToken token)
at Aardvark.Rendering.Vulkan.ResourceLocationReader.Update(AdaptiveToken token, RenderToken renderToken)
at <StartupCode$Aardvark-Rendering-Vulkan>.$ResourceManager.run@2048-12(ResourceLocationSet x, RenderToken renderToken, AdaptiveToken t, Boolean changed)
at <StartupCode$Aardvark-Rendering-Vulkan>.$ResourceManager.arg10@2045-2(ResourceLocationSet x, RenderToken renderToken, AdaptiveToken t)
at Aardvark.Rendering.Vulkan.ResourceLocationSet.Update(AdaptiveToken token, RenderToken renderToken)
at Aardvark.Rendering.Vulkan.CommandTask.Perform(AdaptiveToken token, RenderToken renderToken, OutputDescription desc)
at <StartupCode$Aardvark-Rendering>[email protected](AdaptiveToken token)
at <StartupCode$Aardvark-Rendering>.$AbstractRenderTask.arg10@83-9(AbstractRenderTask x, RenderToken renderToken, OutputDescription out, AdaptiveToken token)
at <StartupCode$Aardvark-Rendering>.$AbstractRenderTask.action@1-47(AbstractRenderTask x, AdaptiveToken token, RenderToken renderToken, OutputDescription out, Unit _arg1)
at Aardvark.Rendering.AbstractRenderTask.Run(AdaptiveToken token, RenderToken renderToken, OutputDescription out)
at Aardvark.Rendering.AbstractRenderTask.Aardvark.Rendering.IRenderTask.Run(AdaptiveToken token, RenderToken renderToken, OutputDescription out)
at [email protected](Framebuffer fbo)
at <StartupCode$Aardvark-Rendering-Vulkan>.$Swapchain.f@248-213(Swapchain x, FSharpFunc`2 render, TokenCommandBuilder builder@, Framebuffer framebuffer, ImageView colorView, FSharpRef`1 currentImage, FSharpRef`1 backbuffer, Unit _arg7)
at <StartupCode$Aardvark-Rendering-Vulkan>.$Swapchain.f@248-212(Swapchain x, FSharpFunc`2 render, TokenCommandBuilder builder@, Framebuffer framebuffer, ImageView colorView, FSharpOption`1 depthView, FSharpRef`1 currentImage, FSharpRef`1 backbuffer, Unit _arg5)
at <StartupCode$Aardvark-Rendering-Vulkan>[email protected](Unit unitVar)
at Aardvark.Rendering.Vulkan.CommandAPI.TokenCommandBuilder.Run[a](FSharpFunc`2 f)
at <StartupCode$Aardvark-Rendering-Vulkan>.$Swapchain.action@1-48(Swapchain x, FSharpFunc`2 render, Unit unitVar0)
at Aardvark.Rendering.Vulkan.Swapchain.RenderFrame(FSharpFunc`2 render)
at Aardvark.Glfw.Window.Redraw()
at Aardvark.Glfw.Application.Run(Window[] ws)
at Aardvark.Glfw.Window.Run()
at Aardvark.Glfw.Window.Aardvark.Application.IRenderWindow.Run()
at Aardvark.Application.Utilities.SimpleRenderWindow.Run(FSharpOption`1 preventDisposal)
at Program.main(String[] argv) |
Btw, (this is unrelated but I didn't see another repo in your org to raise this) the https://aardworx.com/ domain seems to have an invalid TLS cert. Both Firefox and |
Hey, I'll forward the issue with aardworx.com, but there's a lot of (not so well curated and documented) demos/examples out there at https://github.com/aardvark-platform and https://github.com/aardvark-community These things are a bit rough around the edges but we're happy to help on discord, github, mail, github, etc |
Most recently we published a simple multiplayer game made with aardvark done by two interns (with help of course) https://github.com/aardvark-community/aardwars It's not the tidiest code but it uses ELM-style updates for the game-logic, so it's fairly straight-forward (note that packages are not yet properly updated there) |
Are the patches from the This is what my package reference section looks like:
|
Hey, I'll check that as soon as i have time (maybe some merge problem or i simply forgot to merge it) |
Hello,
I came across Aardvark today and was trying to get started running the
HelloWorld
program on Linux (Fedora 35). Using either theGL
orVulkan
backend fails, however.I'd be happy to start a PR to update the docs with steps to resolve if someone can point me in the direction of a solution.
GL
Vulkan
Warning: long stacktrace ahead!
The text was updated successfully, but these errors were encountered: