Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 275008 - media-plugins/mythmusic-0.21_p17821 fails to compile due to missing include from media-libs/faad2-2.7
Summary: media-plugins/mythmusic-0.21_p17821 fails to compile due to missing include f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 2 votes (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
: 262074 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-22 03:04 UTC by Will Saxon
Modified: 2010-04-30 01:12 UTC (History)
11 users (show)

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


Attachments
Patch for the missing /usr/include/mp4ff_int_types.h include file. (faad2-2.7-mp4ff-includes.patch,372 bytes, patch)
2009-09-15 22:20 UTC, Jerry McDonald
Details | Diff
Proposed ebuild which includes the patch (faad2-2.7-r2.ebuild,973 bytes, text/plain)
2009-09-15 22:20 UTC, Jerry McDonald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Saxon 2009-06-22 03:04:43 UTC
This is the exact same problem that was reported 4 years ago in bugs 86062 and 90783. These were marked closed/fixed but I am having the same problem now.

I worked around it by just unpacking the faad2 source and copying the mp4ff_int_types.h file into /usr/include - I am not sure if the patch recommended in 86062 is still a viable fix.

>>> Emerging (1 of 1) media-plugins/mythmusic-0.21_p17821
 * checking ebuild checksums ;-) ...                         [ ok ]
 * checking auxfile checksums ;-) ...                        [ ok ]
 * checking miscfile checksums ;-) ...                       [ ok ]
>>> Unpacking source...                                                                                                                                                                        
 * subversion update start -->                                                 
 *      repository: http://svn.mythtv.org/svn/branches/release-0-21-fixes/mythplugins@17821                                                                                                    
At revision 17821.                                                                                                                                                                             
 *    working copy: /mnt/data/usr/portage/distfiles/svn-src/mythplugins/mythplugins                                                                                                            

>>> Source unpacked in /mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/work
>>> Compiling source in /mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/work/mythplugins-0.21 ...
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-mythbrowser --disable-mythcontrols --disable-mythflix --disable-mythgallery --disable-mythgame --enable-mythmusic --disable-mythnews --disable-mythphone --disable-mythvideo --disable-mythweather --disable-mythweb --disable-mytharchive --disable-mythzoneminder --disable-mythmovies --enable-aac --enable-fftw --enable-sdl --enable-opengl               

Configuration settings: 
                        
        MythArchive    plugin will not be built
        MythBrowser    plugin will not be built
        MythControls   plugin will not be built
        MythFlix       plugin will not be built
        MythGallery    plugin will not be built
        MythGame       plugin will not be built
        MythMusic      plugin will be built    
        MythNews       plugin will not be built
        MythPhone      plugin will not be built
        MythVideo      plugin will not be built
        MythWeather    plugin will not be built
        MythZoneMinder plugin will not be built
        MythMovies     plugin will not be built
        OpenGL         support will be included in MythMusic
        libvisual      support will be included in MythMusic                                                                                                                                    
        FFTW v.3       support will be included in MythMusic                                                                                                                                    
        SDL            support will be included in MythMusic                                                                                                                                    
        AAC            support will be included in MythMusic                                                                                                                                    
                                                                                                                                                                                                
<snip>
                                                                                                         
g++ -c -pipe -march=core2 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -Wall -W -fomit-frame-pointer -O3 -fomit-frame-pointer -DNDEBUG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -DPREFIX=\"/usr\" -DMMX -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include/libvisual-0.4 -I/usr/include/taglib -I/usr/include/cdda -I/usr/qt/3/include -I/usr/include -o aacdecoder.o aacdecoder.cpp                                                                                                                                     
In file included from metaiomp4.h:7,                                                                                                                                                            
                 from metaiomp4.cpp:11:                                                                                                                                                         
