The mass rebuild of OpenChange [1] shows a failure of the build due to reference to memset_s() in macros provided by samba. Part of the error message is here [3]. Am I able to do anything about it in the openchange package? Eventually, am I supposed to do anything with it at all? I mean, it feels like a regression, but I do not know whether the memset_s() had been used in those macros before. If the memset_s() requires any special defines being defined, then those should be added by samba headers. I tried to move ndr.h include as the first include in the openchange's ndr_mapi.c file, but it didn't help at all [2]. My idea was that maybe something includes string.h before samba has a chance to influence it, but it was not it. [1] https://koji.fedoraproject.org/koji/taskinfo?taskID=32428399 [2] https://koji.fedoraproject.org/koji/taskinfo?taskID=32531263 [3] Part of the build log from [1]: Compiling ndr_mapi.c with -fPIC BUILDSTDERR: In file included from /usr/include/samba-4.0/ndr.h:29, BUILDSTDERR: from /usr/include/samba-4.0/dcerpc.h:32, BUILDSTDERR: from libmapi/libmapi.h:45, BUILDSTDERR: from ndr_mapi.c:22: BUILDSTDERR: ndr_mapi.c: In function 'ndr_pull_EcDoRpc': BUILDSTDERR: /usr/include/samba-4.0/util/memory.h:54:24: warning: implicit declaration of function 'memset_s'; did you mean 'memset'? [-Wimplicit-function-declaration] BUILDSTDERR: 54 | #define ZERO_STRUCT(x) memset_s((char *)&(x), sizeof(x), 0, sizeof(x)) BUILDSTDERR: | ^~~~~~~~ BUILDSTDERR: ndr_mapi.c:924:3: note: in expansion of macro 'ZERO_STRUCT' BUILDSTDERR: 924 | ZERO_STRUCT(r->out); BUILDSTDERR: | ^~~~~~~~~~~ . . . BUILDSTDERR: /usr/bin/ld: libmapi-openchange.so.2.3: undefined reference to `memset_s' BUILDSTDERR: collect2: error: ld returned 1 exit status BUILDSTDERR: make: *** [Makefile:450: bin/libmapixx-test] Error 1 BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.aoXFCs (%build)
Could you please open an upsteam bug too?
Here you are: https://bugzilla.samba.org/show_bug.cgi?id=13778
*** Bug 1673312 has been marked as a duplicate of this bug. ***
Patches at: https://gitlab.com/samba-team/samba/merge_requests/238
Inside of Samba memset_s() is available as we offer an implementation for it. However it is not available publicly.
*** Bug 1675576 has been marked as a duplicate of this bug. ***
*** Bug 1671507 has been marked as a duplicate of this bug. ***
This has been fixed in rawhide.
upstream patch for openchange 2.3 https://git.pld-linux.org/?p=packages/openchange.git;a=blob;f=openchange-samba-4.10-macros.patch;h=0e8e2b915673c1413edbadadd6076e665e6feaa0;hb=f28b8ba49a90595347fb6a401e7dfb87b857e600
I do not think it's an upstream fix, there is a note at the top of the page saying: > - added covscan,samba-4.10-macros patches from Fedora where the important part is "from Fedora". The fix was supposed to be in samba, and it had been done in samba, almost two years ago. The referenced patch only replaces the macro in OpenChange with an equivalent, due to it being removed from the samba public API.
(In reply to Milan Crha from comment #11) > I do not think it's an upstream fix, there is a note at the top of the page > saying: > > - added covscan,samba-4.10-macros patches from Fedora > where the important part is "from Fedora". > > The fix was supposed to be in samba, and it had been done in samba, almost > two years ago. > > The referenced patch only replaces the macro in OpenChange with an > equivalent, due to it being removed from the samba public API. Sorry, my mistake! the patch referenced just resolve a similar building error. --!