Util-linux and busybox and i2ctool update-alternative conflict

Hello Toradex Community,

I’m trying to add asterisk to my toolchain which is Toradex BSP 2.8 and it depends on util linux.

When I add util_linux as dependency I get these errors

update-alternatives: Error: not linking /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cget to /bin/busybox.nosuid since /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cget exists and is not a link
update-alternatives: Error: not linking /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cset to /bin/busybox.nosuid since /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cset exists and is not a link
update-alternatives: Error: not linking /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cdump to /bin/busybox.nosuid since /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cdump exists and is not a link
update-alternatives: Error: not linking /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cdetect to /bin/busybox.nosuid since /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/usr/sbin/i2cdetect exists and is not a link
update-alternatives: Error: not linking /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/sbin/fstrim to /bin/busybox.nosuid since /home/amin/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/angstrom-qt5-x11-image/2.8b7-r0/Colibri-iMX6_Qt5-X11-Image_2.8.7/rootfs/sbin/fstrim exists and is not a link

I think that the error I’ve got is some thing like error here:

conflict

But when I do the same in util-linux recipe with fstrim and add it in alternative update packages, This is the new error:

opkg_prepare_url_for_install: Couldn't find anything to satisfy 'util-linux-fstrim'

These are my asterisk_13.5.0.bb and util-linux.inc which I commented where I changed in util-linux.inc according to link I mentioned (line 250 and 251)

I’m not sure but I think the problem is somehow related to alternative-update and I should do some thing like this with my i2c-tool recipe to fix other errors

Appreciate any help

Hi @Amin,

Before you tried to add Asterisk to your toolchain, was it possible to create an image with Asterisk on it, having the build process being completed without errors?

Best regards,
André Curvello

Hello @andrecurvello.tx

I think the answer is no because only when I erase asterisk from /build/local.conf and my image recipe I’ve got no errors

But when I add asterisk with any of TOOLCHAIN_TARGET_TASK_append or IMAGE_INSTALL_append in local.conf or add asterisk in my image recipe that I’m bitbaking I’ve got those errors (if I should test any thing else tell me please)

Also “devtool build asterisk” runs with no error

Aside that I’ve changed my i2c-tool recipe and first four errors disappeared (I can’t do the same for fstrim duo to error I mentioned in the question)

i2c-tool

Thanks for your reply

Hi @amin it looks like your update to add alternatives for fstrim may be missing a few pieces. I found this commit which is in newer Yocto that adds that support. Presumably something similar is needed in your case.

Drew

Can you share your full recipe and all other needed files? Are you using meta-telephony or do you have a custom layer? I tried to build asterisk from meta-telephony but it fails for an apparently unrelated reason. Of course, the most recent commit there is over 3.5 years old so bitrot is unsurprising.

Drew