Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658534 - media-tv/mythtv-0.28.1-r4 configure fails with FreeType error
Summary: media-tv/mythtv-0.28.1-r4 configure fails with FreeType error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: https://code.mythtv.org/trac/ticket/1...
Whiteboard:
Keywords:
Depends on: 645850
Blocks: freetype-config
  Show dependency tree
 
Reported: 2018-06-19 20:48 UTC by William T Wilson
Modified: 2018-10-20 16:36 UTC (History)
2 users (show)

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


Attachments
emerge --info on my system (foo,18.25 KB, text/plain)
2018-06-19 20:48 UTC, William T Wilson
Details
build.log (file_658534.txt,2.87 KB, text/plain)
2018-06-19 20:51 UTC, William T Wilson
Details
emerge -pqv (file_658534.txt,339 bytes, text/plain)
2018-06-19 21:15 UTC, William T Wilson
Details
config.ep from mythtv build (foo,316.16 KB, text/plain)
2018-06-19 22:11 UTC, William T Wilson
Details
For qmake>=5.10 problem in configure (01-configure.patch,405 bytes, patch)
2018-08-09 11:52 UTC, William T Wilson
Details | Diff
Updated build.log (build.log,2.96 KB, text/plain)
2018-08-09 11:54 UTC, William T Wilson
Details
Updated emerge --info (foo,19.46 KB, text/plain)
2018-08-09 11:55 UTC, William T Wilson
Details
Updated emerge -pqv (foo,338 bytes, text/plain)
2018-08-09 11:55 UTC, William T Wilson
Details
Updated config.ep (config.ep,420.86 KB, text/plain)
2018-08-09 11:57 UTC, William T Wilson
Details
configure script (configure,273.59 KB, text/plain)
2018-08-09 12:20 UTC, William T Wilson
Details
qmake >=5.10 and fixes additional freetype2 error (01-qmake-freetype.patch,1.16 KB, patch)
2018-08-09 14:00 UTC, William T Wilson
Details | Diff
Fixes qmake >=5.10, freetype error (01-qmake-freetype.patch,1.45 KB, patch)
2018-08-10 04:50 UTC, William T Wilson
Details | Diff
Fixes qmake >=5.10, freetype error (01-qmake-freetype.patch,1.45 KB, patch)
2018-08-10 04:56 UTC, William T Wilson
Details | Diff
Fixes qmake >=5.10, freetype error (02-qmake-freetype.patch,13.69 KB, patch)
2018-08-10 07:17 UTC, William T Wilson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William T Wilson 2018-06-19 20:48:35 UTC
Created attachment 536456 [details]
emerge --info on my system

My AMD64 unstable system which cannot build mythtv.  The configure-phase error is: "ERROR! You must have FreeType installed to compile MythTV."  I do have FreeType installed however:
$ equery l freetype
 * Searching for freetype ...
[IP-] [  ] media-libs/freetype-2.9.1-r4:2

The last version of MythTV I built was 2.9.1-r1 and I did not experience this problem.  I don't know what version of FreeType was installed at the time, however.

Attached build log and emerge --info.
Comment 1 William T Wilson 2018-06-19 20:51:20 UTC
Created attachment 536458 [details]
build.log

Not able to attach the build.log due to website error, had to paste it
Comment 2 William T Wilson 2018-06-19 21:15:14 UTC
Created attachment 536460 [details]
emerge -pqv
Comment 3 William T Wilson 2018-06-19 22:11:40 UTC
Created attachment 536464 [details]
config.ep from mythtv build

Looks like the build errors are actually due to a problem compiling the test file, and FreeType itself is probably a red herring.
Comment 4 Pierre Willenbrock 2018-06-23 14:11:06 UTC
Compiles fine with =media-libs/freetype-2.9.1-r3, fails with =media-libs/freetype-2.9.1-r4, the latter starting to use --disable-freetype-config for configure, where the former had --enable-freetype-config.

In the working config.ep, freetype-config gets called and gives a proper result. The compile errors in config.ep just before the freetype-config invocation are from probing of data type sizes by the looks of it.
Comment 5 Larry the Git Cow gentoo-dev 2018-06-25 14:44:05 UTC
The bug has been referenced in the following commit(s):

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

