Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing libcpuinfo.pc from distro package install #241

Open
frpunzalan opened this issue Apr 24, 2024 · 1 comment
Open

missing libcpuinfo.pc from distro package install #241

frpunzalan opened this issue Apr 24, 2024 · 1 comment

Comments

@frpunzalan
Copy link

frpunzalan commented Apr 24, 2024

Hi guys,

Thanks for all the work in this library.

I was trying to use the library by installing it from Ubuntu's package installer. I use the following command and successfully installed the libcpuinfo-dev package.

$ apt install libcpuinfo-dev

# the installed files are in the following directories
$ dpkg-query -L libcpuinfo-dev
/.
/usr
/usr/include
/usr/include/cpuinfo.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/share
/usr/share/doc
/usr/share/doc/libcpuinfo-dev
/usr/share/doc/libcpuinfo-dev/README.md.gz
/usr/share/doc/libcpuinfo-dev/copyright
/usr/lib/x86_64-linux-gnu/libcpuinfo.so
/usr/share/doc/libcpuinfo-dev/changelog.Debian.gz

However, when I try to add the library to my cmake file, it was not able to find it. I tried using the command to check the package as shown in the README but I get the following error:

$ pkg-config --cflags --libs libcpuinfo
Package libcpuinfo was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcpuinfo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcpuinfo' found

I tried looking for the libcpuinfo.pc file but it does not exist anywhere in the system. Am I missing a step for the package installation?

System Info:

$ lsb_release -a
LSB Version:	core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal
@prashanthswami
Copy link
Collaborator

Can't quite explain this, but maybe a helpful data point. I'm not using Ubuntu, but a similar base-image Debian version, and dpkg-query does indeed return the .pc file on installation:

/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libcpuinfo.pc

In terms of how to fix this, assuming it's a hiccup with the distro package . . . to be honest, I'm not sure what the maintainer relationship is between this repository and the repository that produces the distro. At a glance, the source seems to be from the Debian Machine Learning Team: https://salsa.debian.org/deeplearning-team/cpuinfo . They appear to just be supporting packaging software like this and others, so they might be the right folks to ask if a particular distro isn't doing the right thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants