Closed adiantek closed 3 years ago
Ugh, Windows doesn't have opengl32.a for Windows 10 arm64 :/ https://developercommunity.visualstudio.com/t/cannot-link-opengl-programs-on-arm64/164107
Windows 10 ARM has opengl32 and glu32 but in newer versions. I sgguested those in mingw-w64 mailing list years ago. But mstorsjo said that may cause some issue in vlc.
Yeah, the short story simply is that arm64 devices don’t have OpenGL drivers at all.
Since winsdk 10.0.19041.0, the sdk does actually contain import libs for linking against opengl32.lib, but to the best of my knowledge, the intended OpenGL emulation driver hasn’t actually shipped yet in 21H1, it’s just available as a separately installable preview, https://devblogs.microsoft.com/directx/announcing-the-opencl-and-opengl-compatibility-pack-for-windows-10-on-arm/.
So until it’s actually available out of the box on any version, I don’t think mingw-w64 should be shipping those libs, otherwise you’d accidentally be making builds that just work for people at the bleeding edge, if at all. Now it’s much more clear that you simply have to avoid OpenGL, or use something like ANGLE.
@adiantek Oops, forgot to share the link. Here is the discussion in mingw-w64 mailing list. If you want to test something you can take the DEF file and create import library with dlltool.
Since winsdk 10.0.19041.0, the sdk does actually contain import libs for linking against opengl32.lib, but to the best of my knowledge, the intended OpenGL emulation driver hasn’t actually shipped yet in 21H1, it’s just available as a separately installable preview.
If you actually get the compatibility pack and take a look, it is just a special OpenGL ICD driver based on Mesa3D with GLonD3D12 support. The opengl32.dll file is shipped inbox, just unsure about which version have it. (19041.264 didn't, I just checked, but 22000.1 do).
Yeah I think actually shipping it (outside of the separate compatibility pack, and even that one only was available for specific apps, except for the insider version of the compatibility pack), it's been bumped to Windows 11, where it's probably needed to get better compatibility for x86_64 apps (but it's available for native arm64 apps too, I just recently checked).
Does anyone of you in this thread happen to have Windows 11 installed (on arm64), without having installed the OpenGL compatibility pack? I'm curious about the level of support there out of the box.
If you have such a setup, can you download the executables from https://martin.st/temp/wglinfo/ and run them, and let me know what each of them print? I don't need to see the full printout, just whether they print this:
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: GDI Generic
[WGL] OpenGL version string: 1.1.0
Or this:
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: D3D12 (Qualcomm( R ) Adreno( TM ) 540 GPU)
[WGL] OpenGL version string: 3.1 Mesa 20.1.0-devel (git-3a14d67e8e)
I did have the OpenGL compatibility pack installed (possibly the insider version, although I'm not sure any longer exactly how to get that one), and after upgrading to Windows 11, I got the good D3D12 based version for wglinfo-i686.exe
and wglinfo-aarch64.exe
, but not for the armv7 and x86_64 versions. In order to see how it behaves if I wouldn't have installed the compatibility pack, I uninstalled. Then I got the GDI Generic printout for all 4 cases. Then I tried reinstalling the OpenGL compatibility pack from Microsoft Store (but I think I didn't get the insider version?), because then I still get the GDI Generic printout for all cases.
So while Windows 11 does provide opengl32.dll for all architectures, so executables linking against it will run (contrary to on Windows 10), it's still pretty much unusable as long as most users would get the GDI Generic driver.
Thus, anyone with Windows 11, who haven't touched the OpenGL compatibility pack so far on that installation, can you try running those executables? (And does someone remember how to install the insider version of the compatibility pack, to get the proper driver again?)
May I ping @jeremyd2019 ? He has a working Windows 11 in Raspberry Pi 4B.
I don't expect the Raspberry Pi would have real graphics drivers, it just has a ram framebuffer IIRC. All arches say GDI Generic there.
@jeremyd2019 The WARP software D3D12 driver (the default one if you don't have a real graphics driver installed) can also be utilized by the OpenGL compatibility pack.
@mstorsjo I have a Surface Pro X but already had the compatibility pack installed - here's my output. I'm on Windows Insider Beta channel by the way.
Windows build: 22000.376 Compatibility pack version: 1.2105.4.0
With the compatibility pack installed:
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: D3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
[WGL] OpenGL version string: 3.1 Mesa 21.2.0-devel (git-1208290558)
[WGL] OpenGL shading language version string: 1.40
After removing the compatibility pack:
[WGL] WGL extensions:
NULL.
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: GDI Generic
[WGL] OpenGL version string: 1.1.0
[WGL] OpenGL extensions:
GL_WIN_swap_hint, GL_EXT_bgra, GL_EXT_paletted_texture.
Hope this helps!
@mstorsjo I have a Surface Pro X but already had the compatibility pack installed - here's my output. I'm on Windows Insider Beta channel by the way.
@dennisameling Thanks! If you reinstall the compatibility pack, on which architectures do you get the d3d12 renderer, and on which ones do you get the fallback?
After reinstalling the compatibility pack I get these outputs (yay for consistency!):
aarch64:
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: D3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
[WGL] OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.0-devel (git-ea8fa10edd)
[WGL] OpenGL shading language version string: 3.30
armv7:
[WGL] OpenGL vendor string: Microsoft Corporation
[WGL] OpenGL renderer string: D3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
[WGL] OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.0.0-devel (git-ea8fa10edd)
[WGL] OpenGL shading language version string: 3.30
x86_64:
[WGL] OpenGL (core profile) vendor string: Microsoft Corporation
[WGL] OpenGL (core profile) renderer string: D3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
[WGL] OpenGL (core profile) version string: 3.3 (Core Profile) Mesa 22.0.0-devel (git-ea8fa10edd)
[WGL] OpenGL (core profile) shading language version string: 3.30
i686:
[WGL] OpenGL (core profile) vendor string: Microsoft Corporation
[WGL] OpenGL (core profile) renderer string: D3D12 (Qualcomm(R) Adreno(TM) 680 GPU)
[WGL] OpenGL (core profile) version string: 3.3 (Core Profile) Mesa 22.0.0-devel (git-ea8fa10edd)
[WGL] OpenGL (core profile) shading language version string: 3.30
@dennisameling Awesome, thanks for testing! (I had installed an older version of the compatibility pack, but then stepped back to a non-insider version of Windows, so I no longer get the fully functional version from the store. With the older version of the driver, I only got the d3d12 version of aarch64 and i686.)
Hi. Has anyone got a copy of the OpenGL library file? I'm using Windows 10 on my Raspberry Pi 4 and am trying to compile a SDL2 and OpenGL game. I have the GL headers but not the library file.
@zap8600 Install the the latest cumulative update and you should have it. It is added sometime in the 1904x updates.
Hi. I'm running 1904.1. But then how will I be able to use libopengl32 if the file isn't there?
On Tue, Jan 4, 2022 at 8:22 PM driver1998 @.***> wrote:
@zap8600 https://github.com/zap8600 Upgrade to the latest cumulative update and you should have it. It is added sometime in the 1904x updates.
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1005326298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAQV2PSEBXUELSJ772TUUOTPFANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
opengl32.dll is added in some updates late in the 1904x cycle, install the latest updates (19041.1415) you should have it.
Thanks! But one question. How does updating add the library?
On Tue, Jan 4, 2022 at 8:38 PM driver1998 @.***> wrote:
opengl32.dll is added in some updates late in the 1904x cycle, install the latest updates (19041.1415) you should have it.
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1005332647, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAUGUSMPKL6BETUESSLUUOVLHANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi. Installing Windows 10 21H2 didn't work. I still don't have the library file. Can I install the compatibility pack?
Nevermind! I installed the compatibility pack, searched for opengl32.dll, and copied it to my lib folder. Thanks for the help, though.
On Wed, Jan 5, 2022 at 4:18 PM zap8600 @.***> wrote:
Hi. Installing Windows 10 21H2 didn't work. I still don't have the library file. Can I install the compatibility pack?
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1006122709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAWUQPAIDDP4SE6UZTDUUS7T7ANCNFSM47M26EYQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
On Windows 11 on new QC710, no insiders anything having ever touched it, I get the Microsoft GDI Generic for all 4 arches before and after installing the OpenGL compatibility pack.
On Windows 11 on new QC710, no insiders anything having ever touched it, I get the Microsoft GDI Generic for all 4 arches before and after installing the OpenGL compatibility pack.
Thanks for testing! So while it's now available contrary to before, it's still essentially unusable.
You need to get the insider version of the compatibility pack in order to have a version that actually gives you a sensible driver. And in order to get the insider version of the compatibility pack installed from Microsoft Store, your Windows installation needs to set up to insider versions. It's a bit odd how they've somewhat dropped the ball on taking this further from the initial testing phase...
Hi! So you know how I said that I copied the dlls? Well, they work! My program successfully compiled and ran with no errors (well, exceptfor when I did something wrong in my code). Also, I became an insider before downloading the compatibility pack.
On Thu, Jan 6, 2022, 16:41 Martin Storsjö @.***> wrote:
On Windows 11 on new QC710, no insiders anything having ever touched it, I get the Microsoft GDI Generic for all 4 arches before and after installing the OpenGL compatibility pack.
Thanks for testing! So while it's now available contrary to before, it's still essentially unusable.
You need to get the insider version of the compatibility pack in order to have a version that actually gives you a sensible driver. And in order to get the insider version of the compatibility pack installed from Microsoft Store, your Windows installation needs to set up to insider versions. It's a bit odd how they've somewhat dropped the ball on taking this further from the initial testing phase...
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1006988435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAQ3ZUY2L7J7UO64BPDUUYLCLANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
Hi! So you know how I said that I copied the dlls? Well, they work! My program successfully compiled and ran with no errors (well, exceptfor when I did something wrong in my code). Also, I became an insider before downloading the compatibility pack.
Are you able to share your DLLs from the insider version of it with me somehow? I had it installed before, but uninstalled it (to see how things were out of the box), and I wouldn't want to change the installation to insider mode just for getting it...
I can. Although it'll take a minute. How do you want me to send them?
From, Zane Post
On Thu, Jan 6, 2022, 17:37 Martin Storsjö @.***> wrote:
Hi! So you know how I said that I copied the dlls? Well, they work! My program successfully compiled and ran with no errors (well, exceptfor when I did something wrong in my code). Also, I became an insider before downloading the compatibility pack.
Are you able to share your DLLs from the insider version of it with me somehow? I had it installed before, but uninstalled it (to see how things were out of the box), and I wouldn't want to change the installation to insider mode just for getting it...
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007014695, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAVAYQRW2AHBWLYW26TUUYRUJANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
I can. Although it'll take a minute. How do you want me to send them? From, Zane Post
Email to martin@martin.st, hoping that mail handling doesn't filter out potentially "scary" files as DLLs... Or maybe via one of those pesky file sharing sites?
Alright. I send them in a minute.
On Thu, Jan 6, 2022, 17:41 Martin Storsjö @.***> wrote:
I can. Although it'll take a minute. How do you want me to send them? From, Zane Post
Email to @.***, hoping that mail handling doesn't filter out potentially "scary" files as DLLs... Or maybe via one of those pesky file sharing sites?
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007016025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAQW42354CABMPDRGHDUUYSBTANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
Hmm, but then again, I suspect just sharing opengl32.dll from an installation doesn't help me, as that's just the public interface and the fallback implementation - but the proper d3d12 driver is somewhere else, plugged in as an ICD (installable client driver) which gets loaded by opengl32.dll.
Well, wasn't the compatibility pack made to run OpenGL apps on ARM? It was created before official OpenGL libraries were built into WoA, so it should be the full library.
On Thu, Jan 6, 2022, 17:48 Martin Storsjö @.***> wrote:
Hmm, but then again, I suspect just sharing opengl32.dll from an installation doesn't help me, as that's just the public interface and the fallback implementation - but the proper d3d12 driver is somewhere else, plugged in as an ICD (installable client driver) which gets loaded by opengl32.dll.
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007020728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAU2GONTSQE7A462GKDUUYS33ANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
You might be able to use https://store.rg-adguard.net/, plugging in the URL https://www.microsoft.com/en-us/p/opencl-and-opengl-compatibility-pack/9nqpsl29bfff
. With that I get a 117MB ARM64 appx 1.2112.2.0 and a 305.81MB ARM64 eappx 1.2112.2.70 for any ring other than retail. For retail, I get a 110.81MB ARM64 appx 0.2109.1.0 and a 284.22MB ARM64 eappx 0.2109.1.70.
Installing the 1.2112.2.0 appx gave me D3D12 renderer for all 4 arches. Trying to install the Eappx with Add-AppxPackage
gave an error that it is not compatible with the device, it can only be installed on Windows.Xbox
.
Installing the 1.2112.2.0 appx gave me D3D12 renderer for all 4 arches. Trying to install the Eappx with
Add-AppxPackage
gave an error that it is not compatible with the device, it can only be installed onWindows.Xbox
.
Awesome, thanks! That worked nicely for me too!
@zap8600 So with that I don't need copied DLLs any longer - thanks for the offer of helping anyway :-)
You're welcome! I actually didn't know that you were the owner of the compiler repository for the aarch64-w64-mingw compiler. Thanks to you, I can compile ARM64 native C programs, So, thanks for that!
On Fri, Jan 7, 2022 at 1:38 AM Martin Storsjö @.***> wrote:
Installing the 1.2112.2.0 appx gave me D3D12 renderer for all 4 arches. Trying to install the Eappx with Add-AppxPackage gave an error that it is not compatible with the device, it can only be installed on Windows.Xbox.
Awesome, thanks! That worked nicely for me too!
@zap8600 https://github.com/zap8600 So with that I don't need copied DLLs any longer - thanks for the offer of helping anyway :-)
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007201448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAV6PMSW743DKIB22ILUU2KBFANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
Hey @jeremyd2019 I'm trying to get the ARM copies of opengl32.dll (not ARM64, but ARM32). I can't install the ARM appx because it is a ARM package. The x64 package only gives me the x64 version. Can you upload the dlls or something?
On Fri, Jan 7, 2022 at 10:47 AM zap8600 @.***> wrote:
You're welcome! I actually didn't know that you were the owner of the compiler repository for the aarch64-w64-mingw compiler. Thanks to you, I can compile ARM64 native C programs, So, thanks for that!
On Fri, Jan 7, 2022 at 1:38 AM Martin Storsjö @.***> wrote:
Installing the 1.2112.2.0 appx gave me D3D12 renderer for all 4 arches. Trying to install the Eappx with Add-AppxPackage gave an error that it is not compatible with the device, it can only be installed on Windows.Xbox.
Awesome, thanks! That worked nicely for me too!
@zap8600 https://github.com/zap8600 So with that I don't need copied DLLs any longer - thanks for the offer of helping anyway :-)
— Reply to this email directly, view it on GitHub < https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007201448 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AWYQOAV6PMSW743DKIB22ILUU2KBFANCNFSM47M26EYQ
. You are receiving this because you were mentioned.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007560634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOAVJNMPCCSW4QHYXQ7LUU4KLTANCNFSM47M26EYQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The appx I have doesn't seem to contain opengl32.dll, just clon12compiler.dll dxil.dll OpenCLOn12.dll and OpenGLOn12.dll for each of the four arches. I don't have any ARM32 install either.
Hey @jeremyd2019 I'm trying to get the ARM copies of opengl32.dll (not ARM64, but ARM32). I can't install the ARM appx because it is a ARM package. The x64 package only gives me the x64 version. Can you upload the dlls or something?
I mailed you the DLLs (opengl32.dll and glu32.dll) from C:\Windows\SysArm32 from a Windows 11 installation, in case they work for you.
Hey I never received the dlls. Did you email @.***?
On Fri, Jan 7, 2022, 16:46 Martin Storsjö @.***> wrote:
Hey @jeremyd2019 https://github.com/jeremyd2019 I'm trying to get the ARM copies of opengl32.dll (not ARM64, but ARM32). I can't install the ARM appx because it is a ARM package. The x64 package only gives me the x64 version. Can you upload the dlls or something?
I mailed you the DLLs (opengl32.dll and glu32.dll) from C:\Windows\SysArm32 from a Windows 11 installation, in case they work for you.
— Reply to this email directly, view it on GitHub https://github.com/mstorsjo/llvm-mingw/issues/209#issuecomment-1007798207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYQOATZC6SYBJ3S7HCFKZ3UU5UK7ANCNFSM47M26EYQ . You are receiving this because you were mentioned.Message ID: @.***>
So for more context, it seems that the OpenGL Compatibility Pack lists Windows 10 19041.488 (KB4571744) as the minimum supported version. And sure enough, installing that update on top of 19041.264 drops opengl32.dll and opencl.dll to C:\Windows\system32, sysarm32 and syswow64.
Hopefully nobody is using anything older than 19041 now on ARM64 systems (ARM64 does not have LTSC versions so they should be all EOLed)...
Also version 1.2202.1.70 (aka the working one) of the compatibility pack seems to be available on Retail channel as well.
Why libopengl32.a is missing in aarch64-w64-mingw32? I would like to build wxWidgets for Windows arch64.