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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with building SFML 3 (and 2.6) on Windows with Clang #2046

Closed
nedoxff opened this issue Mar 16, 2022 · 33 comments
Closed

Problems with building SFML 3 (and 2.6) on Windows with Clang #2046

nedoxff opened this issue Mar 16, 2022 · 33 comments

Comments

@nedoxff
Copy link

nedoxff commented Mar 16, 2022

Thanks for raising your issue here! 馃檪

Before you submit the issue however, we'd like you to consider the follow points.

  • We like to use the issue tracker for confirmed issues.
  • If you're stuck with SFML, please use the forum to get help.

Subject of the issue

While I have been constructing a minimal example for another issue (with sf::Strings and wide strings), I noticed there were problems with building SFML 2.6 & 3.0 when using non-MSVC compilers (so MinGW and both Clang-like command-lines (clang-cl.exe & clang++.exe))

Your environment

  • Your OS / distro / window manager used: Windows 10, 64bit, build 21H2
    懈蟹芯斜褉邪卸械薪懈械

  • Your version of SFML (2.5.0, git master, etc): 2.6 (branch 2.6.x, tag 3315456dc32e2da000145bb7f97083154806b59b) and 3.0 (branch master, tag 5c9b571c70eeb0171affbce08b005a1d65765115)

  • Your compiler and compiler version used: Clang and MinGW (GNU 11.2.0, bundled with CLion)
    Clang versions:
    懈蟹芯斜褉邪卸械薪懈械

  • Special compiler flags used: none

Steps to reproduce

Here is the ZIP archive I used for both text and build tests (the standard is set to C++17): SFMLTest.zip
MD5 Checksum: 4c99ca98215ccc919181fd2dd8d24c79

Here is just the main.cpp without any resources:

#include <iostream>
#include <SFML/Graphics.hpp>
int main() {
	sf::RenderWindow window(sf::VideoMode(500, 100), "SFML Wide String Text Example");

	sf::Font font;
	if(!font.loadFromFile("C:\\Windows\\Fonts\\Arial.ttf"))
	{
		std::cerr << "uh oh! (failed loading font)" << std::endl;
		return 1;
	}

	sf::Text text;
	text.setCharacterSize(48);
	text.setString(L"test test 褌械褋褌");
	text.setFont(font);

	while(window.isOpen())
	{
		sf::Event event{};
		while(window.pollEvent(event))
		{
			if(event.type == sf::Event::Closed)
				window.close();
		}

		window.clear();
		window.draw(text);
		window.display();
	}
	return 0;
}

Expected behavior

The code compiles successfully and creates a window with a text.

Actual behavior

2.6

MinGW

Compiles successfully (AND works correctly)

MSVC

Compiles successfully (with runtime wide string issues, see Notes)

Clang with MinGW-like command-line

FAILED: _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj 
..\clang++.exe -DSFML_SYSTEM_EXPORTS -I.../SFMLTest/cmake-build-debug/_deps/sfml-src/include -I.../SFMLTest/cmake-build-debug/_deps/sfml-src/src -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -std=gnu++17  -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wnull-dereference -Wold-style-cast -Wpedantic -Werror -Wno-unknown-warning-option -MD -MT _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj -MF _deps\sfml-build\src\SFML\System\CMakeFiles\sfml-system.dir\Clock.cpp.obj.d -o _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj -c F:/Projects/CLionProjects/SFMLTest/cmake-build-debug/_deps/sfml-src/src/SFML/System/Clock.cpp
In file included from .../SFMLTest/cmake-build-debug/_deps/sfml-src/src/SFML/System/Clock.cpp:28:
In file included from .../SFMLTest/cmake-build-debug/_deps/sfml-src/include\SFML/System/Clock.hpp:31:
In file included from .../SFMLTest/cmake-build-debug/_deps/sfml-src/include\SFML/System/Export.hpp:31:
.../SFMLTest/cmake-build-debug/_deps/sfml-src/include\SFML/Config.hpp:231:26: error: extension used [-Werror,-Wlanguage-extension-token]
        typedef signed   __int64 Int64;
                         ^
.../SFMLTest/cmake-build-debug/_deps/sfml-src/include\SFML/Config.hpp:232:26: error: extension used [-Werror,-Wlanguage-extension-token]
        typedef unsigned __int64 Uint64;

Clang with MSVC-like command-line

