Skip to contentSkip to conversation

SDK does not contain pkg-config files

DISCUSSION Mike Looijmans 3 participants 6 messages Jul 31, 2019 – Aug 2, 2019

lore
Share & tools
lore
#0 lore raw

I'm trying to get the SDK to work, but no success because the SDK apparently does not install any pkg-config file, resulting in autotools and cmake not being able to find any library.

Built the SDK using "bitbake -c populate_sdk image"

Install the resulting SDK, and source the shell script.

Building "helloworld" works. Building something slightly more advanced fails, because pkg-config isn't working: "pkg-config --list-all" is empty.

The cause is that the pkgconfig files simply aren't in the sysroot:

$ echo $PKG_CONFIG_PATH
/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig:/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig
$ ls /home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig
ls: cannot access 
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig': 
No such file or directory
$ ls /home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig
ls: cannot access 
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig': 
No such file or directory
#1 lore raw
Quoted 13 lines · Mike Looijmans

I'm trying to get the SDK to work, but no success because the SDK apparently does not install any pkg-config file, resulting in autotools and cmake not being able to find any library.

Built the SDK using "bitbake -c populate_sdk image"

Install the resulting SDK, and source the shell script.

Building "helloworld" works. Building something slightly more advanced fails, because pkg-config isn't working: "pkg-config --list-all" is empty.

The cause is that the pkgconfig files simply aren't in the sysroot:

Quoted 10 lines
$ echo $PKG_CONFIG_PATH
/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig:/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig
$ ls /home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig
ls: cannot access
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig':
No such file or directory
$ ls /home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig
ls: cannot access
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig':
No such file or directory

Looks like something went wrong.

My host has minimal -dev packages installed:

$ dpkg -l \*-dev|grep ii
ii  dpkg-dev                  1.19.7            all          Debian package development tools
ii  libc6-dev:amd64           2.28-10           amd64        GNU C Library: Development Libraries and Header Files
ii  libgcc-8-dev:amd64        8.3.0-6           amd64        GCC support library (development files)
ii  libstdc++-8-dev:amd64     8.3.0-6           amd64        GNU Standard C++ Library v3 (development files)
ii  linux-libc-dev:amd64      4.19.37-5+deb10u1 amd64        Linux support headers for userspace development
ii  manpages-dev              4.16-2            all          Manual pages about using GNU/Linux for development

But inside a core-image-minimal SDK:

$ ls sysroots/corei7-64-poky-linux/usr/lib/pkgconfig/ | head
blkid.pc
check.pc
com_err.pc
dbus-1.pc
dbus-glib-1.pc
e2p.pc
expat.pc
ext2fs.pc
fdisk.pc
form.pc
$ pkg-config  --list-all | head
zlib                  zlib - zlib compression library
gio-unix-2.0          GIO unix specific APIs - unix specific headers for glib I/O library
libdw                 libdw - elfutils library for DWARF data and ELF file or process inspection
libkmod               libkmod - Library to deal with kernel modules
applewmproto          AppleWMProto - AppleWM extension headers
gio-2.0               GIO - glib I/O library
dbus-glib-1           dbus-glib - GLib integration for the free desktop message bus
xf86dgaproto          XF86DGAProto - XF86DGA extension headers
rpm                   RPM - RPM Package Manager
xcb-composite         XCB Composite - XCB Composite Extension

So, works for me?

Ross
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#2 lore raw
Quoted 74 lines · Ross Burton
Quoted 16 lines · Mike Looijmans

I'm trying to get the SDK to work, but no success because the SDK apparently does not install any pkg-config file, resulting in autotools and cmake not being able to find any library.

Built the SDK using "bitbake -c populate_sdk image"

Install the resulting SDK, and source the shell script.

Building "helloworld" works. Building something slightly more advanced fails, because pkg-config isn't working: "pkg-config --list-all" is empty.

The cause is that the pkgconfig files simply aren't in the sysroot:

$ echo $PKG_CONFIG_PATH
/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig:/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig 
Quoted 9 lines
$ ls /home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig
ls: cannot access
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/lib/pkgconfig':
No such file or directory
$ ls 
/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig
ls: cannot access
'/home/mike/p/sysroots/cortexa9t2hf-neon-oe-linux-gnueabi/usr/share/pkgconfig':
No such file or directory

Looks like something went wrong.

My host has minimal -dev packages installed:

$ dpkg -l \*-dev|grep ii
ii  dpkg-dev                  1.19.7            all          Debian package 
development tools
ii  libc6-dev:amd64           2.28-10           amd64        GNU C Library: 
Development Libraries and Header Files
ii  libgcc-8-dev:amd64        8.3.0-6           amd64        GCC support 
library (development files)
ii  libstdc++-8-dev:amd64     8.3.0-6           amd64        GNU Standard C++ 
Library v3 (development files)
ii  linux-libc-dev:amd64      4.19.37-5+deb10u1 amd64        Linux support 
headers for userspace development
ii  manpages-dev              4.16-2            all          Manual pages 
about using GNU/Linux for development

But inside a core-image-minimal SDK:

