Questions tagged [pkg-config]

For questions about pkg-config, a helper tool used when compiling applications and libraries; it facilitates the use of correct/specified compiler options.

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

When/why doesn't pkg-config return library link-path?

I want to make use of pkg-config in my Makefile to find the link-path for libspa-0.2. I observe that pkg-config --libs libspa-0.2 returns nothing. For simplicity, I'll demonstrate the problem by ...
StoneThrow's user avatar
  • 1,615
0 votes
1 answer
23 views

libudev not found in pkg-config search path in GitHub actions ubuntu-latest environment

I'm setting up CI for a Rust application I'm developing that (indirectly) depends on the libudev-sys crate. Part of this CI means building my crate, which means also building libudev-sys. When the ...
Zoe's user avatar
  • 31
0 votes
1 answer
78 views

pkg-config cannot find any libraries without manual intervention

I am not a C++ developer or typically work with Conan, CMake, or Makefiles. The first time I had heard of pkg-config was yesterday when conan started erroring on it, unable to resolve a gl package. I ...
Xevion's user avatar
  • 101
1 vote
2 answers
970 views

Rustup-installed Rust on Fedora: Unable to find Libudev.pc

I'm trying to build a rust app on fedora within a rustup environment that depends on libudev. At the moment I get the error when trying to compile the app with cargo build --release: error: failed to ...
Vivek Gani's user avatar
0 votes
0 answers
49 views

So i havent upgraded my PopOS 21.04 in a while and i keep getting this error message when trying to upgrade

dpkg: error processing archive /var/cache/apt/archives/libxpm4_1%3a3.5.12-1_amd64.deb (--unpack): trying to overwrite shared '/usr/share/doc/libxpm4/changelog.Debian.gz', which is different from other ...
SudoCrypted's user avatar
5 votes
1 answer
321 views

How to get the build procedure for a Debian package?

I want to build a version of some software that is more recent than the one that is currently available as a stable release Debian package. To do this, however, other than using a more recent version ...
kjo's user avatar
  • 15k
2 votes
1 answer
2k views

Why are the pkg-config commands in the makefile not being recognized when I run the script?

I am trying to run make for an open-source project on my Debian virtual machine but I do not understand why the commands based on pkg-config are not being recognized. One of the commands is as follows:...
a_sid's user avatar
  • 247
4 votes
3 answers
2k views

How do I build PKGCONF and LIBFFI and subsequently Python3.9 with ctypes support without sudo and write access to /usr/local?

How do I properly configure pkgconf and libffi to allow the python3 build process to correctly use my libffi version at every step of the build process, in order to import the _ctypes module correctly?...
szofar's user avatar
  • 43
1 vote
0 answers
558 views

How to write a file PkgConfig.pc file that supports both static and shared linking

I am writing a little library as a self challenge. I plan to target Linux based systems. I want to add a libname.pc file so as to add support for PkgConfig. Here, is my current file: prefix=/usr/local ...
Mansoor Ahmed Memon's user avatar
1 vote
1 answer
923 views

How does pkg-config work in RPM specfiles?

In some RPM specfiles, I see lines like: BuildRequires: pkgconfig(ice) BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(libssl) ... I am not very familiar with pkgconfig but I understand ...
the_endian's user avatar
0 votes
1 answer
920 views

pkg-config cannot find any package

I need to use latest version of pkg-config. So I build it from source with --with-internal-glib --disable-host-tool. However, it cannot find any package without setting PKG_CONFIG_PATH. How can I ...
Wang's user avatar
  • 1,244
0 votes
1 answer
404 views

some troubles on installing deja-dup from source code

(Learning how to install programs on linux...) deja-dup source code can be downloaded on its GitHub repo. There is a makefile con the package. Once into the folder I run: santi@eoan:~/deja-dup$ make ...
user avatar
1 vote
0 answers
2k views

How do you specify the pkg-config path when compiling something with cmake?

I want to build ffmpeg with support for the av1 codec on CentOS 7. I start by following the instructions here: git clone https://aomedia.googlesource.com/aom mkdir aom_build cd aom_build cmake ../aom ...
Tal's user avatar
  • 2,012
5 votes
2 answers
3k views

Not clear where pkg-config is finding information or how .pc files are named

I followed a tutorial on GTK which used this command to generate the build flags: $ pkg-config --cflags --libs gtk+-3.0 This outputs coherent flags. From research, I have found that pkg-config ...
rur2641's user avatar
  • 389
0 votes
1 answer
1k views

Two OpenCV versions: update to one broke the other, though they should be separate

