[yocto] Empty "normal" package, filled dev and dbg packages, tr-50 lib

Jakob Hasse jakob.hasse at smart-home-technology.ch
Tue Jan 31 08:53:47 PST 2017


Hello,

I still try to include the tr-50 library into my build, which is an 
autotools manages library. The code is fetch from git by bitbake.
The good thing: it builds, the compilation of the library itself gives 
no errors and after it I find the .so files several times in the build 
directory.
However, the packaging does not work as intended:
It builds the dev and dbg Versions of the package, but not the "normal" 
version of the package:
ls 
./tmp/work/armv7a-vfp-neon-dey-linux-gnueabi/tr-50/0.1-r0/deploy-rpms/armv7a_vfp_neon/
tr-50-dbg-0.1-r0.armv7a_vfp_neon.rpm tr-50-dev-0.1-r0.armv7a_vfp_neon.rpm

I could make bitbake building that package but that package was empty then.

My recipe:

DESCRIPTION = "the tr-50 (MQTT) library to communicate with the swisscom 
devicewise cloud"
SECTION = "libs"
LICENSE = "Unknown"
LIC_FILES_CHKSUM = "file://COPYING;md5=c8ee358fdf91d887aa014c8712e8c22d"
# md5sum only when source is a tar.gz
SRC_URI[md5sum] = "da7315f9bc22ff4c24a1cef404b4f3a8"
SRC_URI = "git://github.com/inhedron/libtr50.git;protocol=https"
SRCREV = "aedc45c4e9a9a9a3aa301616ad03f07b903d9a81"

# tryed the three lines below already, didn't help:
#FILES_${PN}-dev = ""
#FILES_SOLIBSDEV = ""
#ALLOW_EMPTY_${PN} = "1"

#PACKAGES =+ "${PN}"
S = "${WORKDIR}/git"

DEPENDS = "openssl "
# NOTE: if this software is not capable of being built in a separate 
build directory
# from the source, you should replace autotools with autotools-brokensep 
in the
# inherit line
inherit autotools

# Specify any options you want to pass to the configure script using 
EXTRA_OECONF:
EXTRA_OECONF = " --with-examples"

When I append tr-50-dev instead of tr-50 to the IMAGE_INSTALL in 
local.conf, then bitbake (or smart via bitbake) complains, too:
Computing transaction...error: Can't install 
tr-50-dev-0.1-r0 at armv7a_vfp_neon: no package provides tr-50 = 0.1-r0

There are also examples that come with the tr-50 lib which cannot 
bebuilt because the library tr-50 is missing (at least bitbake claims that).

As you can see in the recipe, I tryed three workarounds already that I 
found. None of them worked (except for ALLOW_EMPTY, which produced the 
physically intact but empty packet).

Best Regards and thanks in advance for answers,
Jakob

PS: Thanks for the responses I got already for the first description of 
my problem!

