romkatv/gitstatus

fails to build on FreeBSD 14 on arm64 (ie. raspberry pi 4)

lebel opened this issue · 3 comments

lebel commented

I get the following:

--- src/CMakeFiles/git2internal.dir/util.c.o ---
/tmp/gitstatus-build.RM73UgtRcb/libgit2/src/util.c:739:28: error: incompatible function pointer types passing 'int (void *, const void *, const void *)' to parameter of type 'int (*)(const void *, const void *, void *)' [-Wincompatible-function-pointer-types]
        qsort_s(els, nel, elsize, git__qsort_r_glue_cmp, &glue);
                                  ^~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:396:11: note: passing argument to parameter here
    int (*)(const void *, const void *, void *), void *);
          ^
1 error generated.
*** [src/CMakeFiles/git2internal.dir/util.c.o] Error code 1

make[2]: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build
1 error

make[2]: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build
*** [src/CMakeFiles/git2internal.dir/all] Error code 2

make[1]: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build
1 error

make[1]: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build
*** [all] Error code 2

make: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build
1 error

make: stopped in /tmp/gitstatus-build.RM73UgtRcb/libgit2/build

when I do a

./build -w -s

on FreeBSD 14 on my Raspberry Pi 4.

lebel commented

As a workaround, I made a jail into my rp4 running 13.2 and managed to build the binary successfully for now. Most likely this is due to a new clang version in FreeBSD 14.

I've pushed a potential fix but haven't tested it. Please update your local gitstatus repo (or powerlevel10k if you are using gitstatus through that) and try again.