-
Notifications
You must be signed in to change notification settings - Fork 10
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
libs-back is missing support for on-screen rendering #36
Comments
Out of curiosity, I tried compiling gnustep-back for Win32, but ultimately ran into several linker errors about missing symbols for However, Not sure where to go from here. Let me know if you need more info. Clang version:
These are the changes I made to get to this point: changes.patch |
@arctic-marmoset I believe this linker issue was fixed with llvm/llvm-project#77797, but I’m not sure if that patch made it into Clang 18. @qmfrederik do you know? |
I'm pretty sure it did, and it works on MSYS2. @arctic-marmoset are you sure you using the LLVM linker? Are you using MSYS2 for building? |
Thanks. I believe @arctic-marmoset is trying to build for MSVC, not MinGW (if that was the question), and they are using lld-link:
Do you know if these errors should be fixed by the LLVM patch? |
This looks like it's related to ivar visibility, which should have been fixed via llvm/llvm-project#77385 (and it appears it has, if dumpbin lists the symbols)? @arctic-marmoset Could you try this on msys2/mingw64 first; the code (used to) compile on that platform. |
Looks like for MinGW the changes were backported (msys2/MINGW-packages#19767). @arctic-marmoset you could also try the latest Clang 19 release candidate, which should for sure have these fixes. |
@triplef They were backported but all backports were removed from msys2 once clang 18 made it into msys2. |
I ran some tests. With LLVM 18.1.8, compilation works just fine in an MSYS2 environment, but fails when you use a Windows-native toolchain. I can't really explain the difference just yet; I assume that somehow the linker behaves different in both environments? |
FWIW, the same linking issues is present in libs-gui, too, but is sidestepped via this patch: https://github.com/gnustep/tools-windows-msvc/blob/master/patches/gnustep-gui-remove-files.patch |
... looks like the difference is that MSYS2 appends |
@arctic-marmoset So, it looks like there's an issue with the codegen for ivar references on Windows. They appear to be marked as It works on MinGW/MSYS2 because lld behaves slightly different on that platform -- the Can you try to compile libs-back with the |
@qmfrederik I gave your suggestion a shot, and it seems to have resolved all the undefined symbol errors, except for one:
If I understand correctly, this is actually because If I make it Unfortunately, I'm now running into the following error:
There are many more similar warnings about various gnustep-gui ivar offsets being too narrow. Clang version:
I've attached the full log here: gnustep-back-runtime-pseudo-reloc-error.txt. |
I had this working at one point while I was at Keysight but I don't think I merged the changes in because the patch made some changes that didn't seem correct. One was that it needed to add setters/getters to certain ivars which were being accessed directly by the backend, among other changes. As I understand it that change may have been necessary at that time because of a bug in clang they had since been fixed. I will try to find the changes so you guys can take a look. That being said it seems like you're on the right track so don't wait up for me. ;) |
@arctic-marmoset Thanks, that confirms my theory that the Long story short, this is a compiler bug and we need to fix the clang compiler so that it marks those ivars with Regarding |
Quick update: I have a toolchain running on Windows which compiles libobj2, libs-base, libs-gui and libs-back (with win32/winlib support) using the latest version of Clang (and one patch). It doesn't use MSYS2 (except for running shell scripts) and doesn't require Visual Studio, either (it does require the Windows SDK). It's based on vcpkg (because it includes recipes for most of GNUstep's dependencies). The code is here: https://github.com/qmfrederik/vcpkg-gnustep. You can get a prebuilt copy of clang with the ObjC patches here: https://qmcdn.blob.core.windows.net/gnustep/clang-19.x-objc.zip (but these patches should be in clang 20.0 when it releases later this year). It includes a small CMake package which defines a The cool thing is that CMake + VS Code + CodeLLDB + clangd gives you a pretty decent development environment, with debugging and auto complete support. |
#31 added support for a "headless" GUI backend, which @qmfrederik explained here:
We should add support for a full Win32 backend to allow on-screen rendering.
I think both @gcasa and @qmfrederik have worked on this in the past. I wanted to open this in order to document the current state of GUI support.
The text was updated successfully, but these errors were encountered: