Yocto generated nativesdk-cmake SDK is incomplete

匿名 (未验证) 提交于 2019-12-03 01:08:02

问题:

For the past couple of days I have been trying to generate a viable CMake SDK with Yocto Project. I'm trying to generate SDK based on an image file which is given below:

#To build SDK, use bitbake meta-toolchain  DESCRIPTION = "Embeddev-LXDE image."  LICENSE="CLOSED"  IMAGE_INSTALL = "packagegroup-core-boot \     packagegroup-core-x11 \     packagegroup-lxde-base \     kernel-modules \ "  IMAGE_INSTALL_append = " nano git cmake qtbase qtchooser dbus packagegroup-core-ssh-openssh xterm"  #Framebuffer driver for tft IMAGE_INSTALL_append = " xf86-video-fbdev"  IMAGE_INSTALL_append = " apt dpkg sudo tzdata glibc-utils localedef networkmanager pointercal xinit xkeyboard-config base-passwd liberation-fonts pkgconfig"  IMAGE_INSTALL_append = " wiringpi"  #Maybe consider connman instead of networkmanager #vc-graphics is problematic with userland..  inherit populate_sdk  ## SDK stuff, to build sdk use bitbake rpi-embeddev-lxde-image -c populate_sdk # Add all static packages:  SDKIMAGE_FEATURES += "staticdev-pkgs" SDKIMAGE_FEATURES += "staticdev-pkgs" SDKIMAGE_FEATURES += "dev-pkgs" TOOLCHAIN_TARGET_TASK_append = " wiringpi-dev" TOOLCHAIN_HOST_TASK_append = " nativesdk-cmake" ## inherit distro_features_check REQUIRED_DISTRO_FEATURES = "x11"  IMAGE_LINGUAS ?= " "  LICENSE = "MIT"  export IMAGE_BASENAME = "rpi-embeddev-lxde-image"  inherit core-image  ENABLE_SPI_BUS = "1" ENABLE_I2C = "1"  # qtwebengine qtwebkit ...  do_image_prepend() {  } 

I create my SDK with bitbake rpi-embeddev-lxde-image -c populate_sdk.

I would like to describe the exact problem. The problem is that nativesdk-cmake is not correctly installed in the SDK. Cmake 3.10.2 recipe gives:

do_install_append_class-nativesdk() {     mkdir -p ${D}${datadir}/cmake     install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/      mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d     install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh }  FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"  FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}" FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"  BBCLASSEXTEND = "nativesdk" 

Tracing the root of the problem, I have seen that the cmake/ directory that should be created is created in:

/home/<user>/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-cmake/3.10.2-r0/image/opt/poky/2.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/cmake/ 

However, this cmake directory is not valid in /opt/poky/2.4+snapshot/sysroots/x86_64-pokysdk-linux/usr/share/, -where it is actually needed- when I install the SDK to /opt, unfortunately.

Do I need to know anything else or do anything else regarding how to properly generate SDK?

I am really stuck here any help is much appreciated indeed.

Thanks in advance.

EDIT: I moved TOOLCHAIN_TASK statements to layer.conf and used bitbake meta-toolchain which also didn't work.

EDIT2: I used cmake version 3.6 with PREFERRED_PROVIDER_cmake = "3.6.1", which also did not work.

回答1:

There seems to be a bug in the imminent Yocto Project 2.5, Sumo, release. Here, sysroots/x86_64-chargestorm-linux/usr/share/cmake/OEToolchainConfig.cmake seems to be omitted.

The temporary solution for this is to add

TOOLCHAIN_HOST_TASK += "nativesdk-cmake-dev" 

And yes, using a release is always helpful, especially if your new to some project. Just remember to always use the same release branches for all your included layers. And personally, I'd not start a new project based on Morty, which was released 1.5 years ago when writing this, as it's likely to go out of official Yocto Project support rather soon.



回答2:

As an aside, it seems that it is still a bug (Or would this be mis-feature at this point...?) in Sumo. Just got bit by this...workaround looks to be the same as described.

(Note: This is a release at this point in time... X-D)



回答3:

Problem solved by using a release (I used "morty", and not the "master branch") for every layer and poky itself. This is apparently very important.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!