Skip to contentSkip to conversation

ninja: error: unknown target 'install' #yocto #toolchain #linux

DISCUSSION [email protected] 2 participants 3 messages Dec 3, 2020

lore
Share & tools
lore
#0 lore raw

Hi All,

I had written a bitbake file to download and install AWS SDK C from GitHub https://github.com/aws/aws-iot-device-sdk-embedded-C based on existing recipes https://github.com/aws/meta-aws, ( https://github.com/aws/meta-aws ) but I'm getting an error as "ninja: error: unknown target 'install'". Kindly please help me to solve the issue.

Log data follows:

| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/ninja/ninja_1.10.0.bb:do_populate_sysroot', 'virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/gcc/gcc-cross_9.3.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/cmake/cmake-native_3.16.5.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/../meta-mediatek-bsp/recipes-connectivity/mosquitto/mosquitto_1.6.12.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-core/glibc/glibc_2.31.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/gcc/gcc-runtime_9.3.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| NOTE: DESTDIR=/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/image VERBOSE=1 cmake --build /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build --target install --
| [0/2] /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/cmake -P /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build/CMakeFiles/VerifyGlobs.cmake
| ninja: error: unknown target 'install'
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.17379:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| ERROR: Execution of '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.17379' failed with exit code 1:
| [0/2] /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/cmake -P /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build/CMakeFiles/VerifyGlobs.cmake
| ninja: error: unknown target 'install'
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.17379:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
|

ERROR: Task (/home/bl-docker/rity/src/meta-application/recipes-aws/aws/aws_1.0.bb:do_install) failed with exit code '1'

Recipe File:
SUMMARY = "AWS IoT Device SDK for Embedded C"
DESCRIPTION = "The AWS IoT Device SDK for C provides MQTT APIs for Embedded C applications" HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-embedded-C"
LICENSE = "Apache-2.0"

inherit cmake

LIC_FILES_CHKSUM = "file://LICENSE;md5=c8c19afab7f99fb196c9287cbd60a258"

BRANCH ?= "main"

SRC_URI = "git://github.com/aws/aws-iot-device-sdk-embedded-C;branch=${BRANCH};name=aws-iot-device-sdk-embedded-C" SRCREV = "${AUTOREV}"

S= "${WORKDIR}/git"

do_configure_prepend() {
cd ${S}
git submodule update --init --recursive
}

DEPENDS = "openssl mosquitto"
CFLAGS_append = " -Wl,-Bsymbolic"

EXTRA_OECMAKE += "-DBUILD_DEPS=ON"
EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=1"
EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release"
EXTRA_OECMAKE += "-DCMAKE_INSTALL_PREFIX=$D/usr"
OECMAKE_BUILDPATH += "${WORKDIR}/build"
OECMAKE_SOURCEPATH += "${S}"

FILES_${PN} += "${libdir}/*1.0.0"
FILES_${PN} += "${libdir}/libbackoff_algorithm.so" FILES_${PN} += "${libdir}/libcore_http_client.so" FILES_${PN} += "${libdir}/libcore_json.so" FILES_${PN} += "${libdir}/libcore_mqtt.so" FILES_${PN} += "${libdir}/libcore_mqtt_serializer.so" FILES_${PN} += "${libdir}/libcore_mqtt_state.so" FILES_${PN} += "${libdir}/libcore_pkcs11.so" FILES_${PN} += "${libdir}/libcore_pki_utils.so" FILES_${PN} += "${libdir}/libcore_pkcs11_pal.so"

PACKAGES = "${PN}"
INSANE_SKIP_${PN} += "installed-vs-shipped"
BBCLASSEXTEND = "native nativesdk"

Thanks & Regards,
Vijay Rakesh

#1 lore raw

Hi,

Quoted 5 lines · On Thu, Dec 03, 2020 at 04:04:25AM -0800, [email protected] wrote:

Hi All,

I had written a bitbake file to download and install AWS SDK C from GitHub https://github.com/aws/aws-iot-device-sdk-embedded-C based on existing recipes https://github.com/aws/meta-aws, ( https://github.com/aws/meta-aws ) but I'm getting an error as "ninja: error: unknown target 'install'". Kindly please help me to solve the issue.

Log data follows:

Quoted 12 lines
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/ninja/ninja_1.10.0.bb:do_populate_sysroot', 'virtual:native:/home/bl-docker/rity/src/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/gcc/gcc-cross_9.3.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/cmake/cmake-native_3.16.5.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-connectivity/openssl/openssl_1.1.1g.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/../meta-mediatek-bsp/recipes-connectivity/mosquitto/mosquitto_1.6.12.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-core/glibc/glibc_2.31.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/home/bl-docker/rity/src/poky/meta/recipes-devtools/gcc/gcc-runtime_9.3.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| NOTE: DESTDIR=/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/image VERBOSE=1 cmake --build /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build --target install --
| [0/2] /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/cmake -P /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build/CMakeFiles/VerifyGlobs.cmake
| ninja: error: unknown target 'install'
| WARNING: /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.17379:1 exit 1 from 'eval ${DESTDIR:+DESTDIR=${DESTDIR} }VERBOSE=1 cmake --build '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build' "$@" -- ${EXTRA_OECMAKE_BUILD}'
| ERROR: Execution of '/home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/temp/run.do_install.17379' failed with exit code 1:
| [0/2] /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/recipe-sysroot-native/usr/bin/cmake -P /home/bl-docker/rity/bsp/tmp/work/aarch64-poky-linux/aws/1.0-r0/build/CMakeFiles/VerifyGlobs.cmake
| ninja: error: unknown target 'install'

No target named install. Add one or override do_install task since by default it "calls" the install target.

[...]

Quoted 8 lines

SRC_URI = "git://github.com/aws/aws-iot-device-sdk-embedded-C;branch=${BRANCH};name=aws-iot-device-sdk-embedded-C" SRCREV = "${AUTOREV}"

S= "${WORKDIR}/git"

do_configure_prepend() {
cd ${S}
git submodule update --init --recursive

IIRC, gitsm in SRC_URI instead of git should handle that:
https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-fetching.html#git-submodule-fetcher-gitsm

Quentin

#2 lore raw

Hi Quentin,

Thanks for the reply. I had recently started learning, can you please explain me little more in detail. How to add target named? And How to override do_install? I searched online, but couldn’t find exact information.

Adding OVERRIDES = “do_install” is this correct?

Thanks,
Vijay Rakesh.