Conversation
183b727 to
8f8bd58
Compare
When compiling with C++-20 and using `fmt`, some problems transpired. This commit fixes those.
This avoids lilnking problems with external "users" of STIR.
This was breaking due to fmt being used in with C++-20, but we didn't test it.
- a debug case, which I forgot - in KeyParser, for whatever reason there was ambiguity between std::format and stir::format.
When using format_string, I get error: no matching function for call to ‘vformat(std::format_string<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>&, ...' with g++-13 /14 and C++20
8f8bd58 to
8ad6203
Compare
Doesn't create dependencies, so original version should be fine.
c49fb36 to
3a73667
Compare
Also fix test in format.h (we needed <version>)
3a73667 to
e913b80
Compare
|
@markus-jehl this works now. Possibly you could have a look, but I'm tempted to merge rather soon, such that we can move on. |
The target_link_libraries(... PRIVATE fmt) still had link problems for external dependencies. Luckily, fmt also has a header-only target.
|
Using target_link_libraries(... PRIVATE fmt)still created problems on my Ubuntu 16.04 test system (wth gcc-8), although not in CI. Luckily, depending on |
|
Still no luck! Building with STIR now gives will need to use the trick of STIR/src/buildblock/CMakeLists.txt Lines 123 to 135 in 2ecec35 |
|
Actually, we then will need to |
25533c1 to
468c6f0
Compare
468c6f0 to
f550483
Compare
f550483 to
6754bea
Compare
Ooof, sorry to have put you through this ordeal! Went through your changes and they look good (I haven't had time to test it myself yet, but feel free to merge anyways). Probably I just haven't run into the same issue because we use fmt ourselves as well... |
Otherwise we'd need to add the /utf-8 switch.
|
With the latest, AppVeyor and most of GHA is fine, except the gcc-12 job, which seems to hang in ctest (no output). See e.g. https://github.com/UCL/STIR/actions/runs/17370039888/job/49303726707 @markus-jehl you don' thappen to have a gcc-12 ubuntu 22.04 system lying around? |
Unfortunately not, but I can try to look into it. Earliest by Thursday, though :-( |
|
Everything works fine on the SIRF 3.8.1 VM (building a new STIR with gcc-12), so I'm not sure what's going on. It's also not clear if this is actually ctest, as it seems the while the problematic one stops with Of course, the fact that it stops there could just be due to caching of the output. No idea what's going on. I guess I'll have to enable tmate to ssh into the runner, when I find some time. |
I did: went in via ssh, built, ran ctest. All fine. (it timed out before I could do more). I have no idea what's going on therefore. I've now updated the doc, and this should be good to go. Hopefully, the gcc12 job problem auto-disappears... |
|
No luck with that job. As I don't know how to diagnose/resolve, I'm afraid I'm going to disable that job from the Actions and squash-merge. |
This job seems to hang since using header-only {fmt}, although not
when using tmate to ssh into the runner.
Commenting it out therefore...
Fixes #1603