Zygo / bees

Best-Effort Extent-Same, a btrfs dedupe agent
GNU General Public License v3.0
669 stars 55 forks source link

Can't build on Fedora 30 #112

Closed Mathok closed 5 years ago

Mathok commented 5 years ago

error.cc:35:54: error: non-local lambda expression cannot have a capture-default 35 | function<void(string s)> current_catch_explainer = [&](string s) { | ^ make[1]: *** [Makefile:47: error.o] Error 1

the bug happens with 0.6.1 and git master and there is also a gentoo bugtracker entry for this https://bugs.gentoo.org/685714

automorphism88 commented 5 years ago

Does Fedora include GCC 9? Because on Gentoo, that error occurs with GCC 9.1, but it builds fine with GCC 8.3. I haven't tried clang or any other GCC versions.

kakra commented 5 years ago

This affects both the 0.6 branch and the master branch.

@Zygo Should we fix and backport to 0.6, or move forward to an 0.7 version?

Zygo commented 5 years ago

That lambda doesn't need a capture, because there's nothing in scope that it could capture that the function body doesn't already have access to. Apparently that's an error in C++11, but no version of GCC before 9 notices this.

@kakra We should probably go forward to 0.7 because it's long overdue.

I had wanted to do a bunch of stuff in 0.7, but then other plans took priority, and I also wandered away from bees for a bit to fight kernel bugs for a while. So I think I'm just going to push out a few small fixes for 0.7 soon, and try to get the bigger stuff done in 0.8.