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

Linux pkg-config files are incorrect #76

Closed
FreezyLemon opened this issue Nov 3, 2024 · 3 comments
Closed

Linux pkg-config files are incorrect #76

FreezyLemon opened this issue Nov 3, 2024 · 3 comments
Assignees

Comments

@FreezyLemon
Copy link

FreezyLemon commented Nov 3, 2024

Hi, I have some trouble with the .pc files in the linux releases.

The files start with

prefix=${pcfiledir}/../..
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Now, as a reminder, the file structure for the linux builds is:

ffmpeg-7.1-linux-clang-lite
├── bin
│   ├── amd64
│   ├── arm64
│   └── armhf
├── include
│   ├── libavcodec
│   ├── libavdevice
│   ├── libavfilter
│   ├── libavformat
│   ├── libavutil
│   ├── libswresample
│   └── libswscale
└── lib
    ├── amd64
    │   └── pkgconfig
    ├── arm64
    │   └── pkgconfig
    └── armhf
        └── pkgconfig

This resolves to the following:

prefix="ffmpeg-7.1-linux-clang-lite/lib" (incorrect)
exec_prefix=${prefix}
libdir=${prefix}/lib (this is now `.../lib/lib`)
includedir=${prefix}/include (this is now `../lib/include`)

You can also see this when running pkg-config:

# Extract ffmpeg to /tmp/ffmpeg-dl/ffmpeg-7.1-linux-clang-lite
$ PKG_CONFIG_PATH=/tmp/ffmpeg-dl/ffmpeg-7.1-linux-clang-lite/lib/amd64/pkgconfig pkg-config --cflags libavcodec
> -I/tmp/ffmpeg-dl/ffmpeg-7.1-linux-clang-lite/lib/amd64/pkgconfig/../../include

$ realpath /tmp/ffmpeg-dl/ffmpeg-7.1-linux-clang-lite/lib/amd64/pkgconfig/../../include
> /tmp/ffmpeg-dl/ffmpeg-7.1-linux-clang-lite/lib/include

I believe this would be fixed by setting prefix=${pcfiledir}/../../.. (one directory higher) and setting libdir=${prefix}/lib/<arch>, arch being amd64, arm64 etc.

@wang-bin
Copy link
Owner

wang-bin commented Nov 7, 2024

script is fixed in master branch. only ffmpeg master branch prebuilt packages are patched

@wang-bin wang-bin closed this as completed Nov 7, 2024
@wang-bin
Copy link
Owner

wang-bin commented Nov 8, 2024

I see your docker is using ffmpeg 4.4 5.1 6.1 7.0 and 7.1,now prebuilt packages for these versions are updated, no need to patch pc files. btw, my build depends on libc++ instead of libstdc++ because libc++ abi is more stable, you have to install libc++1 using apt.

@FreezyLemon
Copy link
Author

Thank you! This is very useful for us. I'll make sure to install libc++, that's not a big deal.

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

No branches or pull requests

2 participants