Custom recipe to copy .so files


I’m trying to add the library from my custom recipe but I get the following error:

    Log data follows:
    | DEBUG: Executing python function extend_recipe_sysroot
    | NOTE: Direct dependencies are ['/home/joao/projetos/mT100_imx7_2.8/build/../layers/openembedded-core/meta/recipes-devtools/quilt/', '/home/joao/projetos/mT100_imx7_2.8/build/../layers/openembedded-core/meta/recipes-devtools/gcc/', '/home/joao/projetos/mT100_imx7_2.8/build/../layers/openembedded-core/meta/recipes-devtools/gcc/', '/home/joao/projetos/mT100_imx7_2.8/build/../layers/openembedded-core/meta/recipes-core/glibc/', 'virtual:native:/home/joao/projetos/mT100_imx7_2.8/build/../layers/openembedded-core/meta/recipes-devtools/pseudo/']
    | NOTE: Installed into sysroot: []
    | NOTE: Skipping as already exists in sysroot: ['quilt-native', 'gcc-runtime', 'gcc-cross-arm', 'glibc', 'pseudo-native', 'linux-libc-headers', 'libgcc', 'xz-native', 'binutils-cross-arm', 'libtool-native', 'zlib-native', 'texinfo-dummy-native', 'libmpc-native', 'autoconf-native', 'gmp-native', 'mpfr-native', 'gnu-config-native', 'automake-native', 'gettext-minimal-native', 'bison-native', 'flex-native', 'm4-native']
    | DEBUG: Python function extend_recipe_sysroot finished
    | DEBUG: Executing shell function do_install
    | install: cannot create regular file '/home/joao/projetos/mT100_imx7_2.8/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/library-test/1.0-r0/image/usr/lib/': No such file or directory
    | WARNING: exit code 1 from a shell command.
    | ERROR: Function failed: do_install (log file is located at /home/joao/projetos/mT100_imx7_2.8/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/library-test/1.0-r0/temp/log.do_install.18845)
    ERROR: Task (/home/joao/projetos/mT100_imx7_2.8/build/../myTapp-OS/oe_core/meta-mytapp/recipes-mytapp/recipes-core/ failed with exit code '1'
    NOTE: Tasks Summary: Attempted 5221 tasks of which 5218 didn't need to be rerun and 1 failed.
    NOTE: Writing buildhistory
    Summary: 1 task failed:

My recipe

    SUMMARY = "Test"
    PR = "r0"
    SRC_URI = "file://files.tar.gz"
    SOLIBS = ".so"
    do_install() {
    	install -m 0644 ${WORKDIR}/files/ ${D}${libdir}/
    FILES_${PN} += "${libdir}/"

The content of files.tar.gz:

            ├── files
            │   └──

The main cause should be:

install: cannot create regular file '/home/joao/projetos/mT100_imx7_2.8/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/library-test/1.0-r0/image/usr/lib/': No such file or directory

I followed a lot of examples but it doesn’t work. Am i missing anything?


You need to create the target directory in the do_install task.

do_install() {
    install -d ${D}${libdir}
    install -m 0644 ${WORKDIR}/files/ ${D}${libdir}/

Maybe there are other things too. You might want to read this.
If the build succeeds but you get QA warnings you might want to suppress the warning by setting the INSANE_SKIP_${PN} variable depending on the warning, e.g ‘INSANE_SKIP_${PN} = “dev-so ldflags”’.


It worked! Thanks

Perfect. You are welcome. Thanks for the feedback.