Closed
Description
OpenWrt updated musl to 1.2.4 and we are seeing this build failure with ooni/probe-cli (which uses go-sqlite3):
sqlite3-binding.c:35911:42: error: 'pread64' undeclared here (not in a function); did you mean 'pread'?
35911 | { "pread64", (sqlite3_syscall_ptr)pread64, 0 },
| ^~~~~~~
| pread
sqlite3-binding.c:35929:42: error: 'pwrite64' undeclared here (not in a function); did you mean 'pwrite'?
35929 | { "pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 },
| ^~~~~~~~
| pwrite
sqlite3-binding.c: In function 'seekAndRead':
sqlite3-binding.c:35915:49: error: unknown type name 'off64_t'; did you mean 'off_t'?
35915 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
| ^~~~~~~
sqlite3-binding.c:38777:11: note: in expansion of macro 'osPread64'
38777 | got = osPread64(id->h, pBuf, cnt, offset);
| ^~~~~~~~~
sqlite3-binding.c:35915:58: error: expected ')' before 'aSyscall'
35915 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
| ~ ^~~~~~~~
sqlite3-binding.c:38777:11: note: in expansion of macro 'osPread64'
38777 | got = osPread64(id->h, pBuf, cnt, offset);
| ^~~~~~~~~
sqlite3-binding.c: In function 'seekAndWriteFd':
sqlite3-binding.c:35933:57: error: unknown type name 'off64_t'; did you mean 'off_t'?
35933 | #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
| ^~~~~~~
sqlite3-binding.c:38906:17: note: in expansion of macro 'osPwrite64'
38906 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
sqlite3-binding.c:35934:21: error: expected ')' before 'aSyscall'
35934 | aSyscall[13].pCurrent)
| ^~~~~~~~
sqlite3-binding.c:38906:17: note: in expansion of macro 'osPwrite64'
38906 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
sqlite3-binding.c:35933:21: note: to match this '('
35933 | #define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
| ^
sqlite3-binding.c:38906:17: note: in expansion of macro 'osPwrite64'
38906 | do{ rc = (int)osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
| ^~~~~~~~~~
(This is from a PR for the current version of probe-cli which uses 1.14.16; we are also seeing very similar errors when building an older version of probe-cli which uses 1.14.15.)
This is because in musl 1.2.4, LFS64 interfaces were marked as deprecated (release notes, commit).
Perhaps HAVE_PREAD
/HAVE_PWRITE
can be set instead of HAVE_PREAD64
/HAVE_PWRITE64
in sqlite3.go?
Metadata
Metadata
Assignees
Labels
No labels