On 27.01.2017 19:16, Rick Altherr wrote:
> I hear you asking a lot of reasonable questions that probably seem 
> trivial to most of us who have been using Yocto for a while.  We tend 
> to forget what it was like the first time.
>
> I can't tell what reading and research you've done so far. Have you 
> read both the BitBake User Manual 
> <http://www.yoctoproject.org/docs/2.2/bitbake-user-manual/bitbake-user-manual.html> and 
> Yocto Project Reference Manual 
> <http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html>.  
> Those explain many vital details such as: what many of the variables, 
> like SRC_URI, are used for, the syntax rules for recipes, directory 
> structure of the metadata, and more.  It's a lot to read and some 
> sections are confusing but it's a huge resource that will answer many 
> questions.
>
> As others have mentioned, IRC and this mailing list are both excellent 
> places to ask questions.  I personally get asked a lot of questions 
> that require some research and more lengthy explanations.  I've 
> started writing my responses in an advice column form on my blog at 
> http://www.kc8apf.net/category/dear-brother-yocto/.  (Note to Yocto 
> experts: I'm certain to get things wrong in my explanations.  Please 
> send in corrections as well.  I'm happy to include them.).
>
> Rick
>
> On Fri, Jan 27, 2017 at 6:51 AM, Jakob Hasse 
> <jakob.hasse at smart-home-technology.ch 
> <mailto:jakob.hasse at smart-home-technology.ch>> wrote:
>
>     Hello Leon,
>
>     Thank you for the answer!
>
>     I read the documentation, it doesn't really give me more than
>     general hints what to try (or maybe I read at the wrong place). I
>     also read in  "Embedded Linux Project Using Yocto Project
>     Cookbook". I know that bitbake should use autotools somehow. I set
>     up my directories exactly like the other projects which work
>     without any issues. The other project, however, are simple
>     executables.
>
>     What is unclear to me:
>     To what shall SCR_URI point? The git repo? Downloaded .tar.gz
>     file? The source dir copied into the project directory besided the
>     recipe)? I tried all these ways already, each bringing up a
>     different error, basically.
>
>     Do I need to change do_install() or does the makefile handles it?
>     If I interpret the documentation and the book correctly, I don't
>     need to do anything more in the recipe...
>
>     When I want to fetch from git, it complains about the SRCREF not
>     being set. So I tried to set it to the most recent commit of the
>     repo in the recipe file, but it gave another error. I also tried
>     to "append" it somehow to the git URI which didn't work either.
>
>
>     Note that I need to include the development version of openssl,
>     not openssl itself (on Ubuntu host you do something like apt
>     install openssl-dev).
>
>     The recipe is appended, if it helps:
>
>     # Recipe created by recipetool
>     # This is the basis of a recipe and may need further editing in
>     order to be fully functional.
>     # (Feel free to remove these comments when editing.)
>     #
>     # WARNING: the following LICENSE and LIC_FILES_CHKSUM values are
>     best guesses - it is
>     # your responsibility to verify that the values are complete and
>     correct.
>     LICENSE = "Unknown"
>     LIC_FILES_CHKSUM =
>     "file://COPYING;md5=c8ee358fdf91d887aa014c8712e8c22d"
>     SRC_URI[md5sum] = "da7315f9bc22ff4c24a1cef404b4f3a8"
>     # No information for SRC_URI yet (only an external source tree was
>     specified)
>     SRC_URI =
>     "/usr/local/dey-2.0/sources/meta-training/recipes-examples/tr-50/tr-50-0.1/"
>     #SRC_URI =
>     "git://https://github.com/inhedron/libtr50.git;rev=aedc45c4e9a9a9a3aa301616ad03f07b903d9a81
>     <https://github.com/inhedron/libtr50.git;rev=aedc45c4e9a9a9a3aa301616ad03f07b903d9a81>"
>     #SRC_URI = "file:///home/jakob/Downloads/libtr50-0.1.0.tar.gz"
>     #SRCREF = "aedc45c4e9a9a9a3aa301616ad03f07b903d9a81"
>
>     DEPENDS = "openssl "
>     # NOTE: if this software is not capable of being built in a
>     separate build directory
>     # from the source, you should replace autotools with
>     autotools-brokensep in the
>     # inherit line
>     inherit autotools
>
>     # Specify any options you want to pass to the configure script
>     using EXTRA_OECONF:
>     EXTRA_OECONF = " --with-examples"
>
>     #do_install(){
>     #    eo_runmake install DESTDIR=${D} PREFIX=${D}
>     #}
>
>     Thanks in advance for any answers!
>
>     All the best,
>     Jakob
>
>
>     On 27.01.2017 14:39, Leon Woestenberg wrote:
>>     Hi Jakob,
>>
>>     welcome on-board.
>>
>>     The Yocto community expects you to re-use the available
>>     documentation and online resources (or even offline resources
>>     like books) on Yocto or OpenEmbedded. Then if things remains
>>     unclear you can ask questions here on the mailing list and on IRC
>>     channels yocto.
>>
>>     Your question (and probably a lot of subsequent things you learn
>>     on the way) can be answered by the documentation and existing
>>     resources.
>>
>>     I would recommend to read the documentation, then find an
>>     existing recipe that uses "autotools" and another that DEPENDS on
>>     openssl.
>>
>>     There are a lot of resources online:
>>
>>     http://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#new-recipe-writing-a-new-recipe
>>     <http://www.yoctoproject.org/docs/1.6.1/dev-manual/dev-manual.html#new-recipe-writing-a-new-recipe>
>>
>>     https://www.yoctoproject.org/tools-resources/community/irc
>>     <https://www.yoctoproject.org/tools-resources/community/irc>
>>
>>     Regards,
>>
>>     Leon.
>>
>>     On Fri, Jan 27, 2017 at 12:43 PM, Jakob Hasse
>>     <jakob.hasse at smart-home-technology.ch
>>     <mailto:jakob.hasse at smart-home-technology.ch>> wrote:
>>
>>         Hello,
>>
>>         I'm beginning with Yocto.
>>         I would like to know where to find general help (like a
>>         forum, or mailing lists) for my Yocto-related technical problems.
>>         Right now I have problems just integrating a library into my
>>         build. Later I will also do system development.
>>
>>         If this helps, a further description of my most urgent problem:
>>
>>         I want to integrate the tr-50 library, available on github:
>>
>>         https://github.com/inhedron/libtr50
>>         <https://github.com/inhedron/libtr50>
>>
>>         It is managed via autotools.
>>         I built a new project subdirectory in my custom layer for the
>>         lib.
>>         I built a basic recipe (with some tool) which, in principle
>>         should somehow recognize the autotools and build the project
>>         then. I changed the SCR_URI to the local .tar.gz file. But
>>         when I build, it comes down to this:
>>         make: *** No rule to make target 'install'. Stop.
>>         I don't know if and which parameters I should change in the
>>         recipe.
>>         Another problem is that the lib needs openssl-dev. I can't
>>         find how to include openssl-dev into the Yocto build.
>>
>>         Looking forward for your answers, best regards,
>>         Jakob
>>
>>         -- 
>>         Jakob Hasse
>>         Software Developement
>>
>>         E: jakob.hasse at smart-home-technology.ch
>>         <mailto:jakob.hasse at smart-home-technology.ch>
>>         T: +41 44 552 02 66 <tel:%2B41%2044%20552%2002%2066>
>>
>>         Smart Home Technology GmbH
>>         www.smart-home-technology.ch
>>         <http://www.smart-home-technology.ch>
>>
>>         -- 
>>         _______________________________________________
>>         yocto mailing list
>>         yocto at yoctoproject.org <mailto:yocto at yoctoproject.org>
>>         https://lists.yoctoproject.org/listinfo/yocto
>>         <https://lists.yoctoproject.org/listinfo/yocto>
>>
>>
>
>     -- 
>     Jakob Hasse
>     Software Developement
>
>     E:jakob.hasse at smart-home-technology.ch
>     <mailto:jakob.hasse at smart-home-technology.ch>
>     T:+41 44 552 02 66 <tel:+41%2044%20552%2002%2066>  
>
>     Smart Home Technology GmbH
>     www.smart-home-technology.ch <http://www.smart-home-technology.ch>
>
>     -- _______________________________________________ yocto mailing
>     list yocto at yoctoproject.org <mailto:yocto at yoctoproject.org>
>     https://lists.yoctoproject.org/listinfo/yocto
>     <https://lists.yoctoproject.org/listinfo/yocto> 
>
-- 
Jakob Hasse
Software Developement

E: jakob.hasse at smart-home-technology.ch
T: +41 44 552 02 66

Smart Home Technology GmbH
www.smart-home-technology.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170131/12b03cac/attachment.html>


More information about the yocto mailing list