Error occurs when adding libmodbus to st-image-weston
I have successfully build st-image-weston using Distribution-Package.
Now I want to add libmodbus to st-image-weston.
I refer to the wiki page below.
https://wiki.st.com/stm32mpu/wiki/How_to_integrate_an_external_software_package
1)
I checked the libmodbus recipe in the path below.
And I am using the meta-oe layer containing libmodbus.
But I can't find libmodbus in the target.
Why doesn't rootfs include libmodbus?
layers/meta-openembedded/meta-oe/recipes-extended/libmodbus2)
I tried to add libmodbus by executing the command below.
The following error occurs.
how to fix it?
echo 'IMAGE_INSTALL_append += "libmodbus"' >> ../layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-weston.bbappendbitbake st-image-weston -c cleanall
bitbake st-image-westonNOTE: Started PRServer with DBfile: /home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 35363, PID: 73879
Loading cache: 100% |#########################################################################################################################################################################################################| Time: 0:00:00
Loaded 3763 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-ostl-linux-gnueabi"
MACHINE = "stm32mp1"
DISTRO = "openstlinux-weston"
DISTRO_VERSION = "3.1-snapshot-20210602"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
DISTRO_CODENAME = "dunfell"
ACCEPT_EULA_stm32mp1 = "0"
GCCVERSION = "9.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python
meta-oe
meta-gnome
meta-initramfs
meta-multimedia
meta-networking
meta-webserver
meta-filesystems
meta-perl = "HEAD:5bba79488b7d393d2258d6e917f7bf7b0d7c4073"
meta-st-stm32mp = "HEAD:7b55c34159fcfd57b4965f7aa9284200eea09d20"
meta-qt5 = "HEAD:0d8eb956015acdea7e77cd6672d08dce18061510"
meta-st-openstlinux = "HEAD:d6947f5a1898744aa15a96b68e8945f4f553175e"
meta = "HEAD:72431ee8de5e3a53d259cebf420a7713ac9e1f14"
workspace = "<unknown>:<unknown>"
Initialising tasks: 100% |####################################################################################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 411 Found 392 Missed 19 Current 2881 (95% match, 99% complete)
NOTE: Executing Tasks
ERROR: libmodbus-3.1.6-r0 do_prepare_recipe_sysroot: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File: '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/openembedded-core/meta/classes/staging.bbclass', lineno: 577, function: extend_recipe_sysroot
0573: if "/bin/" in l or "/sbin/" in l:
0574: # defer /*bin/* files until last in case they need libs
0575: binfiles[l] = (targetdir, dest)
0576: else:
*** 0577: staging_copyfile(l, targetdir, dest, postinsts, seendirs)
0578:
0579: # Handle deferred binfiles
0580: for l in binfiles:
0581: (targetdir, dest) = binfiles[l]
File: '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/openembedded-core/meta/classes/staging.bbclass', lineno: 152, function: staging_copyfile
0148: os.symlink(linkto, dest)
0149: #bb.warn(c)
0150: else:
0151: try:
*** 0152: os.link(c, dest)
0153: except OSError as err:
0154: if err.errno == errno.EXDEV:
0155: bb.utils.copyfile(c, dest)
0156: else:
Exception: FileExistsError: [Errno 17] File exists: '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/sysroots-components/x86_64/xz-native/usr/include/lzma.h' -> '/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/libmodbus/3.1.6-r0/recipe-sysroot-native/usr/include/lzma.h'
ERROR: Logfile of failure stored in: /home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/build-openstlinuxweston-stm32mp1/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi/libmodbus/3.1.6-r0/temp/log.do_prepare_recipe_sysroot.74045
ERROR: Task (/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb:do_prepare_recipe_sysroot) failed with exit code '1'
NOTE: Tasks Summary: Attempted 9007 tasks of which 9000 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 2 seconds
Summary: 1 task failed:
/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-03-31/layers/meta-openembedded/meta-oe/recipes-extended/libmodbus/libmodbus_3.1.6.bb:do_prepare_recipe_sysroot
Summary: There was 1 ERROR message shown, returning a non-zero exit code.Thank you
Best regards