My Linux distribution (Antergos) installed the latest version of OpenCV from the repositories (version 3.14.1) about a week ago. For compatibility, I have OpenCV 2 (version 2.4.13.5) installed in a ...
ElderFuthark's user avatar
1 vote
1 answer
2k views

why are .pc files not listed in one place

I am on Debian buster. I was reading the manpage of pkg-config and found that .pc files are and can be listed in many places . From the manpage - pkg-config retrieves information about ...
shirish's user avatar
  • 12.2k
0 votes
2 answers
1k views

header not found even though `PKG_CONFIG_PATH` is set correctly

I've installed a library to ~/.local. The environment variables are set as shown below: $ echo $LD_LIBRARY_PATH /home/saga//.local/lib $ echo $PKG_CONFIG_PATH /home/saga//.local/lib/pkgconfig There'...
saga's user avatar
  • 1,391
-1 votes
1 answer
355 views

Is PATH a special variable in zsh? [closed]

The first two lines of my .zprofile are: export PATH=<value> export PKG_CONFIG_PATH=<value> The value of PATH is set correctly, but the value of second variable is empty. Is PATH a ...
saga's user avatar
  • 1,391
4 votes
1 answer
5k views

Why is pkg-config --cflags openssl returning nothing on RHEL 6.8?

I'm running on a RHEL 6.8 Linux machine. I am seeking to build various packages from source tarballs/git-repos/whatefer without changing the system configuration (under root or sudo). I'm running on ...
bgoodr's user avatar
  • 197
0 votes
1 answer
1k views

pkg-config doesn't recognizing any options for some reason

I'd like to use pkg-config to change the include dirs for a package, but it looks like it doesn't accept any options. After issuing the following command: pkg-config --cflags ImageMagick -fopenmp -...
Gergely Lukacsy's user avatar
0 votes
1 answer
1k views

pkg-config flags are relative

I'm trying to compile bmdtools with a custom built version of libav 11 which I compiled under ~/libav-11.8/build using g++ 4.8.4 under Ubuntu 14.04. bmd uses pkg-config to build g++ flags, and since ...
Grasshopper's user avatar
1 vote
1 answer
85 views

How to know whether command is available in my linux distribution

We are shipping some drivers for some linux for our usb products. And in our driver code to make it distribution independent we have to dynamically get the distribution name and find whether there are ...
sandun dhammika's user avatar
1 vote
1 answer
73 views

How to use MonoDevelop pc files with UNIX convention relative pathnames?

On my Ubuntu Linux 16.04 Lenovo desktop , I am using MonoDevelop 5.10 with the Xamarin ASP.NET plugin for development and production environments. I am using *.pc files with Unix convention full ...
Frank's user avatar
  • 661
3 votes
1 answer
561 views

Command substitution with pkg-config in Fish

