webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.9k stars 164 forks source link

Keep `-DMUST_IMPLEMENT_CLOCK_GETTIME` for Windows GCC #167

Closed ttytm closed 1 year ago

ttytm commented 1 year ago

The reason for the failing cache seems to be on the cache action side:

Warning: Failed to save: uploadChunk (start: 0, end: 13458) failed: Cache service responded with 500

Screenshot from 2023-08-21 19-55-32

AlbertShown commented 1 year ago

I confirm that DMUST_IMPLEMENT_CLOCK_GETTIME is needed only by GCC on Windows. And it's not required by GCC on macOS, Linux, or any other compilers. Only GCC in Windows.

ttytm commented 1 year ago

Thanks for catching this so quickly and sorry about the removal. It should have been kept. Can you specify what it is needed for? Then I would take a note on it and keep it in mind for any future changes here and potentially in other projects.

AlbertShown commented 1 year ago

Without this flag, GCC Linker (LD) shows this error undefined reference toclock_gettime'incivetweb.o`.

ttytm commented 1 year ago

It's probably be a version specific issue. Since the windows 10 system in a relatively virgin state I was testing on and the GitHub CI didn't reported on a build fail. Whats the output of your gcc --version?

AlbertShown commented 1 year ago

It's not OS-related, but the MinGW. gcc (x86_64-win32-seh-rev2, Built by MinGW-W64 project) 12.2.0

If adding the flag does not break the build on your system, then it's safe to add it. The linker (LD) will ignore all non-used references.

ttytm commented 1 year ago

Yes it's definitively right to add it, just to make reduce the change of breaking things like this again it's good to know :+1:

Thanks for the infos @AlbertShown !