FAILED: _deps/sfml-build/src/SFML/Window/CMakeFiles/sfml-window.dir/Win32/WindowImplWin32.cpp.obj 
...\clang-cl.exe  /nologo -TP -DSFML_WINDOW_EXPORTS -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -I...\SFMLTest\cmake-build-debug\_deps\sfml-src\include -I...\SFMLTest\cmake-build-debug\_deps\sfml-src\src -I...\SFMLTest\cmake-build-debug\_deps\sfml-src\extlibs\headers\vulkan -imsvc ...\SFMLTest\cmake-build-debug\_deps\sfml-src\extlibs\headers\glad\include -m32 /Zi /Ob0 /Od /RTC1 -MDd -std:c++17  /W4 /w14242 /w14254 /w14263 /w14265 /w14287 /we4289 /w14296 /w14311 /w14545 /w14546 /w14547 /w14549 /w14555 /w14619 /w14640 /w14826 /w14905 /w14906 /w14928 /wd4996 /wd4068 /wd4505 /wd4800 /WX /showIncludes /Fo_deps\sfml-build\src\SFML\Window\CMakeFiles\sfml-window.dir\Win32\WindowImplWin32.cpp.obj /Fd_deps\sfml-build\src\SFML\Window\CMakeFiles\sfml-window.dir\ -c -- ...\SFMLTest\cmake-build-debug\_deps\sfml-src\src\SFML\Window\Win32\WindowImplWin32.cpp
...\SFMLTest\cmake-build-debug\_deps\sfml-src\src\SFML\Window\Win32\WindowImplWin32.cpp(223,147): error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
    DEV_BROADCAST_DEVICEINTERFACE deviceInterface = {sizeof(DEV_BROADCAST_DEVICEINTERFACE), DBT_DEVTYP_DEVICEINTERFACE, 0, GUID_DEVINTERFACE_HID, 0};
                                                                                                                                                  ^
                                                                                                                                                  {}
1 error generated.

3.0

MinGW

Compiles, but exits with Process finished with exit code -1073741819 (0xC0000005)
The debugger gives points, but gives an exception: Exception: Exception 0xc0000005 encountered at address 0x500e178c: User-mode data execution prevention (DEP) violation at location 0x500e178c

After another rebuild, for whatever reason started working.

MSVC

Compiles successfully (with runtime wide string issues, see Notes)

Clang with MinGW-like command-line

FAILED: _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.obj 
F:\Apps\LLVM\bin\clang++.exe -DSFML_SYSTEM_EXPORTS -I.../SFMLTest/cmake-build-debug/_deps/sfml-src/include -I.../SFMLTest/cmake-build-debug/_deps/sfml-src/src -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -std=gnu++17  -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wsuggest-override -Wnull-dereference -Wold-style-cast -Wpedantic -Werror -Wno-unknown-warning-option -MD -MT _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.obj -MF _deps\sfml-build\src\SFML\System\CMakeFiles\sfml-system.dir\FileInputStream.cpp.obj.d -o _deps/sfml-build/src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.obj -c .../SFMLTest/cmake-build-debug/_deps/sfml-src/src/SFML/System/FileInputStream.cpp
.../SFMLTest/cmake-build-debug/_deps/sfml-src/src/SFML/System/FileInputStream.cpp:70:18: error: '_wfopen' is deprecated: This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
    m_file.reset(_wfopen(filename.c_str(), L"rb"));
                 ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wstdio.h:132:20: note: '_wfopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_wfopen_s)
                   ^
F:\Apps\VisualStudioBuildTools\VC\Tools\MSVC\14.31.31103\include\vcruntime.h:335:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
F:\Apps\VisualStudioBuildTools\VC\Tools\MSVC\14.31.31103\include\vcruntime.h:325:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
1 error generated.

Clang with MSVC-like command-line

Compiles, but exits with Exception 0xc0000005 encountered at address 0x500e178c: User-mode data execution prevention (DEP) violation at location 0x500e178c.
Debugger shows this:
懈蟹芯斜褉邪卸械薪懈械

Bonus: MSVC and Clang with MSVC-like command-line with -std:c++latest

3.0

MSVC

#2039

Clang with MSVC-like command-line

Same problem as with C++17 (access violation).

2.6

MSVC

Compiles successfully (with runtime wide string issues, see Notes)

Clang with MSVC-like command-line

Does not have such a flag (??)

Notes

@ChrisThrasher
Copy link
Member

ChrisThrasher commented Mar 16, 2022

Clang with MinGW-like command-line (2.6)

#1957 This PR changed how we were defining the fixed-width sf:: integer type aliases. Sadly it uses C++11 features which makes it incompatible with the 2.6.x branch so we can't do something similar to fix the issue you are having with Clang's -Wlanguage_extension_token warning.

Clang with MSVC-like command-line (2.6)

The missing braces seem like an easy fix. Can you try to fix that locally and confirm whether it works? If so then that might be a viable PR.