commit 0ebdd558a60577558cf0aafb312b777204a1085b
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-06-25 14:43:47 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-06-25 14:43:47 +0000

    media-tv/mythtv: Replaced freetype-config with pkg-config
    
    Bug: https://bugs.gentoo.org/658534
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../files/mythtv-29.2-freetype_pkgconfig.patch     | 28 ++++++++++++++++++++++
 media-tv/mythtv/mythtv-0.28.1-r4.ebuild            |  1 +
 2 files changed, 29 insertions(+)
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-06-25 14:45:06 UTC
Please test and report back if this is now fixed.
Comment 7 Adam Stylinski 2018-06-26 21:04:22 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #6)
> Please test and report back if this is now fixed.

This still failed for me, it doesn't seem like it tried to use pkg-config (and, pkg-config freetype --cflags comes back with an error).  

Re-enabling the freetype build to have freetype-config allowed me to recompile mythtv.
Comment 8 Larry the Git Cow gentoo-dev 2018-06-26 21:07:31 UTC
The bug has been referenced in the following commit(s):

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

commit 6a169aac639fc33b2e8b4881278fd0cec62649de
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-06-26 21:07:23 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-06-26 21:07:23 +0000

    media-tv/mythtv: Added virtual/pkgconfig to DEPEND.
    
    Bug: https://bugs.gentoo.org/658534
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 media-tv/mythtv/mythtv-0.28.1-r4.ebuild | 1 +
 1 file changed, 1 insertion(+)
Comment 9 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-07-08 06:29:59 UTC
Can someone test and report back again please? I am quite sure this must be fixed now.
Comment 10 Keith Harrison 2018-07-14 18:00:51 UTC
This was not working for me. Recently (sometime in the past week or so), something changed and now I am getting a different error. Not sure if it is related:

h4770s /home/keithbharrison # cat /var/tmp/portage/media-tv/mythtv-0.28.1-r4/temp/build.log 
 * Package:    media-tv/mythtv-0.28.1-r4
 * Repository: gentoo
 * USE:        abi_x86_64 alsa amd64 dvd elibc_glibc hls kernel_linux libass lirc mythlogserver pulseaudio python_targets_python2_7 systemd theora userland_GNU vdpau vorbis wrapper xml xvid zeroconf
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/media-tv/mythtv-0.28.1-r4/work
>>> Preparing source in /var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv ...
 * Applying mythtv-0.28.1-glibc225.patch ...
 [ ok ]
 * Applying mythtv-29.2-freetype_pkgconfig.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv ...
 * Running ./configure  --prefix=/usr --libdir=/usr/lib64 --libdir-name=lib64 --mandir=/usr/share/man --enable-audio-alsa --disable-audio-jack --disable-altivec --disable-dvb --disable-firewire --enable-lirc --enable-libxvid --dvb-path=/usr/include --enable-xrandr --enable-xv --enable-x11 --enable-nonfree --enable-libmp3lame --disable-libcec --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvpx --enable-libfaac --enable-libass --without-bindings=perl,python --compile-type=release --disable-stripping --enable-vdpau --disable-vaapi --disable-crystalhd --disable-joystick-menu --enable-symbol-visibility --enable-pic --cpu=host --disable-distcc --disable-ccache --enable-systemd_notify
found qmake at /usr/lib64/qt5/bin/qmake but version failed
got version:  QMake version 3.1 Using Qt version 5.11.1 in /usr/lib64
found qmake at /usr/lib64/qt5/bin/qmake but version failed
got version:  QMake version 3.1 Using Qt version 5.11.1 in /usr/lib64
qmake for Qt5.2 or newer not found.\nPlease specify the correct qmake with --qmake=

