Closed Bug 1636542 Opened 4 years ago Closed 1 year ago

icecc: Compilation error "use of unknown builtin '__builtin___strlcat_chk'" occurs when compiling sqlite3.c on macOS

Categories

(Firefox Build System :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: jwatt, Unassigned)

References

Details

After updating to clang 10, I now get this build error when building with icecc about 7 minutes into the build. It's not clear to me what's going wrong, especially since I don't understand how icecc works given that icecc-create-env doesn't bundle up any headers when creating the toolchain archives. Anyway, filing this so it's on record. The error is:

 1:45.01 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40086:11: error: use of unknown builtin '__builtin___strlcat_chk' [-Wimplicit-function-declaration]
 1:45.01     len = strlcat(lPath, "sqliteplocks", maxLen);
 1:45.01           ^
 1:45.01 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
 1:45.02   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
 1:45.02   ^
 1:45.02 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40094:11: error: use of unknown builtin '__builtin___strlcat_chk' [-Wimplicit-function-declaration]
 1:45.02     len = strlcat(lPath, "/", maxLen);
 1:45.02           ^
 1:45.02 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
 1:45.02   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
 1:45.02   ^
 1:45.02 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40104:3: error: use of unknown builtin '__builtin___strlcat_chk' [-Wimplicit-function-declaration]
 1:45.02   strlcat(lPath, ":auto:", maxLen);
 1:45.18   ^
 1:45.18 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat'
 1:45.18   __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
 1:45.18   ^
 1:45.18 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40303:13: error: use of unknown builtin '__builtin___strlcpy_chk' [-Wimplicit-function-declaration]
 1:45.18   pathLen = strlcpy(tPath, cPath, MAXPATHLEN);
 1:45.18             ^
 1:45.18 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.27   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.27   ^
 1:45.27 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40303:13: note: did you mean '__builtin___memcpy_chk'?
 1:45.27 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.27   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.27   ^
 1:45.27 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:23044:5: note: '__builtin___memcpy_chk' declared here
 1:45.27     memcpy(zBufOut, &sqlite3Config.iPrngSeed, nByte);
 1:45.27     ^
 1:45.27 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:65:3: note: expanded from macro 'memcpy'
 1:45.27   __builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))
 1:45.27   ^
 1:45.27 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40545:11: error: use of unknown builtin '__builtin___strlcpy_chk' [-Wimplicit-function-declaration]
 1:45.27           strlcpy(&writeBuffer[PROXY_PATHINDEX], pCtx->lockProxyPath,
 1:45.28           ^
 1:45.28 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.28   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.28   ^
 1:45.28 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40548:11: error: use of unknown builtin '__builtin___strlcpy_chk' [-Wimplicit-function-declaration]
 1:45.28           strlcpy(&writeBuffer[PROXY_PATHINDEX], tempLockPath, MAXPATHLEN);
 1:45.28           ^
 1:45.28 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.28   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.31   ^
 1:45.31 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40758:5: error: use of unknown builtin '__builtin___strlcpy_chk' [-Wimplicit-function-declaration]
 1:45.31     strlcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath,
 1:45.31     ^
 1:45.31 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.31   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.31   ^
 1:45.31 /Users/jwatt/mozilla/trees/u2/third_party/sqlite3/src/sqlite3.c:40770:5: error: use of unknown builtin '__builtin___strlcpy_chk' [-Wimplicit-function-declaration]
 1:45.31     strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN);
 1:45.31     ^
 1:45.31 /Users/jwatt/macOS-SDK-archive/MacOSX10.11.sdk/usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy'
 1:45.32   __builtin___strlcpy_chk (dest, src, len, __darwin_obsz (dest))
 1:45.32   ^
 1:45.32 8 errors generated.
 1:45.32 make[4]: *** [sqlite3.o] Error 1
 1:45.32 make[3]: *** [third_party/sqlite3/src/target-objects] Error 2
 1:45.32 make[3]: *** Waiting for unfinished jobs....

This doesn't really block bug 1616692, but marking the dependency to make it easier to find this bug.

Just to confirm [not knowing a whole lot about icecc], the distributed machines are running the same clang 10 that you just installed locally, right?

Priority: -- → P5

Closing due to inactivity. I'm assuming the problem was probably as speculated above (compiler version mismatch between the distributed machines).

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
Severity: -- → S4
You need to log in before you can comment on or make changes to this bug.