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
5 votes
1 answer
167 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 ...
user avatar
  • 12.7k
2 votes
1 answer
426 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:...
user avatar
  • 247
3 votes
3 answers
862 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?...
user avatar
  • 33
1 vote
0 answers
176 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 ...
user avatar
0 votes
1 answer
448 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 ...
user avatar
0 votes
1 answer
266 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 ...
user avatar
  • 930
0 votes
1 answer
313 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
  • 164
1 vote
0 answers
964 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 ...
user avatar
  • 1,752
5 votes
2 answers
2k 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 ...
user avatar
  • 359
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 ...
user avatar
1 vote
1 answer
1k 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 ...
user avatar
  • 10.7k
0 votes
2 answers
690 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'...
user avatar
  • 1,311
-1 votes
1 answer
338 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 ...
user avatar
  • 1,311
4 votes
1 answer
4k 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 ...
user avatar
  • 197
0 votes
1 answer
770 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 -...
user avatar
0 votes
1 answer
998 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 ...
user avatar
1 vote
1 answer
67 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 ...
user avatar
1 vote
1 answer
68 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 ...
user avatar
  • 641
1 vote
1 answer
477 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-...
user avatar
2 votes
1 answer
5k 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 ...
user avatar
  • 232
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 ...
user avatar
  • 91
3 votes
1 answer
988 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/...
user avatar
  • 1,915
6 votes
4 answers
8k 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' ...
user avatar
  • 2,912
11 votes
1 answer
26k 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 (...
user avatar
  • 283
0 votes
1 answer
691 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 ...
user avatar
  • 1,253
6 votes
1 answer
7k 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 ...
user avatar
  • 733
0 votes
1 answer
455 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 ...
user avatar
  • 89.7k
3 votes
1 answer
300 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 ...
user avatar
  • 431
3 votes
1 answer
423 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....
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 ...
user avatar
5 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 ...
user avatar
  • 333
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 ...
user avatar
  • 163
7 votes
2 answers
5k 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 ...
user avatar
  • 1,011
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 ...
user avatar
  • 1,011
2 votes
1 answer
2k 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 ...
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 --...
user avatar
7 votes
2 answers
7k 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/freebsd-ports-announce@freebsd.org/msg00018.html I first thought as an end user this ...
user avatar
  • 1,094
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 ...
user avatar
6 votes
1 answer
46k 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 ...
user avatar
  • 251