Closed ernsteiswuerfel closed 4 months ago
That doesn't look like it the right fix - we're already pulling in compiler.h via kernel.h, did anyone test that?
Are you referring to the futureproofing fixes? Since sort.c doesn't include kernel.h anywhere (even indirectly), I could drop those though and re-submit just the fix itself if that's preferred. Regarding testing, I tested both musl and glibc and both compiled fine with the patch.
Edit: After updating to musl-1.2.5-r1 on musl/llvm and compiling bcachefs-tools I no longer have this issue. Maybe OP can try compiling bcachefs-tools-1.7.0?
Keep in mind first you would have to include the following patch:
--- a/linux/sort.c
+++ b/linux/sort.c
@@ -15,6 +15,7 @@
#include <linux/types.h>
#include <linux/export.h>
#include <linux/sort.h>
+#include <linux/compiler.h>
/**
* is_aligned - is this pointer & size okay for word-wide copying?
After doing that you still get another compiler error which I have reported in #300 . But its at the linker stage so we are getting close.
Edit: After updating to musl-1.2.5-r1 on musl/llvm and compiling bcachefs-tools I no longer have this issue. Maybe OP can try compiling bcachefs-tools-1.7.0?
Keep in mind first you would have to include the following patch:
--- a/linux/sort.c +++ b/linux/sort.c @@ -15,6 +15,7 @@ #include <linux/types.h> #include <linux/export.h> #include <linux/sort.h> +#include <linux/compiler.h> /** * is_aligned - is this pointer & size okay for word-wide copying?
After doing that you still get another compiler error which I have reported in #300 . But its at the linker stage so we are getting close.
The patch I have stated above no longer needs to be used for versions >=1.9.0.
This bug can be closed as its now possible to compile bcachefs-tools-1.9.1
on gentoo by passing -C default-linker-libraries
after obtaining >=musl-1.2.5
.
@ray-adams Correct. I only hit #300 now.
Eagerly trying to build bcachefs-tools-1.6.4 on Gentoo musl/clang with musl 1.2.5 as #213 should be fixed when building against 1.2.5.
But now I run into another build failure:
The error above is from Gentoos bcachefs-tools-1.6.4 ebuild but building bcachefs-tools from git-master also gives me:
bcachefs-tools-1.6.4:20240303-133310.log