Georgi Georgiev
2018-12-05 10:36:18 UTC
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
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
Ross
--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