Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 654788 - sys-boot/grub:2[themes] with media-libs/freetype-2.9.1 fails to build - configure: error: themes were explicitly requested but requirements are not satisfied (No build-time grub-mkfont)
Summary: sys-boot/grub:2[themes] with media-libs/freetype-2.9.1 fails to build - confi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on: 655200
Blocks: freetype-config
  Show dependency tree
 
Reported: 2018-05-04 04:29 UTC by Maxime Lombard
Modified: 2018-05-14 23:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log with "theme" USE Flag enabled (sys-boot:grub-2.02-r1_with_theme_enabled.log,29.18 KB, text/x-log)
2018-05-04 04:29 UTC, Maxime Lombard
Details
grub-2.02-freetype_pkgconfig.patch (grub-2.02-freetype_pkgconfig.patch,1.98 KB, patch)
2018-05-04 12:05 UTC, Lars Wendler (Polynomial-C) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Lombard 2018-05-04 04:29:41 UTC
Created attachment 529682 [details]
build log with "theme" USE Flag enabled

Hi,

It's the first time that i installed full testing Gentoo. I have not this issue if i install a mix stable/testing Gentoo (Mate, lightdm, llvm, Mesa are only testing).

The issue appears during compilation with this error :
"configure: error: themes were explicitly requested but requirements are not satisfied (No build-time grub-mkfont)"

The only fix that i found is to disable "themes" USE flag.
I tried too to enable "grub-mkfont" USE flag but still crash during compilation with this new error :
"configure: error: grub-mkfont was explicitly requested but can't be compiled (need freetype2 library)"
--> freetype package is already installed.

---------

Portage 2.3.33 (python 3.5.5-final-0, default/linux/amd64/17.0/no-multilib, gcc-7.3.0, glibc-2.26-r6, 4.16.7-gentoo x86_64)
=================================================================
System uname: Linux-4.16.7-gentoo-x86_64-AMD_Ryzen_5_1600_Six-Core_Processor-with-gentoo-2.4.1
KiB Mem:    16424516 total,  14598904 free
KiB Swap:     511996 total,    511996 free
Timestamp of repository gentoo: Thu, 03 May 2018 21:30:01 +0000
Head commit of repository gentoo: aaaa77c8d951b70b8d242ec94ec8ba0a628eb15c
sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p2) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/cmake:           3.11.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /mnt/HDData/Gentoo/Ebuild
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

localrepo
    location: /mnt/HDData/Gentoo/Portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr fr_FR"
MAKEOPTS="-j13"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm gtk gtk3 iconv ipv6 modules ncurses nls nptl openmp pam pcre pulseaudio readline seccomp ssl tcpd unicode vdpau wayland xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" L10N="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, ENV_UNSET, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

---------
Comment 1 Tomáš Mózes 2018-05-04 05:16:49 UTC
Do you have media-libs/freetype:2 installed?
Comment 2 Ivan 2018-05-04 10:00:45 UTC
I have the same issue.

And when I have media-libs/freetype-2.9.1 installed, I can't successfully merge grub using gcc-7 or gcc-8. Even with -fonts and -themes.

But when I downgrade media-libs/freetype-2.9.1 to media-libs/freetype-2.9 or media-libs/freetype-2.8, grub builds just fine with USE="device-mapper fonts nls sdl themes truetype -debug -doc -efiemu -libzfs -mount -multislot -static {-test}"

