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

No pkgconfig entries generated after configuring and building the package #110

Closed
Brainiarc7 opened this issue Nov 15, 2021 · 6 comments
Closed

Comments

@Brainiarc7
Copy link

Hello there,

I'm building this library as a dependency to FFmpeg's libplacebo filter, configured as shown:

meson was upgraded via:

pip3 install --user meson -U

Then fetched the project and built it as shown:

cd ~/ffmpeg_sources
git clone https://github.com/haasn/libplacebo
cd libplacebo
git submodule update --init
mkdir build
DIR=./build
meson $DIR
meson configure $DIR -Dprefix="$HOME/ffmpeg_build" -Dbuildtype=release
ninja -C$DIR
ninja -C$DIR install

However, pkg-config reports:

pkg-config --exists --print-errors libplacebo >= 4.173.0
Package libplacebo was not found in the pkg-config search path.
Perhaps you should add the directory containing `libplacebo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libplacebo' found
Package 4.173.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `4.173.0.pc'
to the PKG_CONFIG_PATH environment variable
No package '4.173.0' found

And its' also not present on the prefix:

ls -al ../../ffmpeg_build/lib/pkgconfig/

total 56
-rw-r--r-- 1 brainiarc7 brainiarc7 272 Nov 14 19:06 fdk-aac.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 181 Nov 14 19:00 ffnvcodec.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 346 Nov 14 19:11 haisrt.pc
-rw-rw-r-- 1 brainiarc7 brainiarc7 304 Nov 14 19:21 rav1e.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 509 Nov 14 19:09 sdl2.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 346 Nov 14 19:11 srt.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 313 Nov 15 06:43 SvtAv1Dec.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 313 Nov 15 06:43 SvtAv1Enc.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 397 Nov 14 19:05 vorbisenc.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 423 Nov 14 19:05 vorbisfile.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 336 Nov 14 19:05 vorbis.pc
-rw-rw-r-- 1 brainiarc7 brainiarc7 340 Nov 14 19:15 vpx.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 290 Nov 14 19:04 x264.pc
-rw-r--r-- 1 brainiarc7 brainiarc7 298 Nov 15 06:44 x265.pc
@haasn
Copy link
Owner

haasn commented Nov 15, 2021

Got a log of the config/build process?

@Brainiarc7
Copy link
Author

Hello @haasn ,

Here's the log from meson after configuring the project:

The Meson build system
Version: 0.60.1
Source dir: /home/brainiarc7/ffmpeg_sources/libplacebo
Build dir: /home/brainiarc7/ffmpeg_sources/libplacebo/build
Build type: native build
Project name: libplacebo
Project version: 4.175.0
C compiler for the host machine: ccache cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: ccache c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program git found: YES (/usr/bin/git)
Compiler for C supports arguments -Wincompatible-pointer-types: YES 
Compiler for C supports link arguments -Wl,--exclude-libs=ALL: YES 
Program python3 found: YES (/usr/bin/python3)
Library m found: YES
Run-time dependency threads found: YES
Header <pthread.h> has symbol "pthread_condattr_setclock" with dependency threads: YES 
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency vulkan found: YES 1.2.189
Run-time dependency epoxy found: YES 1.5.4
Run-time dependency shaderc found: YES 2021.2.1
Found CMake: /usr/bin/cmake (3.16.3)
Run-time dependency spirv-cross-c-shared found: NO (tried pkgconfig and cmake)
Library version found: NO
Check usable header "d3d11_4.h" : NO 
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Message: Skipping `glslang` because `shaderc` is available
Run-time dependency lcms2 found: YES 2.9
Configuring config.h using configuration
Configuring config_internal.h using configuration
Run-time dependency glfw3 found: NO (tried pkgconfig and cmake)
Run-time dependency sdl2 found: YES 2.0.10
Run-time dependency sdl2_image found: NO (tried pkgconfig and cmake)
Dependency threads found: YES unknown (cached)
Run-time dependency libavcodec found: YES 58.54.100
Run-time dependency libavformat found: YES 58.29.100
Run-time dependency libavutil found: YES 56.31.100
Has header "nuklear.h" : YES 
Configuring config_demos.h using configuration
Build targets in project: 8

@Brainiarc7
Copy link
Author

Brainiarc7 commented Nov 17, 2021

Hello,

I was able to complete the builds for both FFmpeg and libplacebo, and can confirm that the filter is present in FFmpeg, though it segfaults on init.

Here is what I added to the dependencies as I installed the Vulkan SDK:

wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
sudo apt update
sudo apt -y install vulkan-sdk libunwind* \
gem-plugin-glfw3 libglfw3 libglfw3-dev \
libglfw3-doc libsdl2-image-dev \
libsdl2-image-2.0-0 spirv*

So that most of the dependencies, such as libunwind were present to meson.

Then I proceeded to configure the project and realized that its' .pc files are located under $PREFIX//ib/x86_64-linux-gnu/pkgconfig, so I added that to ffmpeg's ./configure options via the PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig:$HOME/ffmpeg_build/lib/x86_64-linux-gnu/pkgconfig" directive and the build run successfully.

It would be ideal to move the library location to $PREFIX/lib as that would simplify the build(s) significantly for packages that depend on libplacebo.

@haasn
Copy link
Owner

haasn commented Nov 17, 2021

That value doesn't come from libplacebo, and it works on my end. You probably need to ask meson, or better yet, your distro maintainers.

@haasn haasn closed this as completed Nov 17, 2021
@Brainiarc7
Copy link
Author

I see.
I'm using meson from pip3.

@Brainiarc7
Copy link
Author

If anyone runs into this issue on Ubuntu 20.04LTS with meson and ninja installed via pip3, add --libdir=lib to meson's configuration step before building the project.

What I'm running into now is the segfault with libplacebo in ffmpeg. Any invocation results in an immediate segfault with NVENC in use.

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