Fish's command substitution is supposed to be the equivalent of Bash's $() yet this simple example fails: g++ -std=c++14 -Wall -Wextra -pedantic -g (pkg-config --cflags sdl2) \ test.cpp (pkg-...
user170107's user avatar
2 votes
1 answer
6k views

pkg-config output not working with makefile?

I'm trying to run the makefile, shown in this repo, which is a simple Wayland client. But when I run make, it seems that the output of $(WAYLAND) is blank, and it fails to compile due to not being ...
ybakos's user avatar
  • 234
9 votes
1 answer
8k views

Installing openssl on R

I'm trying to install openssl inside R, using install.packages('openssl'), but I'm getting an error message: * installing *source* package ‘openssl’ ... ** package ‘openssl’ successfully unpacked and ...
rlbc's user avatar
  • 91
3 votes
1 answer
1k views

Trouble linking to gtk/gtk.h even though it's installed

I am trying to build CEF (chromiumembedded) on debian jessie ########## Linking CXX static library libcef_dll_wrapper.a [ 81%] Built target libcef_dll_wrapper [ 81%] Building CXX object cefclient/...
netbrain's user avatar
  • 2,165
7 votes
4 answers
9k views

"configure: error: Package requirements (blkid) were not met"

I'm trying to build btrfs-progs from sources, but when I run ./configure I get the error: checking for BLKID... no configure: error: Package requirements (blkid) were not met: No package 'blkid' ...
StarNamer's user avatar
  • 3,142
14 votes
1 answer
33k views

Gentoo: No package `glib-2.0` found

I have a strange problem when trying to install dev-lib/gobject-introspection: >>> Emerging (1 of 9) dev-libs/gobject-introspection-1.42.0 ...... configure: error: Package requirements (...
erthalion's user avatar
  • 313
0 votes
1 answer
2k views

How to list softwares installed in my system

As far as I studied, pkg-config command returns the info about all the libraries installed in my Linux system. Can anyone specify me from where does it get these details? Also, where will I get the ...
Jackzz's user avatar
  • 1,383
6 votes
1 answer
8k views

How can I exclude some library paths listed in " pkg-config --variable pc_path pkg-config"?

I have Ubuntu 14.04 upgraded from 12.04 making dist-upgrades. I did many manual installations such as ffmpeg, libglib and so on, in the past. I have a nice custom distro now, it works well but I have ...
kenn's user avatar
  • 753
0 votes
1 answer
625 views

pkg-config --libs --cflags not return anything for libgoogle-perftools-dev

user2702245 said pkg-config --clibs --flags <package> is good enough to provide linker and include information. I tried to find out such information about libgoogle-perftools-dev I ...
Tim's user avatar
  • 100k
3 votes
1 answer
346 views

Reverse pkg-config?

Suppose using the pkg-config I can find which link flags are needed add a library to my code, suppose if I need cairo libraries to add, I can find the appropriate -l flag by > pkg-config --libs ...
ramgorur's user avatar
  • 431
3 votes
1 answer
456 views

Should I install ibus-1.0 to build Webdriver?

In the process of building one library (Webdriver) I got the following error: Package ibus-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `ibus-1.0....
Andrei Botalov's user avatar
1 vote
1 answer
2k views

FreeBSD Ports Broken -- Python Issue? Portmaster -a

Upgraded FreeBSD from 8.2 >> 8.4 >> 10.0-RELEASE today. In the process, I believe I have mangled my ports tree quite badly and am having issues upgrading/reinstalling ports (as the upgrade asks me to ...
scraft3613's user avatar
7 votes
2 answers
10k views

something is terribly wrong with pkg-config

I've been having a harrowing time lately just trying to get several C programs compiled because I can't find where the libraries are located and pkg-config seems to be out of order. I installed GNU ...
gideon's user avatar
  • 353
3 votes
3 answers
2k views

Shortening build command

Is there any way I can shorten this openCV build command? g++ file.cpp -o newFileName `pkg-config --cflags --libs opencv` I tried adding: -o newFileName `pkg-config --cflags --libs opencv` to an ...
Colin747's user avatar
  • 163
7 votes
2 answers
6k views

Is there a convention for adding .pc files for pkg-config?

I installed a library via apt but it added no .pc file to the pkg-config dir. When I built another manually it got added. Is there a convention for libs automatically creating a .pc file and if so ...
user1561108's user avatar
  • 1,051
3 votes
2 answers
6k views

/etc/ld.so.conf doesn't contain /usr/lib

I am using pkg-config to help supply the correct libs during c++ compilation. As I understand it, it searches in directories supplied by /etc/ld.so.conf. My ld.so.conf references the following lib ...
user1561108's user avatar
  • 1,051
2 votes
1 answer
3k views

./configure, syntax error: unexpected token (lighttpd)

I want to build a modified version of lighttpd. I follow this tutorial: Downloading and building the H264 Streaming Module for Lighttpd (version 2) This is what I've done so far: apt get install ...
Lama's user avatar
  • 125
2 votes
2 answers
3k views

sipe (plugin pidgin-gaim) unable to find libpurple headers

I downloaded : pidgin 2.10.6 and sipe 1.14.1 from sourceforge. I install pidgin with the following command in the folder of pidgin (2.10.6): ./configure --prefix=/home/tony/soft/pidgin_sipe --...
Tony Morris's user avatar
7 votes
2 answers
8k views

How to deal with FreeBSD's move to pkgconf?

It seems that the FreeBSD ports tree is busy transitioning from pkg-config to pkgconf. http://www.mail-archive.com/[email protected]/msg00018.html I first thought as an end user this ...
Peter Smit's user avatar
  • 1,164
0 votes
3 answers
1k views

Is there a faster alternative to pkg-config?

Our build system uses pkg-config to build the software, but the linking can take very long (sometimes up to 20 minutes). We identified pkg-config as the guilty tool. So, is there a faster alternative ...
BЈовић's user avatar
6 votes
1 answer
47k views

how to make PKG_CONFIG_PATH variable to refer an installed library?

I am in the process of installing the required libraries for FireFox 3.6 on a Redhat Linux Nash 4.x system. I already have successfully installed the glib2.12.0 library, but When I ./configure the ...
selvin's user avatar
  • 251