This repository was archived by the owner on Nov 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 509
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Build fails for armv9 #6159
Copy link
Copy link
Open
Labels
Type: BugA previously unknown bug in PMDKA previously unknown bug in PMDK
Description
ISSUE: Build fails for armv9
Environment Information
- PMDK package version(s): 2.1.1
- OS(es) version(s): openSUSE Tumbleweed
- ndctl version(s): 2.1
- kernel version(s): 6.17
- compiler, libraries, packaging and other related tools version(s): gcc15
Please provide a reproduction of the bug:
Try to build for aarch64, but with -march=armv9-a and you will get a build failure. (See details below)
How often bug is revealed: (always, often, rare):
Always
Actual behavior:
Fails to build.
Expected behavior:
Should succeed.
Details
Build log:
[ 15s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/pmdk-2.1.1-build/pmdk-2.1.1/src/libpmem2'
[ 15s] cc -MD -c -o ../nondebug/libpmem2/init.o -std=gnu99 -Wall -Werror -Wmissing-prototypes -Wpointer-arith -Wsign-conversion -Wsign-compare -Wunused-parameter -fstack-usage -Wconversion -Wunused-macros -Wmissing-field-initializers -Wmissing-variable-declarations -Wfloat-equal -Wswitch-default -Wcast-function-type -DSTRINGOP_TRUNCATION_SUPPORTED -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=gnu99 -fno-common -pthread -DSRCVERSION=\"2.1.1\" -fno-lto -DSDS_ENABLED -DNDCTL_ENABLED=1 -Wno-error -mbranch-protection=standard -march=armv9-a -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -Iaarch64 -I. -I../include -I../common/ -I../core/ -fPIC ../../src/../src/libpmem2/aarch64/init.c
[ 15s] /tmp/cc4LxSBl.s: Assembler messages:
[ 15s] /tmp/cc4LxSBl.s:232: Error: selected processor does not support `retaa'
[ 15s] make[2]: *** [../Makefile.inc:290: ../nondebug/libpmem2/init.o] Error 1
[ 15s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/pmdk-2.1.1-build/pmdk-2.1.1/src/libpmem2'
[ 15s] make[2]: *** Waiting for unfinished jobs....
[ 15s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/pmdk-2.1.1-build/pmdk-2.1.1/src/libpmem2'
[ 15s] cc -MD -c -o ../nondebug/libpmem2/log_default.o -std=gnu99 -Wall -Werror -Wmissing-prototypes -Wpointer-arith -Wsign-conversion -Wsign-compare -Wunused-parameter -fstack-usage -Wconversion -Wunused-macros -Wmissing-field-initializers -Wmissing-variable-declarations -Wfloat-equal -Wswitch-default -Wcast-function-type -DSTRINGOP_TRUNCATION_SUPPORTED -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=gnu99 -fno-common -pthread -DSRCVERSION=\"2.1.1\" -fno-lto -DSDS_ENABLED -DNDCTL_ENABLED=1 -Wno-error -mbranch-protection=standard -march=armv9-a -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -Iaarch64 -I. -I../include -I../common/ -I../core/ -fPIC ../../src/../src/core/log_default.c
[ 15s] ../../src/../utils/check-os.sh ../../src/../utils/os-banned ../nondebug/libpmem2/log_default.o ../../src/../src/core/log_default.c
[ 15s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/pmdk-2.1.1-build/pmdk-2.1.1/src/libpmem2'
[ 15s] make[1]: *** [Makefile:129: libpmem2] Error 2
[ 15s] make[1]: *** Waiting for unfinished jobs....
[ 15s] make[2]: Entering directory '/home/abuild/rpmbuild/BUILD/pmdk-2.1.1-build/pmdk-2.1.1/src/libpmem'
[ 15s] cc -MD -c -o ../nondebug/libpmem/init.o -std=gnu99 -Wall -Werror -Wmissing-prototypes -Wpointer-arith -Wsign-conversion -Wsign-compare -Wunused-parameter -fstack-usage -Wconversion -Wunused-macros -Wmissing-field-initializers -Wmissing-variable-declarations -Wfloat-equal -Wswitch-default -Wcast-function-type -DSTRINGOP_TRUNCATION_SUPPORTED -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=gnu99 -fno-common -pthread -DSRCVERSION=\"2.1.1\" -fno-lto -DSDS_ENABLED -DNDCTL_ENABLED=1 -Wno-error -mbranch-protection=standard -march=armv9-a -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -Iaarch64 -I. -I../../src/../src/libpmem2 -I../include -I../common/ -I../core/ -fPIC ../../src/../src/libpmem2/aarch64/init.c
[ 15s] /tmp/ccBmih6V.s: Assembler messages:
[ 15s] /tmp/ccBmih6V.s:232: Error: selected processor does not support `retaa'
[ 15s] make[2]: *** [../Makefile.inc:289: ../nondebug/libpmem/init.o] Error 1
This is because of asm volatile(".arch armv8.2-a\n dc cvap, %0" : : "r" (p) : "memory"); from https://github.com/pmem/pmdk/blob/master/src/libpmem2/aarch64/arm_cacheops.h#L61
MariaDB faced this issue as well and fixed it in MariaDB/server#3677 (not sure why they used armv9.4 instead of 9.0, though)
Additional information about Priority and Help Requested:
Are you willing to submit a pull request with a proposed change? (Yes, No)
Requested priority: (Showstopper, High, Medium, Low)
Metadata
Metadata
Assignees
Labels
Type: BugA previously unknown bug in PMDKA previously unknown bug in PMDK