Yocto build of Qt6 on StarFive VisionFive 2 - 'Error: unrecognized opcode `pause', extension `zihintpause' required'

89 views
Skip to first unread message

RISC-V SW Dev

unread,
Sep 18, 2023, 4:35:36 PM9/18/23
to RISC-V SW Dev
Hello all,

I've successfully made a Poky image using Yocto (& meta-riscv) for the StarFive VisionFive 2 board.

As Qt is one of the go-to applications for embedded GUI devices I'm interested to see if its possible to build it for this board (a similar process can achieved for the RPi4). Naturally the VisionFive 2 board isn't officially supported by the Qt company so this process may end up hugely complex & frustrating.
 
I've made a start trying to compile qtbase but I'm getting the following:

When trying to compile{standard input}: Assembler messages:
{standard input}:6003: Error: unrecognized opcode `pause', extension `zihintpause' required
{standard input}:6302: Error: unrecognized opcode `pause', extension `zihintpause' required

When trying to compile qlogging.cpp. Would anyone have an idea the reason? 

Thanks,

Owen

Tommy Murphy

unread,
Sep 18, 2023, 4:45:41 PM9/18/23
to RISC-V SW Dev, RISC-V SW Dev
Have you tried passing `-march=..._zihintpause` to the compiler where `...` is the architecture that is currently being passed or the toolchain default arch if no explicit `-march=` is provided?

Electronic Consult

unread,
Sep 18, 2023, 4:54:46 PM9/18/23
to RISC-V SW Dev, tommy_...@hotmail.com, Electronic Consult
Thanks for the response,

The build output is below, no '-march' flag is passed, I'll try patching the recipe & see if I can include it somehow..


/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot-native/usr/bin/riscv64-poky-linux/riscv64-poky-linux-g++ --sysroot=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot -DBACKTRACE_HEADER=\"execinfo.h\" -DCore_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib/Core_autogen/include -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/include -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/include/QtCore -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib/global -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib/kernel -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib/../3rdparty/tinycbor/src -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/include/QtCore/6.7.0 -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/include/QtCore/6.7.0/QtCore -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib/../3rdparty/double-conversion/double-conversion -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib/../3rdparty/double-conversion -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib/../3rdparty/forkfd -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib/.rcc -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/mkspecs/linux-g++ -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot/usr/include/glib-2.0 -I/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot/usr/lib/glib-2.0/include -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git=/usr/src/debug/qtbase/6.7.0-r0  -fdebug-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git=/usr/src/debug/qtbase/6.7.0-r0  -fmacro-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build=/usr/src/debug/qtbase/6.7.0-r0  -fdebug-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build=/usr/src/debug/qtbase/6.7.0-r0  -fdebug-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot=  -fmacro-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot=  -fdebug-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/recipe-sysroot-native=   -fmacro-prefix-map=/home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/image=  -fvisibility-inlines-hidden -DNDEBUG -O3 -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wsuggest-override -Winvalid-pch -include /home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/build/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o -MF src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o.d -o src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o -c /home/projects/yocto/build-riscv/build/tmp/work/riscv64-poky-linux/qtbase/6.7.0/git/src/corelib/global/qlogging.cpp

{standard input}: Assembler messages:
{standard input}:6003: Error: unrecognized opcode `pause', extension `zihintpause' required
{standard input}:6302: Error: unrecognized opcode `pause', extension `zihintpause' required

Khem Raj

unread,
Sep 18, 2023, 5:25:10 PM9/18/23
to RISC-V SW Dev, RISC-V SW Dev
I would suggest to use latest master branches of yocto layers.
Secondly, I have it building working QT6 image ( yoe-kiosk-image )
here
https://github.com/yoedistro/yoe-distro

This will use clang to compile the full system.

>
> Thanks,
>
> Owen
>
> --
> You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
> To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/c75da3a8-d2c1-4a7b-b85a-825e1667d131n%40groups.riscv.org.

Tommy Murphy

unread,
Sep 18, 2023, 5:28:45 PM9/18/23
to Electronic Consult, RISC-V SW Dev, Electronic Consult
You should be able to see what the default arch is for the toolchain using `riscv64-poky-linux-g++ -dumpspecs`. It's usually rv64gc or maybe rv64gc_zicsr or rv64gc_zicsr_zifencei. Whatever it is try appending `_zihintpause` to the default and passing it using `-march=` when compiling code that depends on the zihintpause extension.


Electronic Consult

unread,
Sep 19, 2023, 11:48:27 AM9/19/23
to Khem Raj, RISC-V SW Dev
Thanks, I'm using the latest branches as far as I can see..

I'll take a look, good to know it's possible!

RISC-V SW Dev

unread,
Sep 19, 2023, 12:20:38 PM9/19/23
to RISC-V SW Dev, RISC-V SW Dev, RISC-V SW Dev
I got:

*multilib_defaults:
march=rv64imafdc_zicsr_zifencei mabi=lp64d

Will try rebuilding it with _zihintpause
Reply all
Reply to author
Forward
0 new messages