BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: mat999(at)gmail(dot)com
Subject: BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar
Date: 2025-03-12 05:40:28
Message-ID: 18839-7615d0f8267dc015@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 18839
Logged by: Mathew
Email address: mat999(at)gmail(dot)com
PostgreSQL version: 14.17
Operating system: Debian
Description:

Changes made to support hardware CRC seem to have broken ARMv7 builds for
us.

When building we are now getting:

```
pg_crc32c_armv8.c:(.text+0x40): undefined reference to `__crc32cw'
/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x6c): undefined reference to
`__crc32cw'
/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x7a): undefined reference to
`__crc32ch'
/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x92): undefined reference to
`__crc32cd'
/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x8a): undefined reference to
`__crc32cb'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:66: postgres] Error 1
make[1]: *** [Makefile:42: all-backend-recurse] Error 2
make: *** [GNUmakefile:11: all-src-recurse] Error 2", "stderr_lines":
["pg_crc32c_armv8.c: In function ‘pg_comp_crc32c_armv8’:",
"pg_crc32c_armv8.c:35:23: warning: implicit declaration of function
‘__crc32cb’ [-Wimplicit-function-declaration]", " 35 | crc
= __crc32cb(crc, *p);", " | ^~~~~~~~~",
"pg_crc32c_armv8.c:41:23: warning: implicit declaration of function
‘__crc32ch’ [-Wimplicit-function-declaration]", " 41 | crc
= __crc32ch(crc, *(uint16 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:47:23: warning: implicit declaration of
function ‘__crc32cw’ [-Wimplicit-function-declaration]", " 47 |
crc = __crc32cw(crc, *(uint32 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:54:23: warning: implicit declaration of
function ‘__crc32cd’ [-Wimplicit-function-declaration]", " 54 |
crc = __crc32cd(crc, *(uint64 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c: In function ‘pg_comp_crc32c_armv8’:",
"pg_crc32c_armv8.c:35:23: warning: implicit declaration of function
‘__crc32cb’ [-Wimplicit-function-declaration]", " 35 | crc
= __crc32cb(crc, *p);", " | ^~~~~~~~~",
"pg_crc32c_armv8.c:41:23: warning: implicit declaration of function
‘__crc32ch’ [-Wimplicit-function-declaration]", " 41 | crc
= __crc32ch(crc, *(uint16 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:47:23: warning: implicit declaration of
function ‘__crc32cw’ [-Wimplicit-function-declaration]", " 47 |
crc = __crc32cw(crc, *(uint32 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:54:23: warning: implicit declaration of
function ‘__crc32cd’ [-Wimplicit-function-declaration]", " 54 |
crc = __crc32cd(crc, *(uint64 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c: In function ‘pg_comp_crc32c_armv8’:",
"pg_crc32c_armv8.c:35:23: warning: implicit declaration of function
‘__crc32cb’ [-Wimplicit-function-declaration]", " 35 | crc
= __crc32cb(crc, *p);", " | ^~~~~~~~~",
"pg_crc32c_armv8.c:41:23: warning: implicit declaration of function
‘__crc32ch’ [-Wimplicit-function-declaration]", " 41 | crc
= __crc32ch(crc, *(uint16 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:47:23: warning: implicit declaration of
function ‘__crc32cw’ [-Wimplicit-function-declaration]", " 47 |
crc = __crc32cw(crc, *(uint32 *) p);", " |
^~~~~~~~~", "pg_crc32c_armv8.c:54:23: warning: implicit declaration of
function ‘__crc32cd’ [-Wimplicit-function-declaration]", " 54 |
crc = __crc32cd(crc, *(uint64 *) p);", " |
^~~~~~~~~", "/usr/bin/ld:
../../src/port/libpgport_srv.a(pg_crc32c_armv8_srv.o): in function
`pg_comp_crc32c_armv8':", "pg_crc32c_armv8.c:(.text+0x16): undefined
reference to `__crc32cb'", "/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x2a):
undefined reference to `__crc32ch'", "/usr/bin/ld:
pg_crc32c_armv8.c:(.text+0x40): undefined reference to `__crc32cw'",
"/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x6c): undefined reference to
`__crc32cw'", "/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x7a): undefined
reference to `__crc32ch'", "/usr/bin/ld: pg_crc32c_armv8.c:(.text+0x92):
undefined reference to `__crc32cd'", "/usr/bin/ld:
pg_crc32c_armv8.c:(.text+0x8a): undefined reference to `__crc32cb'",
"collect2: error: ld returned 1 exit status"
```

It seems like the configure test is passing when it shouldnt. This CPU does
not support hardware CRC32.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dean Rasheed 2025-03-12 10:16:13 Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE
Previous Message Bruce Momjian 2025-03-12 01:56:03 Re: Query result differences between PostgreSQL 17 vs 16