fsearch: update to 0.3.1 - #62306
Conversation
|
Not sure why the -musl builds for 64bit archs fail and if this is an upstream issue or can be fixed by modifying the template / adding a patch. |
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
CFLAGS+=" -D_LARGEFILE64_SOURCE"
fi
post_extract() {
sed -i '/#include <linux\/fanotify.h>/d' \
src/fsearch_folder_monitor_fanotify.c
}Append this to your template and see if it solves your issue. From my quick look, the project uses the off64_t type, which can be exposed on musl with the |
|
Thank you very much for looking into the PR and the error messages! Your proposed solution works for me locally, so I'm assuming it does so, too, for the PR. |
|
Out of curiosity, can you check if it builds (and cross-builds) without the patch file (query.patch)? |
|
I tested for x86_64 and aarch64 (cross) without the patch, both built fine locally. |
|
It seems that everything builds fine on i686; however, one of the unit tests fails. Note that when you cross-compile locally, you do not automatically run any unit tests, because the binary you get is built for a different architecture, which is why it only fails in CI and not when you cross-compile. Just a wild guess, but try to amend the PR by removing the patch file and see if the unit tests pass without it? |
|
Thanks for your help. Update: Apparently, i686 build still fails due to the 2 failing tests. |
|
Swap the patch file for this: diff --git a/src/fsearch_database_scan.c b/src/fsearch_database_scan.c
index 5f1628ef..f6343847 100644
--- a/src/fsearch_database_scan.c
+++ b/src/fsearch_database_scan.c
@@ -75,7 +75,7 @@ add_folder(DatabaseWalkContext *walk_context, const char *name, const char *path
parent,
DATABASE_ENTRY_TYPE_FOLDER,
DATABASE_INDEX_PROPERTY_MODIFICATION_TIME,
- mtime,
+ (int64_t)mtime,
DATABASE_INDEX_PROPERTY_NONE);
if (!folder_entry) {
return NULL;
@@ -101,9 +101,9 @@ add_file(DatabaseWalkContext *walk_context, const char *name, off_t size, time_t
parent,
DATABASE_ENTRY_TYPE_FILE,
DATABASE_INDEX_PROPERTY_SIZE,
- size,
+ (int64_t)size,
DATABASE_INDEX_PROPERTY_MODIFICATION_TIME,
- mtime,
+ (int64_t)mtime,
DATABASE_INDEX_PROPERTY_NONE);
if (!file_entry) {
return NULL; |
|
You should send all our findings upstream and see what happens. Chances are these are genuine bugs in the code. |
|
Thanks, again, for all your help and fixing all the bugs! |
|
I created an issue upstream as per your suggestion. |
|
Awesome, thank you for doing this! Let’s wait and see what happens. |
|
Well, thank you for finding and fixing the issue in the first place! :-) |
|
I created this a month ago but for some reason it was ignored: |
|
@RandallFlagg @ihateemoji |
|
@gc-user thanks |
Just take the template and patches from here, and amend your PR with them. |
|
I think I can always reopen the PR if necessary, e.g. if @RandallFlagg's PR doesn't go through. But he also could just adopt your changes into his PR, so that your work wasn't for nothing. @Duncaen made some comments on @RandallFlagg's PR, so it has gotten some attention finally. |
Testing the changes
Local build testing
Notes:
Due to build errors I added the packages
itstool intltool icu-devel.Due to cross-build error I added
build_helper="qemu".[Edit]
Added @ihateemoji's solution to solve the 64bit-musl cross-build error.
[/Edit]