Discussion:
[yocto] Missing headers in /usr/inlcude for software developers
Georgi Georgiev
2018-12-05 10:36:18 UTC
Permalink
Thank you Ross.
Everything went fine with makefile. It works in yocto and from cl
Now another issue arise. The software guys will need the headers and when I "populated" sdk they were not in the rootfs. The symbolic links also were not there. The symlink (so.0) and the library is present in the image rootfs. Here is my recipe libanybus-m40.so_0.0.1.bb:
DESCRIPTION = "Anybus M40 Library"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${THISDIR}/files/LICENSE;md5=5959e502cb44bafc53b2cc9400e3d4cd"
PR = "r0"
SRC_URI = "git:///home/w23698/projects/anybus/Generic;branch=anybus-lib-0.0.1"
SRCREV = "8594b81241e9538d2ad4d01041e30d97a20b5a43"
S = "${WORKDIR}/git"
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"
DEPENDS = "libgpiod"

# This is to satisfy yocto QA
TARGET_CC_ARCH += "${LDFLAGS}"

do_compile() {
oe_runmake
}

do_install() {
install -d ${D}${libdir}
install -m 0644 ${PN}.${PV} ${D}${libdir}
}
Obvously I am missing something else....
Cordially
-----Original Message-----
From: Burton, Ross [mailto:***@intel.com]
Sent: Tuesday, December 04, 2018 5:44 PM
To: Georgi Georgiev <***@woodward.com>
Cc: Yocto-mailing-list <***@yoctoproject.org>
Subject: Re: [EXTERNAL] Re: [yocto] Missing dependencies in recipe-sysroot

No, you just need to write your makefile correctly. libgpiod has a pkg-config file, so instead of hard-coding paths like /usr/lib (because you don't know that's where it is installed) just use pkg-config to get the flag:

gcc $(pkg-config --cflags --libs libgpiod) ...

Ross
OK but. I can use SDKTARGETSYSROOT in my makefile but then it will fail in yocto...So I can't have one makefile for yocto and command line build...I found one tread for similar issue and I will take a look in poky/meta/conf/bitbake.conf tomorrow.
Georgi
-----Original Message-----
Sent: Tuesday, December 04, 2018 4:13 PM
Subject: Re: [EXTERNAL] Re: [yocto] Missing dependencies in
recipe-sysroot
LIB := -L/usr/lib
^ don't do that. That's not where the libraries are.
Ross
--
Burton, Ross
2018-12-05 10:48:00 UTC
Permalink
On Wed, 5 Dec 2018 at 10:37, Georgi Georgiev
Post by Georgi Georgiev
Thank you Ross.
Everything went fine with makefile. It works in yocto and from cl
Headers and symlinks for what recipe? This one?
Post by Georgi Georgiev
DESCRIPTION = "Anybus M40 Library"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${THISDIR}/files/LICENSE;md5=5959e502cb44bafc53b2cc9400e3d4cd"
Checksum a file in the source tree.
Post by Georgi Georgiev
PR = "r0"
Redundant, you can remove.
Post by Georgi Georgiev
PACKAGES = "${PN} ${PN}-dev ${PN}-dbg"
Redundant, remove.
Post by Georgi Georgiev
# This is to satisfy yocto QA
TARGET_CC_ARCH += "${LDFLAGS}"
Better to fix your makefile so it doesn't override LDFLAGS
assignments: your makefile is what is broken here.
Post by Georgi Georgiev
do_compile() {
oe_runmake
}
That's the default, you can remove this.
Post by Georgi Georgiev
do_install() {
install -d ${D}${libdir}
install -m 0644 ${PN}.${PV} ${D}${libdir}
}
Obvously I am missing something else....
You're not installing the headers or library symlinks, which is why
they're not in the SDK.

I suggest you move from raw makefiles to a build utility such as
autotools, cmake, or meson.

Ross
--

Loading...