-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
CI: Add GitHub Actions #2929
CI: Add GitHub Actions #2929
Conversation
I noticed MinGW64 started failing: https://github.com/bkaradzic/bgfx/actions/runs/3795872643/jobs/6488548146 It seems like something changed with MinGW container, since code didn't change for a while... Any ideas what might be going on? |
Probably SSE has to be enabled explicitly. Let me check it. |
Sure, but I wouldn't expect that CI breaks on unrelated change. Unless container is not fixed to specific version. |
astc-encoder has some SSE flags in CMakeLists.txt. So, this sounds like expected behavior. Though I agree on this sudden change. |
Also this is x64 build so |
The following change workaround the compiler error: --- a/scripts/bimg.lua
+++ b/scripts/bimg.lua
@@ -36,4 +36,9 @@ project "bimg"
"-fPIC",
}
+ configuration { "mingw-*" }
+ buildoptions {
+ "-msse4.1",
+ }
+
configuration {} Please let me ask others about this topic. I can not figure out the reason for this. |
OK, found the answer.
No, says Microsoft docs. To obey the hardware requirement rules, the global compiler flag in msys2/mingw environment was set to This issue would not happen in other mingw environment. So, you can add |
Can we make this work with some fixed version of MinGW so that this type error on CI doesn't happen? I don't understand why they went from generic |
It will not change in upcoming 5 or 10 years.
To satisfy Windows hardware requirements condition, here are the list for Windows 10
|
I'm checking Steam HW Survey, and I'll bump all builds to SSE4.2, 98.98% users have it: |
Windows 11 requires support for PAE, NX and SSE4.1. I am not sure if enabling SSE4.2 would exclude some of the users. It's OK for me though. |
After updating to SSE4.2 I found that MinGW version of popcntintrin.h has some nonsense x64 ifdef for |
Fixed! Thanks for help! |
Can you provide the compiler error message for that issue? I can try to ask mingw-w64 developers to add that. |
When targeting 32-bit, it says |
I got this build error related to
FreeBSD 13.2 i386, llvm 14.0.5, This patch work for me:
P.S. If necessary, I can create a separate issue. |
@VVD No need for separate issue FreeBSD is not supported platform: |
@bkaradzic, we have port with custom patches: https://cgit.freebsd.org/ports/tree/graphics/bgfx/files (https://github.com/freebsd/freebsd-ports/tree/main/graphics/bgfx/files) |
I just checked your patches, and they are actually simpler than what it would be required to maintain it in main repo. It's because you only fix what's needed for FreeBSD. Which is actually preferable IMO for someone who is using unsupported platform. |
Of course, our patches are intended to make the application build and run on FreeBSD, not to add new features. Sometimes we find and fix bugs and try to push patches to the upstream, but this is more a task for the upstream than for the maintainers. |
Build error: /wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.127.8725-465/bimg/3rdparty/astc-encoder/source/astcenc_vecmathlib_sse_4.h:1313:26: error: use of undeclared identifier '_mm_popcnt_u64'; did you mean '_mm_popcnt_u32'? return static_cast<int>(_mm_popcnt_u64(v)); ^~~~~~~~~~~~~~ _mm_popcnt_u32 /usr/lib/clang/14.0.5/include/popcntintrin.h:33:1: note: '_mm_popcnt_u32' declared here _mm_popcnt_u32(unsigned int __A) ^ 1 error generated. Upstream issues: ARM-software/astc-encoder#468 bkaradzic/bgfx#2929 (comment) PR: 278722 Approved by: yuri (maintainer timeout, 15 days)
This patch is broken - it's truncating the 64-bit input to 32-bits before taking the pop count, so fails for most ASTC block sizes. From my side I'm happy to support FreeBSD in the compressor upstream, as it's usually transparent, but we've long since dropped support for 32-bit x86. Nehalem is 15 years old, so I'm less convinced about supporting CPUs that old (I have no desire to re-add 32-bit testing, and I won't claim support for something I can't test). (I'm the upstream compressor maintainer) |
FreeBSD will support i386 ~4 years more - life cycle of the 14.x branch.
All -march on i386 newer than nehalem are affected - skylake for example too. |
@VVD Please stop referencing bgfx in FreeBSD, there is no support for FreeBSD in bgfx. It makes no sense for other people to get notified/involved about stuff you're doing in your project. |
No description provided.