If you think configure made a mistake, make sure that you are using the latest
version of MythTV from git.  If the latest version fails, report the problem to the
mythtv-dev@mythtv.org mailing list or IRC #mythtv on irc.freenode.net
Include the log file "config.ep" produced by configure as this will help
solve the problem.
 * ERROR: media-tv/mythtv-0.28.1-r4::gentoo failed (configure phase):
 *   configure died
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_configure
 *   environment, line 4284:  Called die
 * The specific snippet of code:
 *       ./configure --cc="$(tc-getCC)" --cxx="$(tc-getCXX)" --ar="$(tc-getAR)" --extra-cflags="${CFLAGS}" --extra-cxxflags="${CXXFLAGS}" --extra-ldflags="${LDFLAGS}" --qmake=$(qt5_get_bindir)/qmake ${myconf} || die "configure died"
 * 
 * If you need support, post the output of `emerge --info '=media-tv/mythtv-0.28.1-r4::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-tv/mythtv-0.28.1-r4::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-tv/mythtv-0.28.1-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/mythtv-0.28.1-r4/temp/environment'.
 * Working directory: '/var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv'
 * S: '/var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv'
Comment 11 William T Wilson 2018-07-31 01:57:02 UTC
The configure error is due to a bug in MythTV's configure script.  If you look at the configure script (/var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv/configure) line 5910, it uses a regular expression to evaluate the version of qmake being used, and this only works for versions of qmake < 5.10.  If you're like me, you have the latest qtcore, which is 5.11.1, which doesn't match the regular expression.

Replacing line 5910:
    $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]"
with
    $1 --version 2>&1 | egrep -q -e 'Qt version 5\.(([1-9][0-9]+)|[2-9])\.[0-9]'

should probably fix it.

I can try to produce a patch file that should make this work again.
Comment 12 William T Wilson 2018-08-09 11:52:48 UTC
Created attachment 542840 [details, diff]
For qmake>=5.10 problem in configure

I created the attached patch file to correct the QMake problem for QMake >= 5.10 (as 5.11 is now the current version).  It does indeed correct the QMake problem.  However, with mythtv-0.28.1-r4, I still get the original error:
ERROR! You must have FreeType installed to compile MythTV.

I also attached an updated copy of the build log and my emerge --info.
Comment 13 William T Wilson 2018-08-09 11:54:21 UTC
Created attachment 542842 [details]
Updated build.log
Comment 14 William T Wilson 2018-08-09 11:55:19 UTC
Created attachment 542844 [details]
Updated emerge --info
Comment 15 William T Wilson 2018-08-09 11:55:53 UTC
Created attachment 542846 [details]
Updated emerge -pqv
Comment 16 William T Wilson 2018-08-09 11:57:09 UTC
Created attachment 542848 [details]
Updated config.ep
Comment 17 William T Wilson 2018-08-09 12:20:01 UTC
Created attachment 542850 [details]
configure script

I attached the configure script, as found in /var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1/mythtv after a (failed) emerge.

It appears to be modified by both the mythtv-29.2-freetype_pkgconfig.patch as well as my QMake patch.  Nevertheless, it still produces the freetype error.

I verified on my system as well:

$ pkg-config --cflags freetype2
-I/usr/include/freetype2
$ pkg-config --libs freetype2
-lfreetype
Comment 18 William T Wilson 2018-08-09 12:24:08 UTC
Also:
(in directory /var/tmp/portage/media-tv/mythtv-0.28.1-r4/work/mythtv-0.28.1)

# find . -type f -exec grep -q 'freetype-config' {} \; -print
./mythtv/config.ep
# grep freetype-config mythtv/config.ep
freetype-config --version
./configure: 962: ./configure: freetype-config: not found


I have no idea where the call to freetype-config is coming from, but something in configure is still trying to call it.
Comment 19 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-08-09 13:49:29 UTC
I've added your patch in 

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

and tried to find out where configure still calls freetype-config but I also failed to find it.
So now with the qt-5.11 detection bug being out of the way let's hope someone else can identify the remaining freetype-config issue. Don't hesitate to post your findings.
Comment 20 William T Wilson 2018-08-09 14:00:59 UTC
Created attachment 542858 [details, diff]
qmake >=5.10 and fixes additional freetype2 error

OK, I figured out the why.  check_foo_config (configure line 1588) calls ${pkg}-config, which expands to freetype-config.  Since freetype-config is not present, check_foo_config returns false when invoked on freetype or freetype2.

check_foo_config is called on line 6905 of configure, and the configure script dies shortly thereafter.

The mythtv-29.2-freetype_pkgconfig.patch correctly sets the library and include options, but it doesn't actually do anything for the check for the library's existence.  As a result, the freetype2 variable is false, the freetype test code snippet is never compiled, and the build fails.

check_foo_config appears to be used ONLY by freetype, so I don't feel bad about patching this function to use pkg-config.  Maybe check_pkg_config could be used instead.  But it works differently and I don't know for sure what to do there.

I attached a new configure patch which addresses both this problem and the qmake problem.  It applies on top of the old mythtv-29.2-freetype_pkgconfig.patch.  I verified that this configures for me and I'm currently running a build of it, but it hasn't finished yet.
Comment 21 William T Wilson 2018-08-09 14:03:42 UTC
Unfortunately, I have a new, apparently unrelated error.

New error is:
lcddevice.cpp:19:10: fatal error: QApplication: No such file or directory
 #include <QApplication>

Has anyone considered the possibility of just upgrading to 0.29?  0.28 is very old and it seems unlikely that these sorts of random compatibility problems will just go away.
Comment 22 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-08-09 14:09:01 UTC
(In reply to William T Wilson from comment #21)
> 
> Has anyone considered the possibility of just upgrading to 0.29?  0.28 is
> very old and it seems unlikely that these sorts of random compatibility
> problems will just go away.

Would you mind heading over to bug #645850 and help fixing the remaining issues with the currently attached ebuild there?
Comment 23 William T Wilson 2018-08-10 04:50:53 UTC
Created attachment 542894 [details, diff]
Fixes qmake >=5.10, freetype error

Updated patch fixes the QApplication error as well, which also surfaced as a result of QMake >= 5.10.

Now stuck on bug 649044.
Comment 24 William T Wilson 2018-08-10 04:53:42 UTC
Comment on attachment 542894 [details, diff]
Fixes qmake >=5.10, freetype error

>--- a/configure	2018-08-09 07:49:10.658929854 -0600
>+++ b/configure	2018-08-09 07:45:36.856987334 -0600
>@@ -1592,12 +1592,12 @@
>     func=$4
>     shift 4
>     disable $cfg
>-    check_cmd ${pkg}-config --version
>+    check_cmd $pkg_config --version
>     err=$?
>     if test "$err" = 0; then
>         backup_cflags=$CFLAGS
>-        temp_extralibs=$(${pkg}-config --libs)
>-        add_cflags $(${pkg}-config --cflags)
>+        temp_extralibs=$($pkg_config --libs $pkg)
>+        add_cflags $($pkg_config --cflags $pkg)
>         check_lib "$@" $header $func $temp_extralibs && enable $cfg
>         CFLAGS=$backup_cflags
>     fi
>@@ -5907,7 +5907,7 @@
> enabled pic && enable_weak_pic
> 
> is_qmake5(){
>-    $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]"
>+    $1 --version 2>&1 | egrep -q -e 'Qt version 5\.(([1-9][0-9]+)|[2-9])\.[0-9]'
> }
> 
> # qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
>@@ -6902,7 +6902,7 @@
> EOF
> done
> 
>-check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
>+check_foo_config freetype2 freetype2 ft2build.h FT_Init_FreeType
> 
> enabled freetype2 ||
>     die "ERROR! You must have FreeType installed to compile MythTV."
>
>--- a/libs/libmythbase/libmythbase.pro	2018-08-09 22:36:05.958221248 -0600
>+++ b/libs/libmythbase/libmythbase.pro	2018-08-09 22:36:23.899552090 -0600
>@@ -154,7 +154,7 @@
> 
> QT += xml sql network
> 
>-contains(QT_VERSION, ^5\\.[0-9]\\..*) {
>+contains(QT_VERSION, ^5\\.[0-9]+\\..*) {
> QT += widgets
> }
>
Comment 25 William T Wilson 2018-08-10 04:54:26 UTC
Comment on attachment 542894 [details, diff]
Fixes qmake >=5.10, freetype error

>--- a/configure	2018-08-09 07:49:10.658929854 -0600
>+++ b/configure	2018-08-09 07:45:36.856987334 -0600
>@@ -1592,12 +1592,12 @@
>     func=$4
>     shift 4
>     disable $cfg
>-    check_cmd ${pkg}-config --version
>+    check_cmd $pkg_config --version
>     err=$?
>     if test "$err" = 0; then
>         backup_cflags=$CFLAGS
>-        temp_extralibs=$(${pkg}-config --libs)
>-        add_cflags $(${pkg}-config --cflags)
>+        temp_extralibs=$($pkg_config --libs $pkg)
>+        add_cflags $($pkg_config --cflags $pkg)
>         check_lib "$@" $header $func $temp_extralibs && enable $cfg
>         CFLAGS=$backup_cflags
>     fi
>@@ -5907,7 +5907,7 @@
> enabled pic && enable_weak_pic
> 
> is_qmake5(){
>-    $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]"
>+    $1 --version 2>&1 | egrep -q -e 'Qt version 5\.(([1-9][0-9]+)|[2-9])\.[0-9]'
> }
> 
> # qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
>@@ -6902,7 +6902,7 @@
> EOF
> done
> 
>-check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
>+check_foo_config freetype2 freetype2 ft2build.h FT_Init_FreeType
> 
> enabled freetype2 ||
>     die "ERROR! You must have FreeType installed to compile MythTV."
>
>--- a/libs/libmythbase/libmythbase.pro	2018-08-09 22:36:05.958221248 -0600
>+++ b/libs/libmythbase/libmythbase.pro	2018-08-09 22:36:23.899552090 -0600
>@@ -154,7 +154,7 @@
> 
> QT += xml sql network
> 
>-contains(QT_VERSION, ^5\\.[0-9]\\..*) {
>+contains(QT_VERSION, ^5\\.[0-9]+\\..*) {
> QT += widgets
> }
>
Comment 26 William T Wilson 2018-08-10 04:56:00 UTC
Created attachment 542896 [details, diff]
Fixes qmake >=5.10, freetype error

Sorry, I don't know what I'm doing with the bug UI!  Updated the patch again.
Comment 27 William T Wilson 2018-08-10 07:17:58 UTC
Created attachment 542902 [details, diff]
Fixes qmake >=5.10, freetype error

OK, I finally have sorted out all the build errors.  This latest patch, combined with my patch for bug 649044, results in a buildable package.  I have not tested it, however it does build for me (amd64 unstable, gcc 7.3.0)
Comment 28 Konstantin Münning 2018-10-11 07:29:11 UTC
(In reply to William T Wilson from comment #27)

By the way, bug 665182 is about the Qt regex bug and there is a patch for it posted there. IMHO the patches posted on a bug should fix the bug in question and not patch other reported bugs at the same time. At least not without cross-referencing it with the other bug reports.

So your patch (probably) fixes this bug but also adds an incomplete patch for bug 665182 where the patch provided there is complete.
Your patch for bug 649044 also patches the bug but also adds another incomplete patch for bug 665182. I think a maintainer would have a harder time to get this all together than if the patches would focus on its specific bugs only.
Comment 29 Larry the Git Cow gentoo-dev 2018-10-20 16:36:25 UTC
The bug has been closed via the following commit(s):

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

commit a9f434f613b2c031adcc77b569baf05db6ef02af
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2018-10-20 14:47:11 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2018-10-20 16:35:30 +0000

    media-tv/mythtv: Bump to 29.1
    
    Thanks-to: Preston Crow
    Thanks-to: Tom Dexter
    Closes: https://bugs.gentoo.org/645850
    Closes: https://bugs.gentoo.org/649044
    Closes: https://bugs.gentoo.org/658534
    Closes: https://bugs.gentoo.org/665182
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 media-tv/mythtv/Manifest           |   1 +
 media-tv/mythtv/mythtv-29.1.ebuild | 369 +++++++++++++++++++++++++++++++++++++
 2 files changed, 370 insertions(+)