Build failure with xlc 13.1.3, designated initializer bug AIX Version: 7100-03-05-1524 XLC Version: 13.01.0003.0000 Samba Version: 4.3.5 [1927/3435] Compiling source4/torture/smb2/lock.c "../source4/torture/smb2/lock.c", line 2897.35: 1506-196 (S) Initialization between types "unsigned long long" and "struct smb2_handle" is not allowed. "../source4/torture/smb2/lock.c", line 2919.35: 1506-196 (S) Initialization between types "unsigned long long" and "struct smb2_handle" is not allowed. Waf: Leaving directory `/usr/src/samba-4.3.5/bin' Build failed: -> task failed (err #1): {task: cc lock.c -> lock_1.o} make: 1254-004 The error code from the last command is 1. Stop. This is a bug in xlc, a PMR has been opened to get it fixed. Adding curly brackets around the problematic fields fixes the bug (see patch). Is this too simple a fix? I considered using #ifs but 5 lines for a syntactic problem seemed too gross for me. Eg (not tested): #define IBMC_COMPAT_INITIALIZERS 1313 [...] #if defined(__IMBC__) && __IBMC__ <= IBMC_COMPAT_INITIALIZERS .context = {.pid = pid}, #else .context.pid = pid, #endif
Created attachment 11866 [details] Proposed patch
This also applies to Samba 4.4.3 with xlc compiler 13.1.3 This patch works correctly
Per discussion on samba-technical, this won't be fixed in Samba, we require this feature and will instead hope XLC supports this soon. https://lists.samba.org/archive/samba-technical/2016-March/112679.html