pytorch / pytorch/cpuinfo

missing `libcpuinfo.pc` from distro package install

Open
#241 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.2k
Forks
409
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's pkg-config example and the Ubuntu libcpuinfo-dev file list, then inspect the repository's CMake install and packaging configuration; the issue names no specific files or tests. Done means the distro package includes libcpuinfo.pc and pkg-config --cflags --libs libcpuinfo succeeds after installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, ubuntu
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.