Berto Furth
2022-Mar-08 23:41 UTC
[Samba] Trouble cross compiling samba 4.15.5 for arm32. Problem with samba-bgqd.c
Hi Samba people, I have been able to successfully cross compile samba 4.14.12 for arm32 however if I try to cross compile samba 4.15.5 I get an error as follows in the make stage. The issue seems to be with newly introduced source file "source3/printing/samba-bgqd.c" ../../source3/printing/samba-bgqd.c: In function ?main?: ../../source3/printing/samba-bgqd.c:340:28: error: ?SIGPIPE? undeclared (first use in this function); did you mean ?SNDPIPE?? 340 | BlockSignals(true, SIGPIPE); | ^~~~~~~ | SNDPIPE ../../source3/printing/samba-bgqd.c:340:28: note: each undeclared identifier is reported only once for each function it appears in In file included from ../../source3/locking/share_mode_lock.h:20, from ../../source3/printing/samba-bgqd.c:21: ../../source3/printing/samba-bgqd.c:384:28: error: ?SIGTERM? undeclared (first use in this function) 384 | ev, frame, SIGTERM, 0, bgqd_sig_term_handler, &done); | ^~~~~~~ ../../lib/tevent/tevent.h:412:41: note: in definition of macro ?tevent_add_signal? 412 | _tevent_add_signal(ev, mem_ctx, signum, sa_flags, handler, private_data, \ | ^~~~~~ The problem can be fixed by adding the following include directive to "source3/printing/samba-bgqd.c" #include <signal.h> However, I wonder if there could be something else I need to check. Any advice? I'm using gcc 11.2.0 and cross compiling using OpenSUSE Tumbleweed on both PC and Raspberry Pi. I have no problems doing a native build of samba 4.15.5 on either of those build hosts. Thanks very much for your help. Berto.