Unable to put lapack.so file inside rootfs - yocto

I'm trying to install lapack on my 64 bit ARMV8 board with yocto. I have lapack-3.9 bitbake recipe and it has been successfully built. It has successfully created libblas.so and liblapack.so inside image/usr/lib64 folder.
I added lapack to my local.conf . The problem is when i do
bitbake core-image-weston
I don't have these .so inside my rootfs. That is, inside /usr/lib64.
What am i missing here???
Below is my lapack_3.9.0.bb recipe-
SUMMARY = "Linear Algebra PACKage"
URL = "http://www.netlib.org/lapack"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=930f8aa500a47c7dab0f8efb5a1c9a40"
# Recipe needs FORTRAN support (copied from conf/local.conf.sample.extended)
# Enabling FORTRAN
# Note this is not officially supported and is just illustrated here to
# show an example of how it can be done
# You'll also need your fortran recipe to depend on libgfortran
#FORTRAN_forcevariable = ",fortran"
#RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"
DEPENDS = "libgfortran"
SRC_URI = "https://github.com/Reference-LAPACK/lapack/archive/v${PV}.tar.gz"
SRC_URI[md5sum] = "0b251e2a8d5f949f99b50dd5e2200ee2"
SRC_URI[sha256sum] = "106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573"
EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON "
OECMAKE_GENERATOR = "Unix Makefiles"
inherit cmake pkgconfig
EXCLUDE_FROM_WORLD = "1"
Also, when i try to add lapack-dev and lapack-dbg ipks to my local.conf, it only allows lapack-dbg but gives an error for lapack-dev -
ERROR:
Collected errors:
* Solver encountered 1 problem(s):
* Problem 1/1:
* - nothing provides lapack = 3.9.0-r0 needed by lapack-dev-3.9.0-r0.aarch64
*
* Solution 1:
* - do not ask to install a package providing lapack-dev

Related

Error while executing do_rootfs command using yocto build

I am trying to integrate the third-party shared libraries into my build for QEMUx86-64 using yocto.
third-party.bb
LICENSE = "COM"
SECTION = "devel"
FILES_${PN}-dev += "${libdir}/cmake/"
DEPENDS += " glibc "
FILES_${PN} += "/usr/lib/"
INSANE_SKIP_${PN} = "ldflags"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
THIRD_PARTY_LIB = "${THISDIR}/../thirdparty/lib"
do_install() {
mkdir -p ${D}/usr/lib
cp -R ${THIRD_PARTY_LIB}/* ${D}/
}
RDEPENDS_${PN}-dev = ""
do_package_qa() {
}
I can able to install the libraries and link them successfully. But now the problem is whiling executing the do_rootfs command I am getting below error.
Error:
Problem 1: conflicting requests
- nothing provides libc.so.6(GLIBC_2.25) needed by memstack-1.0-r0.core2_64
Problem 2: package mem-manager-1.0-r1.core2_64 requires libmemstack.so.0.1()(64bit), but none of the providers can be installed
- conflicting requests
- nothing provides libc.so.6(GLIBC_2.25) needed by memstack-1.0-r0.core2_64
I added the DEPENDS on glibc in the respective third-party.bb file. But I am facing the same error, am I missing something here?

Yocto rust recipe also produces -native output that needs packaging

I tried this approach on hardknott but I couldn't get it to work recipe also produces -native output that needs packaging
It is a rust recipe that generates an x86_64 app which I would like to package the right way in sdk, so that it can be used.
I can separate the main package to -native-bin, and I see it in the recipe-sysroot, but I can't get it to populate the recipe-sysroot of the workdir of the file when building the -native-helper recipe. And I suspect the reason is that I get an error that the main recipe for x86_64 can't be found?
ERROR: Manifest xxxxxx.populate_sysroot not found in vs_imx8mp cortexa53 armv8a-crc armv8a aarch64 allarch x86_64_x86_64-nativesdk (variant '')?
So any helpful information would be appreciated!
Hacked like this:
Recipe.bb:
do_install_append() {
# Set permision without run flag so that it doesn't fail on checks
chmod 644 ${D}/usr/bin/#RECIPE#-compiler
}
# #RECIPE# generates a compiler during the target generation step
#separate this to the -native-bin package, and skip the ARCH checks
#also in the image file for stations_sdk move the app to right dir and add execute flag
PACKAGES_prepend = "${PN}-native-bin "
PROVIDES_prepend = "${PN}-native-bin "
INSANE_SKIP_${PN}-native-bin = "arch"
FILES_${PN}-native-bin = "/usr/bin/#RECIPE#-compiler"
SYSROOT_DIRS += "/"
Image.bb:
# #RECIPE# produces a compiler that is produced as a part of the target generation
#so we use the recipe and hack it to supply the -compiler as part of the
#host binaries
TOOLCHAIN_TARGET_TASK_append = " #RECIPE#-native-bin"
do_fix_#RECIPE#() {
mv ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/usr/bin/#RECIPE#-compiler ${SDK_OUTPUT}/${SDKPATHNATIVE}/usr/bin/#RECIPE#-compiler
chmod 755 ${SDK_OUTPUT}/${SDKPATHNATIVE}/usr/bin/#RECIPE#-compiler
}
SDK_POSTPROCESS_COMMAND_prepend = "do_fix_#RECIPE#; "
This produces at the end the binary in the right directory

SRC_URI not working in bitabake recipe

I created a bitbake recipe for installing https://pypi.python.org/pypi/Adafruit-GPIO/1.0.3 python package. Following is my recipe
DESCRIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "CLOSED"
PR = "r1"
SRC_URI = "https://pypi.python.org/packages/db/1c/2dc8a674514219f287fa344e44cadfd77b3e2878d6ff602a8c2149b50dd8/Adafruit_GPIO-1.0.3.tar.gz"
inherit pypi setuptools
do_install_append() {
rm -f ${D}${libdir}/python*/site-packages/site.py*
}
do_compile_prepend() {
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_BUILD_ARGS} || \
true
}
SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"
But whenever I try to bitbake recipe I always receive following error
ERROR: Function failed: Fetcher failure for URL: 'https://pypi.python.org/packages/source/A/Adafruit-GPIO/Adafruit-GPIO-1.0.3.tar.gz'. Unable to fetch URL from any source
My question why does bitbake tries to download from some other link while I have some other link in SRC_URI? How can I correct my recipe>
It's pypi.bbclass that specifies another download URL.
So either
remove inherit pypi
or
remove your SRC_URI. In this case, you will also need to set PYPI_PACKAGE = "Adafruit-GPIO" to the correct package name in pypi (as your recipe has a - instead of a _ in its name).
See pypi.bbclass
An untested version of your recipe that at least builds on my system is adafruit-gpio_1.0.3.bb (note, only lowercase letters in the recipe name):
DERIPTION = "Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries"
SECTION = "devel/python"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://PKG-INFO;md5=e41c52dbe1b96447d1c50129a124f586"
SRC_URI[md5sum] = "dfcdb1ba90188d18ba80b6d2958c8c33"
SRC_URI[sha256sum] = "d6465b92c866c51ca8f3bc1e8f2ec36f5ccdb46d0fd54101c1109756d4a2dcd0"
PYPI_PACKAGE = "Adafruit_GPIO"
inherit pypi setuptools

