Yocto build for a static library fails with error No Match Found
Yocto will automatically split up the files installed in ${D}
into different packages. In your case the helloworld.h will go into ${PN}-dev
(${PN}
equals static in your case, but I write ${PN} to avoid confusion) and libhelloworld.a will go into ${PN}-staticdev
, but since there's no other files there will not be a package called ${PN}
since it would be empty.
If you really want the static library to end up in the image, use IMAGE_INSTALL_append = "static-staticdev"
There's also a problem that there is no file that will be included in the plain ${PN}
package, which with the default settings means that no such package will be created. This is a problem since the ${PN}-dev
package has a runtime dependency on ${PN}
. This can be solved by allowing the creation of ${PN}
even if it's empty, enable this by adding ALLOW_EMPTY_${PN} = "1"
Yocto add Shared Library
The dbcppp
Cmake file already has an install
target that installs everything automatically, so you do not need do_install
.
Try the following recipe:
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "gitsm://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master"
PV = "1.0+gitr${SRCPV}"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
inherit cmake
FILES_${PN} += "/usr/lib/xml2Conf.sh /usr/lib/lib*.so.*"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"
The non-versioned shared libraries .so
topic is difficult in Yocto, that's why skipping the QA shared library issue is the way to go here if you have no control on the source project's files/libraries.
The above recipe splits into multiple packages:
dbcppp
(If you want just thedbcppp
binary (.so files are shipped for the binary to run)dbcppp-dev
(If you want the header files and the shared libraries)dbcppp-doc
(If you want the man and html pages)
Yocto bitbake build error when adding fftw package
The fftw recipe is set up to create a few different packages (RPM) like libfftw, libfftwl, libfftwf, fftw-wisdom, fftwl-wisdom, fftwf-wisdom, and fftw-wisdom-to-conf.
You probably want to add one or more of those. It seems there is no actual fftw package.
It is important to remember that IMAGE_INSTALL and RDEPEND lists items from the package namespace, while DEPENDS lists items from the recipe namespace.
If you are unsure about which package you want to install you can inspect the packages-split folder for fftw in tmp/work to see which files are included in which package.
Yocto build could not invoke dnf . command && no Match for the argument : recipe-name
I got the above code working with the suggestion and help
Thank you so much
The updated recipe is:
'
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
S = "${WORKDIR}"
PR = "r0"
SRC_URI = "\
file://src/ \
file://third_party/pybind11/ \
file://third_party/CLI11/ \
file://third_party/c-periphery/ \
file://CMakeLists.txt \
"
inherit cmake pkgconfig python3native
DEPENDS += "openssl python3-six-native python3-pytest-runner-native"
EXTRA_OECMAKE = ""
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/build/datagen ${D}${bindir}
}
DEPENDS += "udev"
FILES_${PN} += "${D}${bindir}/"
ALLOW_EMPTY_${PN} = "1"
'
undefined reference error while linking static library in bitbake recipe
Figured out the issue, it was actually a silly mistake
${CC} ${CFLAGS} ${LDFLAGS} rttapp.c -o rttapp
should have been
${CC} rttapp.c ${CFLAGS} ${LDFLAGS} -o rttapp
No bb files found in layer
A Yocto layer have a configuration file that describes where to look for recipes .bb
and recipes append files .bbappend
:
meta-tutorial/conf/layer.conf
:
...
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
^
|
(Look closely)-----------------
...
so, your mistake is that you put your recipe under the path:
meta-tutorial/recipe-example/hello
^
|
(The mistake)-------
So, your recipe should be under:
meta-tutorial/recipes-example/hello
^
|
(Correction)---------
Yocto recipe not extract archive
As mentionned in the link you provided that:
The unpack call automatically decompresses and extracts files with
".Z", ".z", ".gz", ".xz", ".zip", ".jar", ".ipk", ".rpm". ".srpm",
".deb" and ".bz2" extensions as well as various combinations of
tarball extensions.
it extracts .gz
automatically into ${WORKDIR}
.
The issue with your recipe is that you are creating /my-app
but not filling it with any content.
Keep in mind that the compressed file is unpacked under ${WORKDIR}
, so install it into ${D}/my-app
:
do_install(){
# Create directories
install -d ${D}/my-app
# Install unpacked application
# install -m 0755 app ${D}/my-app
# ...
}
I do not know the content of your application, so change that according to it.
Related Topics
What Does the Line '!/Bin/Sh -E' Do
Changing Color of Eclipse Links in Quick Fix or Eclipse Links in Preferences on Linux
Visual Studio Code Debugger Error:"Could Not Find the Task 'Gcc Build Active File'
Sending Sigint from Keyboard to Piped Commands in Bash
Read File Without Disk Caching in Linux
Sed Error:Bad Option in Substitution Expression
Too Many Open Files Error While Running Awk Command
What Do the Suffixes "+" and "-" After the Job Id of Background Jobs Mean
Get a Spectrum of Frequencies from Wav/Riff Using Linux Command Line
How to Produce Stand Alone Haskell Executable
Can't Source Script in a Current Directory
Anaconda Libstdc++.So.6: Version 'Glibcxx_3.4.20' Not Found
Bluetooth Error: Native Library Bluecove_Arm Not Available
What's the Difference Between 'Push' and 'Pushq' in At&T Assembly
Objdump and Resolving Linkage of Local Function Calls
Linux/Module.H No Such File or Directory
How to Find Out Where Is My Code Causing Glib-Gobject-Critical