$ ls sysroots/corei7-64-poky-linux/usr/lib/pkgconfig/ | head
blkid.pc
check.pc
com_err.pc
dbus-1.pc
dbus-glib-1.pc
e2p.pc
expat.pc
ext2fs.pc
fdisk.pc
form.pc
$ pkg-config  --list-all | head
zlib                  zlib - zlib compression library
gio-unix-2.0          GIO unix specific APIs - unix specific headers for glib 
I/O library
libdw                 libdw - elfutils library for DWARF data and ELF file or 
process inspection
libkmod               libkmod - Library to deal with kernel modules
applewmproto          AppleWMProto - AppleWM extension headers
gio-2.0               GIO - glib I/O library
dbus-glib-1           dbus-glib - GLib integration for the free desktop 
message bus
xf86dgaproto          XF86DGAProto - XF86DGA extension headers
rpm                   RPM - RPM Package Manager
xcb-composite         XCB Composite - XCB Composite Extension
Quoted 1 line

So, works for me?

Well, that's at least good to know.

I'm on the "thud" branch currently, so I hope this isn't something that got fixed only recently.

I'll try some simple images first. I gather there's no particular magic incantation I need to put into my image recipe to get the pkg-config files into the SDK sysroot?

--
M.

#3 lore raw
Quoted 8 lines · Mike Looijmans

Well, that's at least good to know.

I'm on the "thud" branch currently, so I hope this isn't something that got fixed only recently.

I'll try some simple images first. I gather there's no particular magic incantation I need to put into my image recipe to get the pkg-config files into the SDK sysroot?

Right, they're just in the -dev packages. I'd try building a core-image-minimal SDK to verify that works, as I suspect you've done something in your image to break the SDK.

Ross
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#4 lore raw
Quoted 6 lines · Ross Burton
Quoted 5 lines · Mike Looijmans

Well, that's at least good to know.

I'm on the "thud" branch currently, so I hope this isn't something that got fixed only recently.

Quoted 7 lines
Quoted 3 lines

I'll try some simple images first. I gather there's no particular magic incantation I need to put into my image recipe to get the pkg-config files into the SDK sysroot?

Right, they're just in the -dev packages.  I'd try building a core-image-minimal SDK to verify that works, as I suspect you've done something in your image to break the SDK.

I think I found it.

The image installs the dropbear SSH server, and the openssh-sftp-server. These seem to cause a conflict, and then ALL the "-dev" packages get skipped.

The warning looks like this (I removed some sensitive information and a list of a few hundred package names):

WARNING: prolira-delirium-image-1.0-r0 do_populate_sdk: Unable to install packages. Command '.../..-image/1.0-r0/recipe-sysroot-native/usr/bin/opkg
--volatile-cache -f ... --force_postinstall --prefer-arch-to-version install
... binutils-dev liblzo2-dev ... libaio-dev' returned 1:
Collected errors:
* Solver encountered 1 problem(s):
* Problem 1/1:
* - package openssh-dev-7.8p1+git-r0.cortexa9t2hf-neon requires openssh =
7.8p1+git-r0, but none of the providers can be installed
*
* Solution 1:
* - allow deinstallation of packagegroup-core-ssh-dropbear-1.0-r1.all

* - do not ask to install a package providing dropbear-dev

* - do not ask to install a package providing
packagegroup-core-ssh-dropbear-dev

* Solution 2:
* - do not ask to install a package providing openssh-dev

If I remove "openssh-sftp-server" from the packages, the warning (which should have been an error?) disappears and the resulting SDK properly contains all the pkg-config files again.

I wonder if there's a proper fix to prevent this, i.e. break the link between openssh-sftp-server and openssh-dev.

#5 lore raw
Quoted 48 lines · Mike Looijmans
Quoted 6 lines · Ross Burton
Quoted 5 lines · Mike Looijmans

Well, that's at least good to know.

I'm on the "thud" branch currently, so I hope this isn't something that got fixed only recently.

Quoted 7 lines
Quoted 3 lines

I'll try some simple images first. I gather there's no particular magic incantation I need to put into my image recipe to get the pkg-config files into the SDK sysroot?

Right, they're just in the -dev packages. I'd try building a core-image-minimal SDK to verify that works, as I suspect you've done something in your image to break the SDK.

I think I found it.

The image installs the dropbear SSH server, and the openssh-sftp-server. These seem to cause a conflict, and then ALL the "-dev" packages get skipped.

The warning looks like this (I removed some sensitive information and a list of a few hundred package names):

WARNING: prolira-delirium-image-1.0-r0 do_populate_sdk: Unable to install packages. Command '.../..-image/1.0-r0/recipe-sysroot-native/usr/bin/opkg
--volatile-cache -f ... --force_postinstall --prefer-arch-to-version install
... binutils-dev liblzo2-dev ... libaio-dev' returned 1:
Collected errors:
* Solver encountered 1 problem(s):
* Problem 1/1:
* - package openssh-dev-7.8p1+git-r0.cortexa9t2hf-neon requires openssh =
7.8p1+git-r0, but none of the providers can be installed
*
* Solution 1:
* - allow deinstallation of packagegroup-core-ssh-dropbear-1.0-r1.all

* - do not ask to install a package providing dropbear-dev

* - do not ask to install a package providing
packagegroup-core-ssh-dropbear-dev

* Solution 2:
* - do not ask to install a package providing openssh-dev

Quoted 7 lines

If I remove "openssh-sftp-server" from the packages, the warning (which should have been an error?) disappears and the resulting SDK properly contains all the pkg-config files again.

I wonder if there's a proper fix to prevent this, i.e. break the link between openssh-sftp-server and openssh-dev.
--

RDEPENDS_${PN}-dev_remove = "openssh-sftp-server"

in openssh recipe might be able to do it

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core