Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6.21, 10.11.11
Description
While shipping latest February 2025 security updates to Ubuntu it was noticed that the riscv64 builds failed:
https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2099785
[ 20%] Building C object mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o
|
cd /<<PKGBUILDDIR>>/builddir/mysys && /usr/bin/cc -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I/<<PKGBUILDDIR>>/wsrep-lib/include -I/<<PKGBUILDDIR>>/wsrep-lib/wsrep-API/v26 -I/<<PKGBUILDDIR>>/builddir/include -I/<<PKGBUILDDIR>>/include/providers -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/mysys -g -O2 -fno-omit-frame-pointer -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/mariadb-1:10.11.11-0ubuntu0.24.04.1 -Wdate-time -D_FORTIFY_SOURCE=3 -Wdate-time -D_FORTIFY_SOURCE=3 -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -O3 -g -DNDEBUG -g -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -fno-omit-frame-pointer -DDBUG_OFF -Wall -Wdeclaration-after-statement -Wenum-compare -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Wvla -Wwrite-strings -std=gnu99 -Wdate-time -D_FORTIFY_SOURCE=3 -fPIC -MD -MT mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o -MF CMakeFiles/mysys.dir/lf_alloc-pin.c.o.d -o CMakeFiles/mysys.dir/lf_alloc-pin.c.o -c /<<PKGBUILDDIR>>/mysys/lf_alloc-pin.c
|
/tmp/cclf2UNo.s: Assembler messages:
|
/tmp/cclf2UNo.s:265: Error: unrecognized opcode `pause', extension `zihintpause' required
|
/tmp/cclf2UNo.s:1168: Error: unrecognized opcode `pause', extension `zihintpause' required
|
make[4]: *** [mysys/CMakeFiles/mysys.dir/build.make:1367: mysys/CMakeFiles/mysys.dir/lf_alloc-pin.c.o] Error 1
|
[ 12%] Building C object storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/id.c.o
|
In file included from /<<PKGBUILDDIR>>/mysys/lf_hash.cc:30:
|
/<<PKGBUILDDIR>>/include/my_cpu.h: In function ‘void MY_RELAX_CPU()’:
|
/<<PKGBUILDDIR>>/include/my_cpu.h:100:3: error: ‘__builtin_riscv_pause’ was not declared in this scope; did you mean ‘__builtin_riscv_fsflags’?
|
100 | __builtin_riscv_pause();
|
| ^~~~~~~~~~~~~~~~~~~~~
|
| __builtin_riscv_fsflags
|
Can you marko advise how we could patch the source of 10.11.11 and 10.6.21 so that the riscv64 builders in Ubuntu 24.04 and 22.04 respectively work?
Attachments
Issue Links
- is caused by
-
MDEV-35827 The generic MY_RELAX_CPU is expensive
-
- Closed
-
otto, while the community pull request may feel a bit hacky, it is more portable than my initial suggestion, because it should work with any reasonably recent clang or GCC version. Can you please test it? Just replace the compiler builtin function with the following: