alacritty: Ubuntu 14.04 - Installation fails with "No package 'freetype2' found" despite setting PKG_CONFIG_PATH

Potentially related to #1193. I’ve installed all dependencies listed in the README.

Which operating system does the issue occur on? Ubuntu 14.04

If on linux, are you using X11 or Wayland? X11

$ cargo deb --install
...
checking for _mktemp_s... no
checking for mkdtemp... yes
checking for getopt... yes
checking for getopt_long... yes
checking for getprogname... no
checking for getexecname... no
checking for rand... yes
checking for random... yes
checking for lrand48... yes
checking for random_r... yes
checking for rand_r... yes
checking for readlink... yes
checking for regcomp... yes
checking for regerror... yes
checking for regexec... yes
checking for regfree... yes
checking for fstatvfs... yes
checking for fstatfs... yes
checking for lstat... yes
checking for posix_fadvise in fcntl.h... fcntl.h
checking for scandir... yes
checking for struct statvfs.f_basetype... no
checking for struct statvfs.f_fstypename... no
checking for struct statfs.f_flags... yes
checking for struct statfs.f_fstypename... no
checking for struct dirent.d_type... yes
checking for FREETYPE... no

--- stderr
configure: error: Package requirements (freetype2) were not met:

No package 'freetype2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FREETYPE_CFLAGS
and FREETYPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** [/home/alex/workspace/alacritty/target/release/build/servo-fontconfig-sys-7e72fbca0fe0db32/out/Makefile] Error 1
thread 'main' panicked at 'assertion failed: Command::new("make").args(&["-R", "-f",
                            "makefile.cargo"]).status().unwrap().success()', /home/alex/.cargo/git/checkouts/libfontconfig-3d5e920c02c2e53f/5c1845e/build.rs:17:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
cargo-deb: build failed

My PKG_CONFIG_PATH is set to /usr/lib/x86_64-linux-gnu/pkgconfig and it looks like freetype2 is there.

$ ls $PKG_CONFIG_PATH | grep freetype
freetype2.pc

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

Could you try running apt-get install cmake libfreetype6-dev libfontconfig1-dev xclip before installing the deb? That should install all required build dependencies.

Yeah, I’m in the same boat.

No package 'freetype2' found

I tried all of the above fixes, but nothing. I’ll try poking through it when I have some spare time.

Hi,

I had the same issue, could solve it by installing libfreetype6-dev libfontconfig1-dev xclip.

Hope this helps! 😃

So I forced a reinstall of the freetype packages via sudo apt-get install --reinstall libfreetype6 libfreetype6-dev, also tried setting FREETYPE_LIBS (which was /usr/include/freetype2 for me), and finally tried changing the fontconfig.spec and then cargo building, but still no luck…

$ git diff
diff --git a/fontconfig.spec b/fontconfig.spec
index 89dfb86..df95253 100644
--- a/fontconfig.spec
+++ b/fontconfig.spec
@@ -1,6 +1,6 @@
 # Some distributions name their Freetype 2 package "freetype", while others
 # name it "freetype2".  You can define the name your distribution uses here.
-%define freetype2 freetype
+%define freetype2 libfreetype6
 
 Summary:       Font configuration and customization library
 Name:          fontconfig

Any other ideas? Appreciate all the help 😃

Could you try running apt-get install cmake libfreetype6-dev libfontconfig1-dev xclip before installing the deb? That should install all required build dependencies.

That fixed my issue on Linux Mint 18.2 Cinamon x64

I had the same error. First I did:

sudo add-apt-repository ppa:glasen/freetype2
sudo apt update
sudo apt install freetype2-demos

didn’t helped, but error was diferent (can’t remember what it was saying) and then I did what you said in a post:

sudo apt-get install cmake libfreetype6-dev libfontconfig1-dev xclip

and it worked.

@alexkohler I’m having the same issue as well, but on Ubuntu 18.04. I came here from the original issue (#1193), tried doing the export statement, then saw you referenced #1193 from the old issue and came to this thread.

maybe worth trying forcing apt to clean install those packages

Thanks for the quick response! Appears everything is up to date:

$ sudo apt-get install cmake libfreetype6-dev libfontconfig1-dev xclip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
xclip is already the newest version.
libfontconfig1-dev is already the newest version.
libfreetype6-dev is already the newest version.
cmake is already the newest version.