Clang with MinGW-like command-line (3.0)

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-170
Seems like we could switch to the secure version of that function without too much trouble. Seems like a reasonable thing to do regardless.

@nedoxff
Copy link
Author

nedoxff commented Mar 16, 2022

I have tried Clang with MSVC-like command-line, and it works! It even produces the desired effect for #2047!!
I'm pretty new to PRs, I'm kinda afraid I might break everything 馃槄
懈蟹芯斜褉邪卸械薪懈械

@eXpl0it3r
Copy link
Member

I've lost track of what was and wasn't fixed. Can you provide an update on the buildability of 2.6.x and master?

@nedoxff
Copy link
Author

nedoxff commented Oct 11, 2022

Sorry for the delay.. Unfortunately I have reinstalled windows like 5 times by now, so I don't have the same development environment at the moment. I'll comment as soon as I'll be able to test it again!

@MarcDirven
Copy link

MarcDirven commented Nov 22, 2022

I'm still having this issue (clang windows msvc 15). Got everything working by doing:

// /include/SFML/Config.hpp
    #if defined(_MSC_VER) && !defined(__clang__) // Added !defined(__clang__)
        typedef signed   __int64 Int64;
        typedef unsigned __int64 Uint64;
    #else
        #if defined(__clang__)
            #pragma clang diagnostic push
            #pragma clang diagnostic ignored "-Wc++11-long-long"
        #endif
        typedef signed   long long Int64;
        typedef unsigned long long Uint64;
        #if defined(__clang__)
            #pragma clang diagnostic pop
        #endif
    #endif

Then got lots of other warnings like deprecated items which can be solved by adding:

add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)

However this is at global CMake scope and dislike this. So either, SFML must use fopen_s and inet_ntop() or InetNtop() or link the correct target compile definitions (_CRT_SECURE_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS). However, fixing the deprecations would be a better solution in my opinion.

Also, GetVersion() used at /src/SFML/System/Win32/ClockImpl.cpp line 46 gives an error and is fixed by:

    bool isWindowsXpOrOlder()
    {
        // Windows XP was the last 5.x version of Windows
        return false;//static_cast<DWORD>(LOBYTE(LOWORD(GetVersion()))) < 6; // Added '//' and return false
    }

Since I don't have an old version of Windows. Kind of thought this was fixed in #469. This can also be fixed by IsWindowsXpOrGreater

@Bambo-Borris
Copy link
Contributor

Bambo-Borris commented Nov 22, 2022

I'm still having this issue (clang windows msvc 15). Got everything working by doing:

// /include/SFML/Config.hpp
    #if defined(_MSC_VER) && !defined(__clang__) // Added !defined(__clang__)
        typedef signed   __int64 Int64;
        typedef unsigned __int64 Uint64;
    #else
        #if defined(__clang__)
            #pragma clang diagnostic push
            #pragma clang diagnostic ignored "-Wc++11-long-long"
        #endif
        typedef signed   long long Int64;
        typedef unsigned long long Uint64;
        #if defined(__clang__)
            #pragma clang diagnostic pop
        #endif
    #endif

Then got lots of other warnings like deprecated items which can be solved by adding:

add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS)

However this is at global CMake scope and dislike this. Also, GetVersion() used at /src/SFML/System/Win32/ClockImpl.cpp line 46 gives an error and is fixed by:

    bool isWindowsXpOrOlder()
    {
        // Windows XP was the last 5.x version of Windows
        return false;//static_cast<DWORD>(LOBYTE(LOWORD(GetVersion()))) < 6; // Added '//' and return false
    }

Since I don't have an old version of Windows. Kind of thought this was fixed in #469.

Are you using clang with MSVC like interface or gnu-like? I did a fix for some of the MSVC like, but there's still outstanding work I plan on resolving. Also we don't need to worry about the config header changes as we removed those typedefs in master. They only matter for 2.x versions, and I think 2.6.x should have them.

Edit

Seems we opted to just disable warnings as errors for the build to at least pass for 2.6.x & master. I'll take another look this weekend at improving this situation, we can probably resolve these in SFML3 at least.

@MarcDirven
Copy link

MarcDirven commented Nov 22, 2022

Are you using clang with MSVC like interface or gnu-like?

Right how can I check this? I'm thinking gnu-like cause it uses dashes (--arg) rather than slahes (/arg) and my vscode uses clang + clang++ rather than clang-cl. But then again, VSCode says: Clang 15.0.0 x86_64-pc-windows-mscv

@Bambo-Borris
Copy link
Contributor

Bambo-Borris commented Nov 22, 2022

