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

ERROR: freetype2 not found using pkg-config #224

Open
jasonsansone opened this issue May 14, 2024 · 6 comments
Open

ERROR: freetype2 not found using pkg-config #224

jasonsansone opened this issue May 14, 2024 · 6 comments

Comments

@jasonsansone
Copy link

I have attempted to compile a fully static build on Ubuntu 22.04 and 23.10 without success.

ERROR: freetype2 not found using pkg-config

However, freetype2 is installed and also compiled successfully prior to ffmpeg compilation beginning.

@hashworks
Copy link

hashworks commented May 15, 2024

Same here, only happens with --full-static.

podman run -it quay.io/archlinux/archlinux:base-devel
pacman -Syu --noconfirm git
git clone https://github.com/markus-perl/ffmpeg-build-script
cd ffmpeg-build-script
git checkout v1.51
./build-ffmpeg --enable-gpl-and-non-free --latest --full-static --build

Build log: https://fb.hash.works/m6Fu2X0v/

@hashworks
Copy link

Additional notes: Here is the filetree after the above build. https://fb.hash.works/opUPK7

In workspace/include one can find freetype2 header files:

│       │   ├── freetype2
│       │   │   ├── freetype
│       │   │   │   ├── config
│       │   │   │   │   ├── ftconfig.h
│       │   │   │   │   ├── ftheader.h
│       │   │   │   │   ├── ftmodule.h
│       │   │   │   │   ├── ftoption.h
│       │   │   │   │   ├── ftstdlib.h
│       │   │   │   │   ├── integer-types.h
│       │   │   │   │   ├── mac-support.h
│       │   │   │   │   └── public-macros.h
│       │   │   │   ├── freetype.h
│       │   │   │   ├── ftadvanc.h
│       │   │   │   ├── ftbbox.h
│       │   │   │   ├── ftbdf.h
│       │   │   │   ├── ftbitmap.h
│       │   │   │   ├── ftbzip2.h
│       │   │   │   ├── ftcache.h
│       │   │   │   ├── ftchapters.h
│       │   │   │   ├── ftcid.h
│       │   │   │   ├── ftcolor.h
│       │   │   │   ├── ftdriver.h
│       │   │   │   ├── fterrdef.h
│       │   │   │   ├── fterrors.h
│       │   │   │   ├── ftfntfmt.h
│       │   │   │   ├── ftgasp.h
│       │   │   │   ├── ftglyph.h
│       │   │   │   ├── ftgxval.h
│       │   │   │   ├── ftgzip.h
│       │   │   │   ├── ftimage.h
│       │   │   │   ├── ftincrem.h
│       │   │   │   ├── ftlcdfil.h
│       │   │   │   ├── ftlist.h
│       │   │   │   ├── ftlogging.h
│       │   │   │   ├── ftlzw.h
│       │   │   │   ├── ftmac.h
│       │   │   │   ├── ftmm.h
│       │   │   │   ├── ftmodapi.h
│       │   │   │   ├── ftmoderr.h
│       │   │   │   ├── ftotval.h
│       │   │   │   ├── ftoutln.h
│       │   │   │   ├── ftparams.h
│       │   │   │   ├── ftpfr.h
│       │   │   │   ├── ftrender.h
│       │   │   │   ├── ftsizes.h
│       │   │   │   ├── ftsnames.h
│       │   │   │   ├── ftstroke.h
│       │   │   │   ├── ftsynth.h
│       │   │   │   ├── ftsystem.h
│       │   │   │   ├── fttrigon.h
│       │   │   │   ├── fttypes.h
│       │   │   │   ├── ftwinfnt.h
│       │   │   │   ├── t1tables.h
│       │   │   │   ├── ttnameid.h
│       │   │   │   ├── tttables.h
│       │   │   │   └── tttags.h
│       │   │   └── ft2build.h

Additionally there are workspace/lib/libfreetype.a, workspace/lib/libfreetype.la, workspace/lib/pkgconfig/freetype2.pc and workspace/share/aclocal/freetype2.m4.

I guess it's missing libfreetype2.so?

@hashworks
Copy link

I was able to build --full-static using an Ubuntu 24.04 docker image and a fresh build environment. Not sure what causes the issue on Arch.

podman run -it docker.io/ubuntu:24.04
apt-get update
apt-get -y --no-install-recommends install git build-essential curl ca-certificates python3 python-is-python3 ninja-build meson
update-ca-certificates
git clone https://github.com/markus-perl/ffmpeg-build-script
cd ffmpeg-build-script
git checkout v1.51
./build-ffmpeg --enable-gpl-and-non-free --latest --small --full-static --build

@khoazero123
Copy link

khoazero123 commented Jun 19, 2024

Same to me, I build on WSL - Windows 11

gcc ...  -lfreetype -lbz2 -lpng16 -lm -lz -lm -lz -lharfbuzz -lm -lglib-2.0 -lm -lpcre -lgraphite2 -lbrotlidec -lbrotlicommon -ldl -lpthread -lm -lz
/usr/bin/ld: cannot find -lgraphite2: No such file or directory
collect2: error: ld returned 1 exit status
ERROR: freetype2 not found using pkg-config

@BrokeFixBroke
Copy link

BrokeFixBroke commented Sep 13, 2024

Same here, OpenSUSE 15.6

ERROR: freetype2 not found using pkg-config

@BrokeFixBroke
Copy link

Tried running it without
--pkg-config-flags="--static" \
no change. Really want t use ffmpeg but holding up a project.

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

4 participants