e-dant / watcher

Filesystem watcher. Works anywhere. Simple, efficient and friendly.
MIT License
639 stars 32 forks source link

Compiler error: `chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression` #41

Closed e-dant closed 3 months ago

e-dant commented 10 months ago

Recently, on both the release and next branches, our CodeQL builds have been coming up with this error:

https://github.com/e-dant/watcher/actions/runs/6684346814/job/18161503474#step:5:74

We also found this error on a Clang build for Linux in development:

https://github.com/e-dant/watcher/actions/runs/6684014904/job/18160816032#step:4:58

This looks and feels like a kind of issue unrelated to our codebase. I am not sure why the issue has only just started to crop up.

Using Nix is always an option to make our builds reproducible and mostly deterministic. Nix was mentioned in a previous build issue: https://github.com/e-dant/watcher/issues/33

e-dant commented 10 months ago

Switching to g++ seems to work for the time being: https://github.com/e-dant/watcher/actions/runs/6684463968/job/18161755411

Ideally, we would build on both clang and gcc, and we would do it with Nix.

topazus commented 10 months ago

@e-dant I encountered the similar issue here. Maybe you could try to use clang 15 instead of clang 14. see: https://github.com/snitch-org/snitch/pull/138#issuecomment-1781507770

e-dant commented 10 months ago

@e-dant I encountered the similar issue here. Maybe you could try to use clang 15 instead of clang 14. see: snitch-org/snitch#138 (comment)

Thank you very much -- Lots of good stuff in that linked thread (and I few things I didn't know about how libraries are resolved!)