Are you using clang with MSVC like interface or gnu-like?

Right how can I check this? I'm thinking gnu-like cause it uses dashes (--arg) rather than slahes (/arg) and my vscode uses clang + clang++ rather than clang-cl.

Thanks, yeah that was part of the work I hadn't got around to resolving. Well now I have a motivation! You could open a PR with those changes for 2.6.x, I'll happily test & review it. I believe there was more to resolve, but your initial changes may be enough to get us past hurdle 1. We don't have a CI clang++ on Windows so that may block progress, but we can probably overcome that quickly.

@MarcDirven
Copy link

Alright, so hurdle 2 being the deprecation warnings? Cause if so, it'll take me a bit longer and/or maybe should be in a different PR? Also not sure how to fix those since there are two possible solutions (one being the target_compile_definitions/don't treat warnings as errors and the other one being removing the actual deprecation warning)

@Bambo-Borris
Copy link
Contributor

Alright, so hurdle 2 being the deprecation warnings? Cause if so, it'll take me a bit longer and/or maybe should be in a different PR? Also not sure how to fix those since there are two possible solutions (one being the target_compile_definitions/don't treat warnings as errors and the other one being removing the actual deprecation warning)

I think we had discussions about the deprecation warnings, some of them may be solveable within 2.6.x, some maybe not and we can't get over them in that version but can in master. But I'm not 100% certain, I think the question of how we get all this work done, where it all goes and how many PRs probably needs some insight from a maintainer so I'll tag the usual suspects @eXpl0it3r @ChrisThrasher

@ChrisThrasher
Copy link
Member

Ignore deprecation warnings for now. Use the WARNINGS_AS_ERRORS option to disable warnings as errors so that we can add the new compiler to CI without also having to fix all the new warnings it emits. Once the CI job is in place and merged, then we can think about re-enabling warnings as errors and fixing everything.

@MarcDirven
Copy link

I will try and make a PR somewhere this week to disable the deprecated errors to the 2.6.x branch then

@MarcDirven
Copy link

Sorry for all the fuzz, just let me know once the CI job is up and running if you want me to look into the issue.

@eXpl0it3r
Copy link
Member

Don't worry, I think we could've been a bit more clear on what needs to be done.

Looking at it, it seems that the latest VS version 17.4 ships with Clang 15, while the VS version 17.3, which is currently shipped with the Windows image, ships with Clang 14. So as of right now, we can't really setup a "new" CI, unless we manually install VS 17.4, which most likely takes too long for a CI process.

I'm a bit confused, as SFML seems to build fine for me despite having the WARNINGS_AS_ERRORS enabled and warnings actually showing in the console.

SFML\src\SFML\System\Win32\ClockImpl.cpp(46,49): warning : 'GetVersion' is deprecated [-Wdeprec
ated-declarations] [SFML\build\src\SFML\System\sfml-system.vcxproj]
SFML\src\SFML\Network\IpAddress.cpp(92,12): warning : 'inet_ntoa' is deprecated: Use inet_ntop(
) or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declara
tions] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\IpAddress.cpp(184,21): warning : 'inet_addr' is deprecated: Use inet_pton
() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declar
ations] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\TcpSocket.cpp(249,40): warning : unknown warning group '-Wuseless-cast',
ignored [-Wunknown-warning-option] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\TcpSocket.cpp(284,36): warning : unknown warning group '-Wuseless-cast',
ignored [-Wunknown-warning-option] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\TcpSocket.cpp(340,36): warning : unknown warning group '-Wuseless-cast',
ignored [-Wunknown-warning-option] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\UdpSocket.cpp(117,36): warning : unknown warning group '-Wuseless-cast',
ignored [-Wunknown-warning-option] [SFML\build\src\SFML\Network\sfml-network.vcxproj]
SFML\src\SFML\Network\UdpSocket.cpp(149,36): warning : unknown warning group '-Wuseless-cast',
ignored [-Wunknown-warning-option] [SFML\build\src\SFML\Network\sfml-network.vcxproj]

@MarcDirven
Copy link

MarcDirven commented Nov 23, 2022

Yea... I'm sorry, I didn't know about the CMake option at all, but yes adding -DWARNINGS_AS_ERRORS:BOOL=FALSE seems to fix the problem. I thought those were actual errors

@eXpl0it3r
Copy link
Member

I'm curious, how are you building SFML? When using the ClangCL frontend we disable that option already, so you must be using Clang in a different way. How exactly?

@Bambo-Borris
Copy link
Contributor

I'm curious, how are you building SFML? When using the ClangCL frontend we disable that option already, so you must be using Clang in a different way. How exactly?