bitbake error package not found in base feeds

I want to include https://pypi.python.org/pypi/ndeflib in my image. Thus I created a recipe for this. Following are the contents of python-ndeflib_0.2.0.bb
DESCRIPTION = "NFC Data Exchange Format decoder and encoder."
SECTION = "devel/python"
LICENSE = "CLOSED"
SRC_URI = "https://pypi.python.org/packages/0c/0f/b9d94cee7847697469c49a25b4d23236de534451990b83008e6bf4fab15b/ndeflib-0.2.0.tar.gz"
do_install_append() {
rm -f ${D}${libdir}/python*/site-packages/site.py*
}
do_compile_prepend() {
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_BUILD_ARGS} || \
true
}
SRC_URI[md5sum] = "b7ae0c34f49289c44c292e24843cfeb1"
I am able to bitbake python-ndeflib successfully
but whenever I try to build my final os image bitbake fsl-image-machine-test
the process fails at the with following error
ERROR: python-ndeflib not found in the base feeds
Thus where I am making mistake?
I had this error (projectname not found in base feeds in do_rootfs)solved in different project (non cmake , non make) with this:
ALLOW_EMPTY_${PN} = "1"
in its *.bb file.
Some other people has this error because they were using capital letters in project name.
Did you try to write a recipe similar to the one in your previousquestion? That should have solved your issue.
Writing something similar to that recipe, gives you python3-ndeflib_0.2.0.bb:
DESCRIPTION = "NFC Data Exchange Format decoder and encoder."
SECTION = "devel/python"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=f7c92777f3af9604e192a0d195b6a6a4"
SRC_URI[md5sum] = "b7ae0c34f49289c44c292e24843cfeb1"
SRC_URI[sha256sum] = "baa86a48cf310cf77524f6fa04f5bd90775c4c290116b6b543aa3d6d65b721bf"
inherit pypi setuptools3
Which seems to work pretty well. Note that I used Python 3 instead of two (setuptools3).
Ie inherit setuptools or setuptools3 instead of writing your own do_compile, do_install, etc, unless you really have to.

How to add HAProxy package into bitbake recipe

I am new to bitbake recipe. I am trying to add HAProxy package into bitbake. I am trying to create a recipe but not sure how to proceed with it.
so far I have just made it till here:
SUMMARY = "HAProxy support for NEXT"
HOMEPAGE = "http://www.haproxy.org/"
SECTION = "tools"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2d862e836f92129cdc0ecccc54eed5e0"
SRC_URI = "http://www.haproxy.org/download/1.6/src/haproxy-${PV}.tar.gz"
SRC_URI[md5sum] = "3362d1e268c78155c2474cb73e7f03f9"
SRC_URI[sha256sum] = "fd06b45054cde2c69cb3322dfdd8a4bcfc46eb9d0c4b36d20d3ea19d84e338a7"
Can anyone point me to right direction?
haproxy is a Makefile based project, so this link should help:
http://www.yoctoproject.org/docs/2.1/dev-manual/dev-manual.html#new-recipe-makefile-based-package
You should define this variable in your recipe:
EXTRA_OEMAKE = "TARGET=XXX"
replacing XXX by the target your are interested (generic, linux22, linux24, and so on). That string TARGET=XXX will be passed as argument to the 'make' command, so bitbake will start compilation. Most probably that's all you need.