Error on installing RISCV toolchain on Ubuntu 20.10 - riscv

I am trying to install riscv-toolchain on ubuntu 20.10. I got the error while .buidl.sh executes
Configuring project riscv-isa-sim
Building project riscv-isa-sim
./fesvr/dtm.cc: In member function ‘uint32_t dtm_t::get_xlen()’:
../fesvr/dtm.cc:488:16: error: ‘runtime_error’ is not a member of ‘std’
488 | throw std::runtime_error("FESVR DTM Does not support 128-bit");
| ^~~~~~~~~~~~~
../fesvr/dtm.cc:505:14: error: ‘runtime_error’ is not a member of ‘std’
505 | throw std::runtime_error("FESVR DTM can't determine XLEN. Aborting");
| ^~~~~~~~~~~~~
../fesvr/dtm.cc:506:1: warning: control reaches end of non-void function [-Wreturn-type]
506 | }
| ^

std::runtime_error is defined in stdexcept. normally you are missing #include <stdexcept>. However normally, this modification was done in the riscv-isa-sim 7 months ago. you are probably not using the last version.

Related

Unable to compile X11 with bitbake

I've added
DISTRO_FEATURES_append = " x11"
to my local.conf as I will need access to Xrandr (which depends on X11). As soon as I add x11 to the DISTRO_FEATURES, I keep getting the following when invoking bitbake:
| checking for GLAMOR... yes
| checking for GBM... no
| configure: error: Glamor for Xorg requires gbm >= 10.2.0
| NOTE: The following config.log files may provide further information.
| NOTE: /home/yocto/rzg_vlp_v3.0.0/build/tmp/work/aarch64-poky-linux/xserver-xorg/2_1.20.8-r0/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/yocto/rzg_vlp_v3.0.0/build/tmp/work/aarch64-poky-linux/xserver-xorg/2_1.20.8-r0/temp/run.do_configure.143696' failed with exit code 1
ERROR: Task (/home/yocto/rzg_vlp_v3.0.0/build/../poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4840 tasks of which 4796 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/yocto/rzg_vlp_v3.0.0/build/../poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.20.8.bb:do_configure
libgbm on openembedded.org appears to be at version 10.0 only: https://layers.openembedded.org/layerindex/recipe/131409/
How can I get this resolved?
One way to fix it is to change the xserver-xorg's PACKAGECONFIG and remove the need for GBM.
Looking at the poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc, GBM is only mentioned in this line:
PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy virtual/libgbm,libegl"
Sadly, just removing the virtual/libgbm is not enough and you also need to disable glamor completely while keeping the libepoxy package.
So I suggest you create a xserver-xorg_1.20.8.bbappend file which the following content:
PACKAGECONFIG[glamor] = "--disable-glamor,--disable-glamor,libepoxy,libegl"
I know it is a hack. But it fixes your issue

Ros2 Colcon build failed ,rclpy -error: 'PyErr_warnformat' was not decleared in the scope

Trying to install Ros2 humble in ubuntu 20.04,
while executing command --> Colcon build --symlink-install
I'm getting the following error
--- stderr: rclpy
In file included from /home/kalyan/ros2_humble/src/ros2/rclpy/rclpy/src/rclpy/node.hpp:24,
from /home/kalyan/ros2_humble/src/ros2/rclpy/rclpy/src/rclpy/action_client.hpp:26,
from /home/kalyan/ros2_humble/src/ros2/rclpy/rclpy/src/rclpy/_rclpy_pybind11.cpp:24:
/home/kalyan/ros2_humble/src/ros2/rclpy/rclpy/src/rclpy/context.hpp: In destructor ‘rclpy::InitOptions::~InitOptions()’:
/home/kalyan/ros2_humble/src/ros2/rclpy/rclpy/src/rclpy/context.hpp:49:7: error: ‘PyErr_WarnFormat’ was not declared in this scope; did you mean ‘PyErr_Format’?
49 | PyErr_WarnFormat(
| ^~~~~~
| PyErr_Format
make[2]: * [CMakeFiles/_rclpy_pybind11.dir/build.make:76: CMakeFiles/_rclpy_pybind11.dir/src/rclpy/_rclpy_pybind11.cpp.o] Error 1
make[1]: * [CMakeFiles/Makefile2:104: CMakeFiles/_rclpy_pybind11.dir/all] Error 2
make: * [Makefile:141: all] Error 2
---
Failed <<< rclpy [16.2s, exited with code 2]
Aborted <<< rclcpp [26.0s]
Aborted <<< ros2cli_test_interfaces [1min 29s]
Aborted <<< diagnostic_msgs [1min 32s]
Summary: 195 packages finished [4min 31s]
1 package failed: rclpy
3 packages aborted: diagnostic_msgs rclcpp ros2cli_test_interfaces
1 package had stderr output: rclpy
141 packages not processed
Help me to overcome this error.
pyhton3 version-->3.8.10
I have the python3.9 version too,
if python version < 3.2, it dose not have PyErr_WarnFormat().seehttps://docs.python.org/3/c-api/exceptions.html.
I delete /usr/include/python2.7/ and make the default python version is 3.8.10. It work for me.

Kitties tutorial part 1 build is failing with unresolved import for sc_client_api RemoteBackend, anyone faced this issue?

I just followed the tutorial, I am at the first
cargo build --release
This is the error I am getting, any idea why this would happen?
error[E0432]: unresolved import `sc_client_api::RemoteBackend`
--> node/src/service.rs:4:39
|
4 | use sc_client_api::{ExecutorProvider, RemoteBackend};
| ^^^^^^^^^^^^^
| |
| no `RemoteBackend` in the root
| help: a similar name exists in the module: `StateBackend`
I solved this by removing RemoteBackend from the import at node/src/service.rs.
Just change the line (for me it was Line 4) at node/src/service.rs from
use sc_client_api::{ExecutorProvider, RemoteBackend};
to
use sc_client_api::ExecutorProvider;
While working with the tutorial cargo build --release resulted in the following error message:
error[E0432]: unresolved import `sc_client_api::RemoteBackend`
--> node/src/service.rs:4:39
|
4 | use sc_client_api::{ExecutorProvider, RemoteBackend};
| ^^^^^^^^^^^^^
| |
| no `RemoteBackend` in the root
| help: a similar name exists in the module: `StateBackend`
The help message provided some clue as to what was happening. Checking the node/src/service.rs file, I found that RemoteBackend was never referenced anywhere else in the file. So I simply removed it from the imports, and the build process was completed successfully.

nginx audio track for hls module installation

I started to configure a setup with nginx audio track module and I encountered a few problems.
First of all, I started from the official documentation.
I followed the requirements and installed ffmpeg.
As far as I can see, the available libs are:
/usr/lib/x86_64-linux-gnu/libavformat.so.58
/usr/lib/x86_64-linux-gnu/libavutil.so.56
/usr/lib/x86_64-linux-gnu/libavcodec.so.58
When I run make install the following output is generated:
/root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.c: In function ‘ngx_http_aac_extract_audio’:
/root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.c:156:5: error: ‘av_register_all’ is deprecated [-Werror=deprecated-declarations]
156 | av_register_all();
| ^~~~~~~~~~~~~~~
In file included from /root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.h:6,
from /root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.c:1:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here
2050 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
/root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.c:210:5: error: ‘avcodec_copy_context’ is deprecated [-Werror=deprecated-declarations]
210 | avcodec_copy_context(output_audio_stream->codec, input_audio_stream->codec);
| ^~~~~~~~~~~~~~~~~~~~
In file included from /root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.h:5,
from /root/dev/nginx-audio-track-for-hls-module/ngx_http_aac_module.c:1:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4235:5: note: declared here
4235 | int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
This is only a short sample, there are many with the same error message.

Copy Yocto Project to other PC by tar

Due to the Internet connect is poor on customer side, I copied the tar file of my Yocto Project to customer.
However, customer met an issue while untar the Yocto Project and run the bitbake command to build project on their PC.
Customer got the following build code error:
s32v#s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Error, TMPDIR has changed location. You need to either move it back to /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp or rebuild
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I edited /build_s32v234evb_release/tmp/saved_tmpdir file to re-position the tmp directory, this error has pass.
However, I got another error while building Kernel, it seems the directory parameter is still wrong... (There is no error while building U-Boot only.)
s32v#s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
Loading cache: 100% |########################################################################################################################################################################| ETA: 00:00:00
Loaded 2462 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "s32v234evb"
DISTRO = "fsl-networking"
DISTRO_VERSION = "1.8"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "(nobranch):03b0fbcf6b3b5cd16ae16738fbaabd1c6bf98536"
meta-fsl-arm = "(nobranch):c9f259a4bf8472dfa3ff75f1c3fcbe5e0ded7aaf"
meta-fsl-networking = "(nobranch):b8ff02a8d508464a16c84e1d13c155f45aa98cbe"
meta-fsl-toolchain = "(nobranch):0a235c4bcd4057608ee60b8c898eec9509632b95"
meta-virtualization = "(nobranch):0277cbcb47db4239d0a4aa3b37c5c6a705070951"
meta-fsl-s32v = "<unknown>:<unknown>"
meta-oe
meta-networking
meta-python
meta-webserver
meta-filesystems = "(nobranch):c841231b9f327d2d06d19d2ba1324dd86b83617c"
meta-linaro
meta-aarch64
meta-linaro-toolchain = "(nobranch):5075a82bd510d19617803fb16da2375605225cbb"
NOTE: Preparing RunQueue
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_deploy is tainted from a forced run
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 Image CC=aarch64-fsl-linux-gcc --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb LD=aarch64-fsl-linux-ld.bfd --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb
| make: *** /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work-shared/s32v234evb/kernel-source: No such file or directory. Stop.
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Task 76 (/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile) failed with exit code '1'
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| LINK tests/qemu-iotests/socket_scm_helper
| GEN qemu-doc.html
| GEN qemu.1
| CC qga/commands.o
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/pixman-1: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/glib-2.0: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/lib/glib-2.0/include: No such file or directory [enabled by default]
| /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/qemu-2.2.0/qga/commands.c:13:18: fatal error: glib.h: No such file or directory
| #include <glib.h>
| ^
| compilation terminated.
| make: *** [qga/commands.o] Error 1
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Task 2849 (virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1504 tasks of which 1502 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:
Summary: 2 tasks failed:
/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile
virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile
Summary: There were 3 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
My question is:
Is it possible to copy the Yocot Project to another PC by tar file?
What configuration / initial files I need to edit except saved_tmpdir file?
Which file does Yocto Project define the "kernel-source" directory?
Best Regards,
Wayne Kuo
when you copy tar project to another PC, two files will be modified:
build/conf/bblayers.conf
build/tmp/saved_tmpdir
If it's only a matter of internet connection, I suggest you create a download folder mirror.
On your side, you add BB_GENERATE_MIRROR_TARBALLS and build.
Then copy entire DL_DIR folder at customer side, and use BB_NO_NETWORK there.
You can look here and here for usage example.
You can then make a new build at customer side without internet connection. to speed up process, you can also copy your sstate-cache folder to customer side and add a sstate mirror with SSTATE_MIRRORS.
No, you will need a fresh build folder
You need to create a new Yocto environment at customer side
It's bitbake variable STAGING_KERNEL_DIR
Error, TMPDIR has changed location. You need to either move it back to...
I built all yocto stuff with the user jamie. Due to disk space running out, I copied the whole $HOME directory of jamie to another disk /dev/sdb1, which had a larger storage.
When I tried to run bitbake command to make a test, I got the same error. Here is a simple solution which worked for me:
mount /dev/sdb1 /mnt/sdb1/
mount --bind /mnt/sdb1/home_jamie/ /home/jamie/
What I want was to restore the exact original filesystem layout which the bitbake commands were once run with.
To make the above changes permanent, write above mounting as entries of /etc/fstab.

Resources