Hi,

I’m building a Qt application to controls a few GPIOs so, in my recipe, I add 
libgpiod to the DEPENDS variable, but even then the –lgpiod is missing in the 
linking stage and the build fails with several ‘undefined reference’ errors to 
the gpiod functions:

| 
/build/tmp/work/cortexa53-crypto-imx-ked-linux/testapp/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:48: undefined reference to 
`gpiod_chip_get_line'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:55: undefined reference to 
`gpiod_line_request_output'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:61: undefined reference to 
`gpiod_line_set_value'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:67: undefined reference to 
`gpiod_line_release'

| /build/tmp/work/cortexa53-crypto-imx-ked-linux/ testapp 
/0.1-r0/recipe-sysroot-native/usr/bin/aarch64-ked-linux/../../libexec/aarch64-ked-linux/gcc/aarch64-ked-linux/11.4.0/ld:
 /usr/src/debug/ testapp /0.1-r0/build/../m4/inou.c:69: undefined reference to 
`gpiod_chip_close'

This is my recipe:

SUMMARY = "GPIO QT TEST APPLICATION"

DESCRIPTION = "GPIO user interface build with QT"

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = " 
file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6
 ( 
file://$%7bCOREBASE%7d/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6
 ) "

SRC_URI = "<source files added here>"

DEPENDS += "qtbase qtdeclarative qtmultimedia qtwebengine *libgpiod* "

RDEPENDS:${PN} += "qtxmlpatterns qtdeclarative-qmlplugins qtbase-plugins 
ttf-dejavu-sans qtquickcontrols qtquickcontrols2 qtfreevirtualkeyboard "

S = "${WORKDIR}"

do_install:append () {

install -d ${D}${bindir}

install -m 0775 qt_testgpio ${D}${bindir}

}

FILES:${PN} += "${bindir}/qt_testgpio"

FILES:${PN} += "/opt/*"

inherit qmake5

What am I missing? Shouldn’t the inclusion of libpgiod library to the DEPENDS 
variable result in the addition of –lgpiod to the link command? I tried to add 
LDFLAGS:append = “ –lgpiod” but it didn’t solve the problem.

Any help will be appreciated.

Kind regards,

Javi
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#61612): https://lists.yoctoproject.org/g/yocto/message/61612
Mute This Topic: https://lists.yoctoproject.org/mt/102383036/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to