Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690094 - app-text/texlive-core-2019-r4 fails configure in Prefix
Summary: app-text/texlive-core-2019-r4 fails configure in Prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-17 17:12 UTC by Steven Trogdon
Modified: 2019-07-27 16:47 UTC (History)
2 users (show)

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


Attachments
config.log (config.log,101.35 KB, text/plain)
2019-07-22 17:46 UTC, Steven Trogdon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2019-07-17 17:12:44 UTC
From build.log

checking for freetype-config... freetype-config
checking for x86_64-pc-linux-gnu-pkg-config... (cached) x86_64-pc-linux-gnu-pkg-config
checking for x86_64-pc-linux-gnu-icu-config... x86_64-pc-linux-gnu-icu-config
checking for x86_64-pc-linux-gnu-pkg-config... (cached) x86_64-pc-linux-gnu-pkg-config
checking requested system `kpathsea' library... ok
checking requested system `zlib' library... ok
checking requested system `libpaper' library... ok
checking requested system `libpng' library... ok
checking requested system `freetype2' library... failed
checking requested system `pixman' library... failed
checking requested system `cairo' library... failed
checking requested system `gmp' library... failed
checking requested system `mpfr' library... failed
checking requested system `poppler' library... failed
checking requested system `xpdf' library... failed
checking requested system `zziplib' library... failed
checking requested system `graphite2' library... failed
checking requested system `teckit' library... failed
checking requested system `icu' library... ok
checking requested system `harfbuzz' library... ok
configure: error: some requested system libraries failed

And from config.log (for freetype2)

configure:21852: checking requested system `freetype2' library
configure:21868: x86_64-pc-linux-gnu-gcc -o conftest -march=native -O0 -pipe -g -ggdb -I/usr/include/freetype2 -I/storage/strogdon/gentoo-rap/usr/include/libpng16     -Wl,-O1 -Wl,--as-needed conftest.c -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -lpng16 -lz -lpaper -lz -lkpathsea  >&5
conftest.c:44:10: fatal error: ft2build.h: No such file or directory
   44 | #include <ft2build.h>
      |          ^~~~~~~~~~~~
compilation terminated.

It looks like the config step is not looking for the libs in Prefix.

pkg-config --cflags freetype2
-I/storage/strogdon/gentoo-rap/usr/include/freetype2

Everything is present.
Comment 1 Steven Trogdon 2019-07-22 17:46:11 UTC
Created attachment 584006 [details]
config.log

config.log added
Comment 2 Steven Trogdon 2019-07-22 17:51:01 UTC
From the attached config.log it would appear that configure finds the host /usr/bin/freetype-config and uses it instead of pkg-config. The output from freetype-config is

/usr/bin/freetype-config --cflags
-I/usr/include/freetype2

/usr/bin/freetype-config --libs
-L/usr/lib/x86_64-linux-gnu -lfreetype -lz

which is consistent with the failure. I'm not sure how to neuter this.
Comment 3 Steven Trogdon 2019-07-24 22:20:55 UTC
The main reason for the failure is that my host has an old version of freetype installed

freetype-config --ftversion
2.4.9

Newer versions don't even ship freetype-config. Two solutions I see are:

1) patch texlive-20190410-source/m4/kpse-freetype2-flags.m4 to only use pkg-config. I believe this will require running autoconf.

2) exclude the host from the search path for freetype-config/pkg-config. Prefix installs of freetype will not have freetype-config.
Comment 4 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-07-26 09:02:21 UTC
<hat type="TeX team member">

I'd consider this bug invalid, TL upstream has finally added a check for pkg-config presense in the system because freetype-config on its way out. Both works indepedently fine (depending on freetype version installed in the system). There is no reason to patch anything.

</hat>
Comment 5 Fabian Groffen gentoo-dev 2019-07-26 13:18:43 UTC
(In reply to Mikle Kolyada from comment #4)
> <hat type="TeX team member">
> 
> I'd consider this bug invalid, TL upstream has finally added a check for
> pkg-config presense in the system because freetype-config on its way out.
> Both works indepedently fine (depending on freetype version installed in the
> system). There is no reason to patch anything.
> 
> </hat>

Problem here is that there is a freetype-config available in PATH, which isn't provided by us (Gentoo Prefix).  We know there is a pkg-config available here, but it won't be used because freetype-config is tried first.  We need a way to force it to try pkg-config only, because we know that's the only thing that's going to return correct results (because it is provided by us).
Comment 6 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-07-26 15:08:19 UTC
(In reply to Fabian Groffen from comment #5)
> (In reply to Mikle Kolyada from comment #4)
> > <hat type="TeX team member">
> > 
> > I'd consider this bug invalid, TL upstream has finally added a check for
> > pkg-config presense in the system because freetype-config on its way out.
> > Both works indepedently fine (depending on freetype version installed in the
> > system). There is no reason to patch anything.
> > 
> > </hat>
> 
> Problem here is that there is a freetype-config available in PATH, which
> isn't provided by us (Gentoo Prefix).  We know there is a pkg-config
> available here, but it won't be used because freetype-config is tried first.
> We need a way to force it to try pkg-config only, because we know that's the
> only thing that's going to return correct results (because it is provided by
> us).

Understood :)

Well, the simpliest solution as I see it would be to add 

`unset FT2_CONFIG` into the ebuild (as it holds the freetype-config path), but I have no prefix installation to test if this would be sufficient or not.
Comment 7 Larry the Git Cow gentoo-dev 2019-07-27 07:46:01 UTC
The bug has been closed via the following commit(s):

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

commit 19a7e03e9f127f8cddf956292b24c2f0a4df4cc9
Author:     Mikle Kolyada <zlogene@gentoo.org>
AuthorDate: 2019-07-27 07:44:04 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2019-07-27 07:45:55 +0000

    app-text/texlive-core: disable freetype-config
    
    Closes: https://bugs.gentoo.org/690094
    Package-Manager: Portage-2.3.66, Repoman-2.3.16
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>

 app-text/texlive-core/texlive-core-2019-r4.ebuild | 5 +++++
 1 file changed, 5 insertions(+)
Comment 8 Steven Trogdon 2019-07-27 16:47:29 UTC
Thanks guys!