Hi there, Building the samba package on AArch64 for the Guix distribution fails because the configure script leaves a stale "hinttest.fcntl" file behind, and the package recipe doesn't like it. Digging into it, it looks like the C program that checks if the feature is available crashes on AArch64 while it runs OK on x86_64. The test code is as follows: ``` #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <stdint.h> #define DATA "hinttest.fcntl" int main(void) { uint64_t *hint, get_hint; int fd; fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL); if (fd == -1) { goto err; } *hint = RWH_WRITE_LIFE_SHORT; int ret = fcntl(fd, F_SET_RW_HINT, hint); if (ret == -1) { goto err; } ... ... } ``` It seems we're just lucky on x86 and the `hint` pointer just happens to be initialised with a valid address. It should be quite trivial to fix this by keeping `hint` on the stack and get its address when calling `fcntl`. This test was introduced with https://gitlab.com/samba-team/samba/-/commit/5084a69de14f24e9d804998580eefcba773fdd5a#e8f66f9cd3a87b4632d92dff7ac45138d5a832d2_1122_1180, and I could find another commit that tries to fix leaving a stale file behind, presumably because of a crash: https://gitlab.com/samba-team/samba/-/merge_requests/1253. Thanks! Hopefully I'm filing this bug under the correct component, apologies if not! I'm not very familiar with samba itself. Pierre
This bug was referenced in samba master: 454ccd986b61799908a6898a55d0480911f15306
Created attachment 16471 [details] backported fix for 4.13
Pushed to autobuild-v4-13-test.
This bug was referenced in samba v4-13-test: 9806b67ee4c2dd4e1ef42b03517c0ffda40f2ace
Pushed to v4-13-test and already included in v4-14-test. Closing out bug report. Thanks!
This bug was referenced in samba v4-13-stable (Release samba-4.13.5): 9806b67ee4c2dd4e1ef42b03517c0ffda40f2ace