So I suggest to downgrade and not to use freetype 2.9.1 if there's no other options.
Comment 3 Ivan 2018-05-04 10:01:43 UTC
(In reply to Ivan from comment #2)
> I have the same issue.
> 
> And when I have media-libs/freetype-2.9.1 installed, I can't successfully
> merge grub using gcc-7 or gcc-8. Even with -fonts and -themes.
> 
> But when I downgrade media-libs/freetype-2.9.1 to media-libs/freetype-2.9 or
> media-libs/freetype-2.8, grub builds just fine with USE="device-mapper fonts
> nls sdl themes truetype -debug -doc -efiemu -libzfs -mount -multislot
> -static {-test}"
> 
> So I suggest to downgrade and not to use freetype 2.9.1 if there's no other
> options.

If OP is able to build grub with downgraded freetype, I'd recommend to change title to more relevant.
Comment 4 Tomáš Mózes 2018-05-04 11:28:56 UTC
Freetype 2.9.1 removed freetype-config, so that's why it fails to build.
Comment 5 Tomáš Mózes 2018-05-04 11:29:16 UTC
And grub should use pkg-config instead.
Comment 6 Ivan 2018-05-04 11:46:12 UTC
also the same issue with media-libs/freetype-2.9.1-r1.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-05-04 12:05:00 UTC
Created attachment 529746 [details, diff]
grub-2.02-freetype_pkgconfig.patch

Ugh... never seen such an over complicated configure.ac file before...

Anyway, the attached patch should fix it. It's not been sent to upstream yet though.
Comment 8 Tomáš Mózes 2018-05-04 13:40:06 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #7)
> Created attachment 529746 [details, diff] [details, diff]
> grub-2.02-freetype_pkgconfig.patch
> 
> Ugh... never seen such an over complicated configure.ac file before...
> 
> Anyway, the attached patch should fix it. It's not been sent to upstream yet
> though.

Thanks for the patch. Just tested on 2.0.2-r1, but it fails the same :-/
Comment 9 Mike Gilbert gentoo-dev 2018-05-04 14:17:03 UTC
Comment on attachment 529746 [details, diff]
grub-2.02-freetype_pkgconfig.patch

Thanks for the patch.

I think this will break when cross-compiling. PKG_PROG_PKG_CONFIG would find ${CHOST}-pkg-config, but we want ${CBUILD}-pkg-config for BUILD_FREETYPE2. It would be good to find a solution here before submitting this upstream.
Comment 10 Maxime Lombard 2018-05-04 15:07:31 UTC
(In reply to Mike Gilbert from comment #9)
> Comment on attachment 529746 [details, diff] [details, diff]
> grub-2.02-freetype_pkgconfig.patch
> 
I confirm that the patch does not fix this issue. Even if it's applied, i have the same error during "configure".
Comment 11 Mike Gilbert gentoo-dev 2018-05-04 15:31:25 UTC
The ebuild needs to be adjusted to call eautoreconf for the patch to have any effect.
Comment 12 Larry the Git Cow gentoo-dev 2018-05-04 15:50:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf

commit b6db5c287b3e0a43f2254376e32ea6ffe8a45dcf
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2018-05-04 15:46:06 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2018-05-04 15:50:03 +0000

    sys-boot/grub: use pkg-config to find freetype2
    
    Bug: https://bugs.gentoo.org/654788
    Package-Manager: Portage-2.3.31_p60, Repoman-2.3.9_p116

 sys-boot/grub/files/2.02-freetype-pkg-config.patch | 73 ++++++++++++++++++++++
 sys-boot/grub/grub-2.02-r1.ebuild                  | 14 ++++-
 sys-boot/grub/grub-9999.ebuild                     | 12 +++-
 3 files changed, 96 insertions(+), 3 deletions(-)
Comment 13 cyrillic 2018-05-13 19:57:41 UTC
(In reply to Larry the Git Cow from comment #12)
>  sys-boot/grub/grub-9999.ebuild                     | 12 +++-

The patch itself did not get added to the grub-9999.ebuild
Comment 14 cyrillic 2018-05-13 20:14:56 UTC
... also, the patch fails to apply to grub-9999
It does apply the patch, and compile fine on grub-2.02-r1
Comment 15 Mike Gilbert gentoo-dev 2018-05-13 20:59:07 UTC
grub-9999 will be broken until upstream accepts the patches. In the mean time, you may use /etc/portage/patches if you need it.
Comment 16 cyrillic 2018-05-14 23:59:56 UTC
(In reply to Mike Gilbert from comment #15)
> In the mean time, you may use /etc/portage/patches if you need it.

What I meant to say is that grub-9999 needs a different patch, but in the mean time I will be using grub-2.02-r1