They're not using the MSVC-like clang interface, they are using the GNU-like one. The GNU one uses GCC like flags (-Werror) rather than the MSVC style ones (/WX).

@ChrisThrasher
Copy link
Member

ChrisThrasher commented Dec 11, 2022

I submitted #2293 which is a step towards better Windows Clang support. I plan on doing something similar once an GNU-like Clang Windows CI job is added. If someone could build this with GNU-like Clang and let me know what happens, I would really appreciate that.

@ChrisThrasher
Copy link
Member

Can the Windows Clang users test PR #2293 and tell me if it fixes your build issues? I think I've fixed both the clang-cl.exe and the clang.exe builds. Thank you!

@MarcDirven
Copy link

Will check in a sec

@ChrisThrasher
Copy link
Member

I should clarify that I'm fixing the master branch. Fixing these errors in 2.6.x is a lower priority but still something I'd like to see happen.

@MarcDirven
Copy link

Just cloned the master branch, compiling with clang15 gives:

[build] C:/Users/marcd/Downloads/SFML/src/SFML/System/FileInputStream.cpp:70:18: error: '_wfopen' is deprecated: This function or variable may be unsafe. Consider using _wfopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
[build]     m_file.reset(_wfopen(filename.c_str(), L"rb"));
[build]                  ^
[build] C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wstdio.h:132:20: note: '_wfopen' has been explicitly marked deprecated here
[build]     _Check_return_ _CRT_INSECURE_DEPRECATE(_wfopen_s)
[build]                    ^
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
[build]         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
[build]                                                       ^
[build] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
[build] #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
[build]                                               ^
[build] 1 error generated.

@ChrisThrasher
Copy link
Member

The fixes aren't merged yet. See the PR I linked and use that branch instead.

@MarcDirven
Copy link

Oh god I'm stupid

@MarcDirven
Copy link

Tested it, works, thanks!

@ChrisThrasher
Copy link
Member

I just merged #2293 which should fix the Clang Windows builds for anyone using SFML 3! I'll see what I can do about fixing it in 2.6.x as well.

@ChrisThrasher
Copy link
Member

Please try out #2294 to see if it fixes the issues with the 2.6.x build.

@MarcDirven
Copy link

Hmm, I checked out at clang-warnings, compiled it with Clang15, the warnings are no longer being treated as errors but gives me linker errors instead. Deleting the build directory and building again solved the problem, which is weird, since my build directory was empty to begin with.

@ChrisThrasher
Copy link
Member

https://github.com/ChrisThrasher/SFML/actions/runs/3670457670/jobs/6205007134

We're trying to add a Clang Windows CI job but we're getting a link error when consuming SFML in static release builds. Perhaps your error was similar? Hopefully we can sort this out but it's unclear what the cause of the problem is right now.

@ChrisThrasher
Copy link
Member

With the merging of #2294, I believe all Clang-on-Windows build errors are fixed. I'm going to leave this issue open for a few more days in case we missed something but I believe this issue has been addressed. We hope to add new CI jobs to the pipeline such that future issues don't creep back into SFML. Sorry for the long time to get this fixed but thanks for reporting it!

@MarcDirven
Copy link

https://github.com/ChrisThrasher/SFML/actions/runs/3670457670/jobs/6205007134

We're trying to add a Clang Windows CI job but we're getting a link error when consuming SFML in static release builds. Perhaps your error was similar? Hopefully we can sort this out but it's unclear what the cause of the problem is right now.

The link error looked very similar but IIRC didn't have anything to do with mismatching release/debug configurations. I just tried out to compile the 2.6.x branch from scratch and didn't have any problems with it so I guess it's fixed.

@ChrisThrasher
Copy link
Member

#2295

SFML 3 will be getting some Clang.exe CI jobs so we never introduce more of these build issues ever again. We 鉂わ笍 our Windows + Clang users.

@ChrisThrasher
Copy link
Member

I believe everything in this thread has been addressed now so I'm closing this. Please let us know if you encounter any more issues with Clang and Windows!

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Dec 18, 2022
@eXpl0it3r eXpl0it3r added this to Backlog in SFML 3.0.0 via automation Dec 18, 2022
@eXpl0it3r eXpl0it3r added this to the 3.0 milestone Dec 18, 2022
@eXpl0it3r eXpl0it3r moved this from Discussion to Done in SFML 2.6.0 Dec 18, 2022
@eXpl0it3r eXpl0it3r moved this from Backlog to Done in SFML 3.0.0 Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
SFML 2.6.0
  
Done
SFML 3.0.0
  
Done
Development

No branches or pull requests

5 participants