You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Ubuntu 22.04 using the t2a machine series on Google cloud (Arm Neoverse N1 CPU) the compile fails because ha_rocksdb.h includes my_checksum.h and this code in my_checksum.h uses PunnedCrc32 and PunnedCrc32 uses memcpy, but my_checksum.h doesn't include <string.h> prior to using my_checksum.
Upstream builds don't have a problem from this, at least not yet, because they appear to include string.h prior to including my_checksum.h in files that use my_checksum.
In file included from /home/mcallaghan/fbmysql-56/storage/rocksdb/./ha_rocksdb.h:32,
from /home/mcallaghan/fbmysql-56/storage/rocksdb/ha_rocksdb.cc:24:
/home/mcallaghan/fbmysql-56/include/my_checksum.h: In instantiation of ‘uint32_t mycrc32::PunnedCrc32(uint32_t, const unsigned char*, size_t) [with PT = long unsigned int; uint32
_t = unsigned int; size_t = long unsigned int]’:
/home/mcallaghan/fbmysql-56/include/my_checksum.h:118:47: required from here
/home/mcallaghan/fbmysql-56/include/my_checksum.h:93:11: error: ‘memcpy’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
93 | memcpy(&pv, buf, sizeof(PT));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/features.h:486,
from /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h:39,
from /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h:586,
from /usr/include/c++/11/bits/stl_algobase.h:59,
from /usr/include/c++/11/deque:60,
from /home/mcallaghan/fbmysql-56/storage/rocksdb/./ha_rocksdb.h:23,
from /home/mcallaghan/fbmysql-56/storage/rocksdb/ha_rocksdb.cc:24:
/usr/include/aarch64-linux-gnu/bits/string_fortified.h:26:1: note: ‘void* memcpy(void*, const void*, size_t)’ declared here, later in the translation unit
26 | __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
| ^~~~~
In file included from /home/mcallaghan/fbmysql-56/include/m_string.h:43,
from /home/mcallaghan/fbmysql-56/sql/debug_sync.h:35,
from /home/mcallaghan/fbmysql-56/storage/rocksdb/./rdb_iterator.h:22,
from /home/mcallaghan/fbmysql-56/storage/rocksdb/rdb_iterator.cc:17:
On Ubuntu 22.04 using the t2a machine series on Google cloud (Arm Neoverse N1 CPU) the compile fails because ha_rocksdb.h includes my_checksum.h and this code in my_checksum.h uses PunnedCrc32 and PunnedCrc32 uses memcpy, but my_checksum.h doesn't include <string.h> prior to using my_checksum.
Upstream builds don't have a problem from this, at least not yet, because they appear to include string.h prior to including my_checksum.h in files that use my_checksum.
My workaround is to include string.h:
The text was updated successfully, but these errors were encountered: