Closed shuyuan-liu closed 1 year ago
Hi @shuyuan-liu
Thanks for reporting this.
Yes, the <optional>
header should have been included there. I will fix this in the next release. In the meantime, you can just include it yourself to get the compilation to work.
Oddly, I don't get this error when compiling with G++10. Are you using CMake to trigger the build?
Also, may I ask why you're building from source? I distribute an Arch package via the Download page on the Bloom website: https://bloom.oscillate.io/download. Have you been having issues with this package?
I've just pushed the changes to correct the missing header includes to the develop
branch. If you build from that branch, those errors should no longer occur.
BTW I just compiled Bloom with G++ 12.2.1 (on the develop
branch) for the first time - it worked fine with those header include changes. I was also able to replicate the issue you had when building from master
- so looks like G++ has become more strict with header includes, since v10.
Thanks @navnavnav for the quick fix! The develop
branch compiles fine now for me with GCC 12.
Oddly, I don't get this error when compiling with G++10.
I tried GCC 10, same result as yours. As you said it might have become stricter; not sure when or why though.
Are you using CMake to trigger the build?
Yes I used the commands given by the main README, although I changed Debug
to Release
.
may I ask why you're building from source?
Oh I didn't realise there were binary packages! I first searched the AUR and found bloom-git, which builds from source, and thought that was the only thing available. I tried your package just now and it worked, thanks!
I was compiling Bloom from source on Arch Linux with GCC 12.2.0 and GNU libc 2.36. GCC gave errors saying ProjectConfig.hpp used
std::optional
without including<optional>
:Clang 14.0.6 gave similar errors. I grep'd the src directory for
optional
and at a glance it seems that most other files that use it have included the header, but ProjectConfig.hpp hasn't.