[MacPorts] #61063: mariadb-10.5: Undefined symbols for architecture x86_64: "_crc32_pclmul", "_crc32_pclmul_enabled"
MacPorts
noreply at macports.org
Tue Aug 25 17:58:41 UTC 2020
#61063: mariadb-10.5: Undefined symbols for architecture x86_64: "_crc32_pclmul",
"_crc32_pclmul_enabled"
---------------------------+-----------------------
Reporter: chrstphrchvz | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Resolution: | Keywords:
Port: mariadb-10.5 |
---------------------------+-----------------------
Comment (by kencu):
This appears to have something to do with the processor that is building
this. The missing function is defined in this file {{{crc32/crc32_x86.c}}}
That file is only included if the system can support the {{{pclmulqdq}}}
instruction, according to this bit in {{{mysys/CMakeLists.txt}}}
{{{
IF(NOT MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
#Check for PCLMUL instruction (x86)
CHECK_C_SOURCE_COMPILES("
int main()
{
asm volatile (\"pclmulqdq \\$0x00, %%xmm1, %%xmm0\":::\"cc\");
return 0;
}" HAVE_CLMUL_INSTRUCTION)
IF(HAVE_CLMUL_INSTRUCTION)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_x86.c)
ENDIF()
}}}
according to <https://en.wikipedia.org/wiki/Westmere_(microarchitecture)>
that instruction is available on Nehalem and greater processors, which I
am using. So presumably the 10.6 buildbot is on something less than a
Nehalem, and therefore fails.
The whole thing is controlled from {{{mysys/checksum.c}}}, and I think
that with a bit of thought, we could come up with a way to use the
fallbacks.
It seems though that this symbol should be weak linked, and fall through
to the final catch-all automatically.
I suspect that something with the weak-linking is not 100% right here.
--
Ticket URL: <https://trac.macports.org/ticket/61063#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list