/usr/include/mp4ff.h:41:29: error: mp4ff_int_types.h: No such file or directory                                                                                                                 
metaiomp4.cpp: In function 'uint32_t md_truncate_callback(void*)':
metaiomp4.cpp:47: warning: ignoring return value of 'int ftruncate(int, __off64_t)', declared with attribute warn_unused_result
metaiomp4.cpp: In member function 'virtual bool MetaIOMP4::write(Metadata*, bool)':
metaiomp4.cpp:137: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:140: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:143: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:146: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:149: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:153: warning: deprecated conversion from string constant to 'char*'
metaiomp4.cpp:157: warning: deprecated conversion from string constant to 'char*'
make[2]: *** [metaiomp4.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/work/mythplugins-0.21/mythmusic/mythmusic'
make[1]: *** [sub-mythmusic] Error 2
make[1]: Leaving directory `/mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/work/mythplugins-0.21/mythmusic'
make: *** [sub-mythmusic] Error 2
 *
 * ERROR: media-plugins/mythmusic-0.21_p17821 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2993:  Called mythtv-plugins_src_compile
 *             environment, line 2642:  Called die
 * The specific snippet of code:
 *       emake || die "make failed to compile"
 *  The die message:
 *   make failed to compile
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/temp/build.log'.
 * The ebuild environment file is located at '/mnt/data/var/tmp/portage/media-plugins/mythmusic-0.21_p17821/temp/environment'.
 *

output of emerge --info:

m4:/etc/mail/sendmail.mc:100: cannot open `/usr/share/sendmail/cf/feature/smarthost.m4': No such file or directory
Comment 1 Will Saxon 2009-06-22 03:06:07 UTC
wrong buffer...

emerge --info:

Portage 2.2_rc33 (default/linux/amd64/2008.0/no-multilib, gcc-4.3.3, glibc-2.10.1-r0, 2.6.28-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r3-x86_64-Intel-R-_Celeron-R-_CPU_440_@_2.00GHz-with-gentoo-2.0.0
Timestamp of tree: Sun, 21 Jun 2009 05:45:02 +0000
app-shells/bash:     4.0_p24
dev-lang/python:     2.5.4-r2, 2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/mythtv/"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 apache2 autostart berkdb bzip2 cleartype cli cracklib crypt dbus dri dvb dvd encode fftw flac gdbm gpm hal hardcoded-tables iconv ieee1394 ipv6 isdnlog lcd libvisual lirc midi mmap mmx mmxext mp3 mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pcre perl posix pppd python qt4 readline reflection sdl session spl sse sse2 ssl ssse3 svg symlink sysfs tcpd theora threads truetype unicode v4l2 vim-syntax vorbis x264 xorg xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="irtrans" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Wormo (RETIRED) gentoo-dev 2009-06-27 06:36:57 UTC
I think this header was really meant for internal use, so faad2 devs put their foot down and stopped installing it. mythmusic would be better off including <stdint.h> which is the only thing that mp4ff_int_types.h does on linux platform.

Thanks for reporting this issue, assigning to mythmusic maintainers 
Comment 3 Will Saxon 2009-07-20 05:03:35 UTC
I tried to emerge media-plugins/mythmusic-0.21_p20563 this evening and the same issue occurs. I have attached a build log. 
Comment 4 Dan A. Dickey 2009-07-20 18:33:56 UTC
This looks like a dup of bug 262074
Comment 5 Michal Sylwester 2009-07-21 20:00:45 UTC
Actually, this looks more like a bug in faad2 to me (or should headers assume whoever includes them will run configure and include config.h earlier?) 
Anyway: I had this problem too, so I took a quick look at the code and /usr/include/mp4ff.h contains this:
#ifdef HAVE_STDINT_H
#include <stdint.h>
#else
#include "mp4ff_int_types.h"
#endif

This means essentially, that if your code (here mythmusic) won't define HAVE_STDINT_H then it will fail (as mp4ff_int_types.h is not installed).

It can be fixed either:
- in mythmusic (by including config.h which defines HAVE_STDINT_H in metaiomp4.cpp before it includes metaiomp4.h - this fixes just mythmusic)
- or by fixing /usr/include/mp4ff.h so it won't depend on HAVE_STDINT_H beeing set earlier (should fix everything that uses this)

BTW: mythmusic README contains this:
            __NB__: As of March 5, 2004, you can build and install FAAD2 v2.0
            final, but you must manually copy mp4ff_int_types.h from faad2/common/mp4ff/
            to your usr/local/include/ directory.

So I suspect this is indeed an old problem, however somehow nobody fixed it so far...

Just in case howto get it to compile if you have this problem( I assume mythmusic-0.21_p20563, adjust if necessary):
- ebuild `equery w mythmusic` compile
- wait for build to fail
- cd to the mythmusic/mythmusic dir (see error message for full path, the line with make[2]: Leaving directory)
- edit metaiomp4.cpp
- add before #include "metaiomp4.h":
#include "config.h"
- ebuild `equery w mythmusic` merge
Comment 6 Gregg Casillo 2009-07-22 14:13:15 UTC
Michael's workaround in #5 worked for me. Thanks.
Comment 7 Christopher Hogan 2009-07-27 09:25:29 UTC
I found some bug reports in the mythtv mailing list archive before I found this bug report. Ticket 6520 shows the report from a Gentoo user. The reply is that Ticket 5580 will fix it. Ticket 5580 replaces the dependency on faad2 with ffmpeg.

Here are the relevant links:
http://svn.mythtv.org/trac/ticket/6520
http://svn.mythtv.org/trac/ticket/5580
Comment 8 Sod off! I am no loger here! 2009-07-29 08:07:26 UTC
In my opinoin this is ralated to faad2, which I think should be properly installed if emerged. It is not a new problem as it is documented in bug http://bugs.gentoo.org/show_bug.cgi?id=90783. It was fixed then but is not any more. 

I propse this bug is adressed to faad2 ebuild and is fixed there. 

Moving from faad2 to ffmpeg in mythmusic is a worksround that does not repair the basic problem although it might help us mythmusic-users get mythmusic working :) 
Comment 9 Richard Dunlap 2009-08-11 05:25:49 UTC
I see both of these packages marked as "STABLE" when clearly one of them is not since mythmusic-0.21_p17821 won't install when using faad2.

Comment 10 SpanKY gentoo-dev 2009-08-27 02:23:56 UTC
any package using mp4ff is broken and needs fixing/updating to use libmp4v2
Comment 11 Chris Slycord 2009-08-27 21:32:21 UTC
After using the workaround I get

g++ -c -pipe -march=core2 -g -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -Wno-non-virtual-dtor -D__STDC_CONSTANT_MACROS -Wall -W -fomit-frame-pointer -O3 -fomit-frame-pointer -DNDEBUG -D_REENTRANT -DPIC -fPIC  -D_GNU_SOURCE -DPREFIX=\"/usr\" -DMMX -Di386 -D_FILE_OFFSET_BITS=64 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/qt/3/mkspecs/linux-g++ -I/var/tmp/portage/media-plugins/mythmusic-0.21_p20563/work/branches/release-0-21-fixes/mythplugins/mythmusic/mythmusic -I/usr/include -I/usr/include -I/usr/include/taglib -I/usr/include/cdda -I/usr/qt/3/include -o mainvisual.o mainvisual.cpp
In file included from mainvisual.cpp:30:
visualize.h:32:32: error: missing binary operator before token "double"
make[2]: *** [mainvisual.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-plugins/mythmusic-0.21_p20563/work/branches/release-0-21-fixes/mythplugins/mythmusic/mythmusic'
make[1]: *** [sub-mythmusic] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-plugins/mythmusic-0.21_p20563/work/branches/release-0-21-fixes/mythplugins/mythmusic'
make: *** [sub-mythmusic] Error 2
 #[31;01m*#[0m 
 #[31;01m*#[0m ERROR: media-plugins/mythmusic-0.21_p20563 failed.
 #[31;01m*#[0m Call stack:
 #[31;01m*#[0m               ebuild.sh, line   49:  Called src_compile
 #[31;01m*#[0m             environment, line 2984:  Called mythtv-plugins_src_compile
 #[31;01m*#[0m             environment, line 2617:  Called die
 #[31;01m*#[0m The specific snippet of code:
 #[31;01m*#[0m       emake || die "make failed to compile"
 #[31;01m*#[0m  The die message:
 #[31;01m*#[0m   make failed to compile
 #[31;01m*#[0m 
Comment 12 Jesse Adelman 2009-09-04 06:40:31 UTC
Same ebuild as #11, same problem.
Comment 13 Jerry McDonald 2009-09-15 22:16:10 UTC
This is not a mythmusic bug, this is a faad2 bug (and has been correctly recategorized as such).  As Will has reported, this bug existed and was fixed sometime back (see #90783).  Apparently the bug got introduced again by someone removing the patch from the ebuild.  The package is in portage and marked stable so it should work.  So the solution is to simply fix it, and not debate whether or not it should be used.  I've built a patch which does this and my faad2 and mythmusic are now working!

I'll attach an updated patch and an ebuild based on the current faad2-2.7-r1.ebuild.  The patch includes the missing mp4ff_int_types.h header file.  Justification:  This is NOT an internal header file - it IS called by mp4ff.h, which is an external header file, and so is essential.

For any users who want to use this patch, create a portage overlay and copy the current /usr/portage/media-libs/faad2 to the overlay.  Add the ebuild to your overlay/media-libs/faad2 directory, and the patch to the files subdirectory.  Then:

  emerge -1 faad2

Since the new ebuild is not yet marked as stable, you'll need to unmask it in your /etc/portage/packages.keywords.

As a note to those who want to minimize installing "internal" headers.  The library does install an "internal" mp4ffint.h header file.  Looking at bug #90783, you can see that this file was since added to the exported includes, perhaps by mistake.  It may be possible to remove this file, but I've not done the research to determine if there was a specific reason to add the file.  For maximum compatibility with any other packages using this library I'm leaving that file installed, as it is currently.
Comment 14 Jerry McDonald 2009-09-15 22:20:03 UTC
Created attachment 204261 [details, diff]
Patch for the missing /usr/include/mp4ff_int_types.h include file.
Comment 15 Jerry McDonald 2009-09-15 22:20:55 UTC
Created attachment 204262 [details]
Proposed ebuild which includes the patch
Comment 16 Oo.et.oO 2009-10-27 18:15:10 UTC
the work-around/hand patch in #11 didn't work for me.  

but using the ebuild/patch for faad2 above worked for faad2 AND mythmusic merged successfully using mythmusic-0.21_p20563 on amd64.

thanks!
Comment 17 Doug Goldstein (RETIRED) gentoo-dev 2009-11-15 00:38:22 UTC
*** Bug 262074 has been marked as a duplicate of this bug. ***
Comment 18 Anthony 2009-11-17 19:00:02 UTC
confirmed applying the r2 overlay fixed the faad2 build, which in turn lets mythmusic compile.  Thanks so much!

don't forget to run "ebuild faad2-2.7-r2.ebuild digest" too.
Comment 19 Krellan 2010-02-16 03:57:47 UTC
The fixes in comment 13, 14, 15, and 18 worked great for me.

Three things to mention:

The file faad2-2.7-mp4ff-includes.patch from comment 14 must be copied to this directory:
/usr/portage/media-libs/faad2/files

The file faad2-2.7-r2.ebuild from comment 15 must be copied to this directory:
/usr/portage/media-libs/faad2

The following line (or similar) must be added to the /etc/portage/package.keywords file, to force it to pick up the new version:
>=media-libs/faad2-2.7-r2

Then, run the command from comment 18, from within the /usr/portage/media-libs/faad2 directory:
ebuild faad2-2.7-r2.ebuild digest

When these are done, it emerges cleanly:
emerge -vlp faad2
emerge faad2

Great fix.  It seems low-risk.  I wonder why this hasn't been added to the main Gentoo Portage tree?

I'm not sure how to create my own local overlay, so just made the file edits directly for now.  Backed up the /usr/portage/media-libs/faad2 directory manually, so I can re-apply it after emerge --sync breaks it again.  I looked at the developer guide, but it talks about git repositories and overlays.gentoo.org, which are overkill for this.  Is there a command that can quickly create a local overlay, that can be applied on top of the existing /usr/portage tree?

Thanks!
Comment 20 Samuli Suominen (RETIRED) gentoo-dev 2010-04-29 15:16:21 UTC
mythmusic is broken by design then, nothing should be using libmp4ff from faad2, it's classified as experimental and upstream is only building static archive out of it, no plans to provide stable API

mythmusic should be using e.g. libmp4v2 or copy the needed parts of libmp4ff to it's own source tree

but someone went and added -r1 that builds the unsupported library anyway, so here's to complete that:

+*faad2-2.7-r2 (29 Apr 2010)
+
+  29 Apr 2010; Samuli Suominen <ssuominen@gentoo.org> +faad2-2.7-r2.ebuild,
+  +files/faad2-2.7-libmp4ff-install-mp4ff_int_types_h.patch:
+  Install mp4ff_int_types.h since we are building unsupported libmp4ff
+  library anyway wrt #275008.