-1

I am using MV BlueFox3 camera on a RaspberryPi4 and I am trying to write a .bb recipe which is going to install the necessary software for the camera. A quick setup guide is on the manufacturer website, but I can not get the first part to work. So far, this is how my recipe looks:

SUMMARY = "Installs mvIMPACT Acquire base libraries"
DESCRIPTION = "This recipe installs mvIMPACT Acquire base libraries for all MATRIX VISION devices."
HOMEPAGE = "http://www.matrix-vision.de"
 
LICENSE_FLAGS = "EULA"
LICENSE_FLAGS_WHITELIST = "EULA"
LICENSE = "EULA"
LIC_FILES_CHKSUM = "file://${WORKDIR}/mvIMPACT_Acquire-ARM64-2.45.0/doc/EULA.txt;md5=f6f99507036166a5604b38e6df10f004"
 
PACKAGE_ARCH = "${MACHINE_ARCH}"
 
S = "${WORKDIR}"
 
SRC_URI = "file://mvGenTL_Acquire-ARM64_gnu-2.45.0.tgz"

TARGET = "arm64"

MVIA_SUBDIR = "opt/mvIMPACT_Acquire"
MVIA_LIB_SUBDIR = "lib"
TOOLKITS_LIB_SUBDIR = "Toolkits"
MV_DATA_DIR = "opt/mvIMPACT_Acquire/data"
 
do_install() {
    # install mvIMPACT Acquire runtime binaries
    install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
    install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}
    install -m 0755 -d ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}

    oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvDeviceManager.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
    oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/lib/${TARGET}/libmvPropHandling.so.${PV} ${D}${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}
    oe_soinstall ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/expat/bin/${TARGET}/lib/*.so.* ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}
    
    install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/Toolkits/FreeImage3160/bin/Release/FreeImage/${TARGET}/*.so ${D}${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}
    
    # set environment variables for mvIMPACT Acquire
    install -m 0755 -d ${D}${sysconfdir}/profile.d
    echo 'export MVIMPACT_ACQUIRE_DIR=/opt/mvIMPACT_Acquire' >> ${D}${sysconfdir}/profile.d/acquire.sh
    echo 'export MVIMPACT_ACQUIRE_DATA_DIR=/opt/mvIMPACT_Acquire/data' >> ${D}${sysconfdir}/profile.d/acquire.sh
    
    # set library search paths for the dynamic linker
    install -m 0755 -d ${D}${sysconfdir}/ld.so.conf.d
    echo '/opt/mvIMPACT_Acquire/lib' >> ${D}${sysconfdir}/ld.so.conf.d/acquire.conf
    echo '/opt/mvIMPACT_Acquire/Toolkits' >> ${D}${sysconfdir}/ld.so.conf.d/acquire.conf
    
    # set up logfiles
    install -m 0755 -d ${D}${base_prefix}/${MV_DATA_DIR}/logs
    install -m 0755 ${S}/mvIMPACT_Acquire-ARM64-${PV}/apps/mvDebugFlags.mvd ${D}${base_prefix}/${MV_DATA_DIR}/logs/    
}
 
INHIBIT_PACKAGE_STRIP = "1"
INSANE_SKIP_${PN} += "dev-so \
                    already-stripped \
                    ldflags"
PACKAGES = "${PN} ${PN}-dev ${PN}-doc"

FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}/lib*.so \
                ${sysconfdir}/profile.d/*.sh \
                ${sysconfdir}/ld.so.conf.d/*.conf"

FILES_${PN}-dev += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so"
FILES_${PN}-doc += "${base_prefix}/${MV_DATA_DIR}/logs"

but I am getting the following error:

NOTE: Executing Tasks
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: QA Issue: File '/opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin/Release/FreeImage/arm64/libfreeimage-3.16.0.so' from mvimpact-acquire-base was already stripped, this will prevent future debugging! [already-stripped]
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: QA Issue: File '/opt/mvIMPACT_Acquire/Toolkits/libexpat.so.1.6.0' from mvimpact-acquire-base was already stripped, this will prevent future debugging! [already-stripped]
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: QA Issue: File '/opt/mvIMPACT_Acquire/lib/libmvDeviceManager.so.2.45.0' from mvimpact-acquire-base was already stripped, this will prevent future debugging! [already-stripped]
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: QA Issue: File '/opt/mvIMPACT_Acquire/lib/libmvPropHandling.so.2.45.0' from mvimpact-acquire-base was already stripped, this will prevent future debugging! [already-stripped]
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: QA Issue: mvimpact-acquire-base: Files/directories were installed but not shipped in any package:
  /opt
  /opt/mvIMPACT_Acquire
  /opt/mvIMPACT_Acquire/Toolkits
  /opt/mvIMPACT_Acquire/lib
  /opt/mvIMPACT_Acquire/data
  /opt/mvIMPACT_Acquire/Toolkits/libexpat.so
  /opt/mvIMPACT_Acquire/Toolkits/libexpat.so.1.6.0
  /opt/mvIMPACT_Acquire/Toolkits/libexpat.so.1
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin/Release
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin/Release/FreeImage
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin/Release/FreeImage/arm64
  /opt/mvIMPACT_Acquire/Toolkits/FreeImage3160/bin/Release/FreeImage/arm64/libfreeimage-3.16.0.so
  /opt/mvIMPACT_Acquire/lib/libmvPropHandling.so
  /opt/mvIMPACT_Acquire/lib/libmvDeviceManager.so.2.45.0
  /opt/mvIMPACT_Acquire/lib/libmvDeviceManager.so.2
  /opt/mvIMPACT_Acquire/lib/libmvDeviceManager.so
  /opt/mvIMPACT_Acquire/lib/libmvPropHandling.so.2.45.0
  /opt/mvIMPACT_Acquire/lib/libmvPropHandling.so.2
  /opt/mvIMPACT_Acquire/data/logs
  /opt/mvIMPACT_Acquire/data/logs/mvDebugFlags.mvd
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
mvimpact-acquire-base: 22 installed and not shipped files. [installed-vs-shipped]
ERROR: mvimpact-acquire-base-2.45.0-r0 do_package: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /home/stefan/Projects/raspberrypiOS/build/tmp/work/raspberrypi4_64-poky-linux/mvimpact-acquire-base/2.45.0-r0/temp/log.do_package.2280592
ERROR: Task (/home/stefan/Projects/raspberrypiOS/meta-mvimpact-acquire/recipes-mvimpactacquire/mvimpact-acquire/mvimpact-acquire-base_2.45.0.bb:do_package) failed with exit code '1'

I am guessing that I should change the FILES variable to ensure proper package splitting but I do not know how. I have tried adding the directories and files from the error message, but no matter what I do, the error message seems to be the same (22 packages). In the workdir, the image and package folders seem to be identical, and the package-split folder contains mvimpact-acquire-base (with only the /etc folder inside, but no /opt), while the mvimpact-acquire-base-dev, mvimpact-acquire-base-doc, mvimpact-acquire-base-src folders are all empty.

Can anyone help me understand this problem better or suggest a potential solution regarding the FILES variable and the error message.

I think the other error messages about stripping are not at issue here, but if you can share additional info it would be great.

Below are the contents of some WORKDIR(/work/raspberrypi4_64-poky-linux/mvimpact-acquire-base/2.45.0-r0) subdirectories.

image/
├── etc
│   ├── ld.so.conf.d
│   │   └── acquire.conf
│   └── profile.d
│       └── acquire.sh
└── opt
    └── mvIMPACT_Acquire
        ├── data
        │   └── logs
        │       └── mvDebugFlags.mvd
        ├── lib
        │   ├── libmvDeviceManager.so -> libmvDeviceManager.so.2.45.0
        │   ├── libmvDeviceManager.so.2 -> libmvDeviceManager.so.2.45.0
        │   ├── libmvDeviceManager.so.2.45.0
        │   ├── libmvPropHandling.so -> libmvPropHandling.so.2.45.0
        │   ├── libmvPropHandling.so.2 -> libmvPropHandling.so.2.45.0
        │   └── libmvPropHandling.so.2.45.0
        └── Toolkits
            ├── FreeImage3160
            │   └── bin
            │       └── Release
            │           └── FreeImage
            │               └── arm64
            │                   └── libfreeimage-3.16.0.so
            ├── libexpat.so -> libexpat.so.1.6.0
            ├── libexpat.so.1 -> libexpat.so.1.6.0
            └── libexpat.so.1.6.0

14 directories, 13 files

package/
├── etc
│   ├── ld.so.conf.d
│   │   └── acquire.conf
│   └── profile.d
│       └── acquire.sh
└── opt
    └── mvIMPACT_Acquire
        ├── data
        │   └── logs
        │       └── mvDebugFlags.mvd
        ├── lib
        │   ├── libmvDeviceManager.so -> libmvDeviceManager.so.2.45.0
        │   ├── libmvDeviceManager.so.2 -> libmvDeviceManager.so.2.45.0
        │   ├── libmvDeviceManager.so.2.45.0
        │   ├── libmvPropHandling.so -> libmvPropHandling.so.2.45.0
        │   ├── libmvPropHandling.so.2 -> libmvPropHandling.so.2.45.0
        │   └── libmvPropHandling.so.2.45.0
        └── Toolkits
            ├── FreeImage3160
            │   └── bin
            │       └── Release
            │           └── FreeImage
            │               └── arm64
            │                   └── libfreeimage-3.16.0.so
            ├── libexpat.so -> libexpat.so.1.6.0
            ├── libexpat.so.1 -> libexpat.so.1.6.0
            └── libexpat.so.1.6.0

14 directories, 13 files

packages-split/
├── mvimpact-acquire-base
│   └── etc
│       ├── ld.so.conf.d
│       │   └── acquire.conf
│       └── profile.d
│           └── acquire.sh
├── mvimpact-acquire-base-dev
├── mvimpact-acquire-base-doc
└── mvimpact-acquire-base-src

7 directories, 2 files

1 Answers1

0

The issue was new BitBake syntax. I changed the following lines:

INSANE_SKIP_${PN} += "dev-so
FILES_${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}/lib*.so \
                ${sysconfdir}/profile.d/*.sh \
                ${sysconfdir}/ld.so.conf.d/*.conf"

to

INSANE_SKIP:${PN} += "dev-so
FILES:${PN} += "${base_prefix}/${MVIA_SUBDIR}/${MVIA_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/lib*.so.* \
                ${base_prefix}/${MVIA_SUBDIR}/${TOOLKITS_LIB_SUBDIR}/FreeImage3160/bin/Release/FreeImage/${TARGET}/lib*.so \
                ${sysconfdir}/profile.d/*.sh \
                ${sysconfdir}/ld.so.conf.d/*.conf"

So basically, instead of underscores it now uses colons.