Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 185807 - media-video/mpglen-0.1 fails to emerge
Summary: media-video/mpglen-0.1 fails to emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 21:02 UTC by Zurd
Modified: 2007-07-27 04:52 UTC (History)
1 user (show)

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


Attachments
mpglen-0.1.ebuild (mpglen-0.1.ebuild,676 bytes, text/plain)
2007-07-27 04:31 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zurd 2007-07-18 21:02:03 UTC
media-video/mpglen-0.1 fails to emerge with
>>> Compiling source in /var/tmp/portage/media-video/mpglen-0.1/work/mpglen ...
i686-pc-linux-gnu-gcc -march=pentium3 -O3 -pipe  -o mpglen mpglen.c
mpglen.c: In function ‘main’:
mpglen.c:63: error: ‘off64_t’ undeclared (first use in this function)
mpglen.c:63: error: (Each undeclared identifier is reported only once
mpglen.c:63: error: for each function it appears in.)
mpglen.c:63: error: expected ‘;’ before ‘flen’
mpglen.c:139: error: ‘O_LARGEFILE’ undeclared (first use in this function)
mpglen.c:146: error: ‘flen’ undeclared (first use in this function)
mpglen.c:152: warning: assignment makes pointer from integer without a cast
mpglen.c:155: error: ‘fpos’ undeclared (first use in this function)
mpglen.c:161: error: ‘fmemend’ undeclared (first use in this function)
mpglen.c:163: error: ‘cpos’ undeclared (first use in this function)
mpglen.c:178: warning: assignment makes pointer from integer without a cast
make: *** [mpglen] Error 1
 * 
 * ERROR: media-video/mpglen-0.1 failed.

I have no idea why but the solution is to do this :
CFLAGS="${CFLAGS} -D_GNU_SOURCE" ACCEPT_KEYWORDS=~x86 emerge mpglen

This solution comes from : 
http://forums.gentoo.org/viewtopic-t-550647-highlight-mpglen.html

Here's my emerge --info :
Portage 2.1.3_rc8 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6-r0, 2.6.22-gentoo-r1 i686)
=================================================================
System uname: 2.6.22-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System release 1.12.10
Timestamp of tree: Tue, 17 Jul 2007 19:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_CA.utf8"
LC_ALL="en_CA.utf8"
LINGUAS="en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apache2 asf avi berkdb bitmap-fonts cairo cdr cli cpudetection cracklib crypt cups dbus divx divx4linux dri dv dvd dvdr dvdread eds emboss encode esd evo exif fam fame ffmpeg firefox flac fortran fuse gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog jpeg kerberos ldap libg++ mad matroska midi mikmod mmx mp3 mpeg mudflap musepack ncurses network nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png ppds pppd pulseaudio python qt3support quicktime readline real reflection sdl session spell spl sse ssl subtitles svg tcpd theora tiff toolbar truetype truetype-fonts type1-fonts unicode vcd vorbis win32codecs x86 xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="adc65 agfa-cl20 aox barbie canon casio clicksmart310 digigr8 digita dimera directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak konica largan lg_gsm mars minolta mustek panasonic pccam300 pccam600 polaroid ptp2 ricoh samsung sierra sipix smal sonix sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always

Steps to Reproduce:
Comment 1 Alexis Ballier gentoo-dev 2007-07-27 04:15:18 UTC
seems to be due to this : 
http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.117&r2=1.118

If I apply this to the ebuild : 
-       emake CC="$(tc-getCC)" || die
+       emake CC="$(tc-getCC)" CFLAGS="${CPPFLAGS} ${CFLAGS}" || die

it compiles fine,  but without it, it won't since it ignores CPPFLAGS

@mike: is it the correct way of supporting cppflags here ? that's the only way I can think of now, but then, why changing the behavior of append-lfs-flags ?
Comment 2 SpanKY gentoo-dev 2007-07-27 04:31:01 UTC
Created attachment 126106 [details]
mpglen-0.1.ebuild

doing that would be an acceptable fix, but i think the overall ebuild could be greatly simplified
Comment 3 Alexis Ballier gentoo-dev 2007-07-27 04:52:44 UTC
thanks ! commited.
I just added this (plus relevant inherit): 
src_compile() {
        tc-export CC
        emake || die "emake failed"
}

so that it calls gcc with its full name rather than "cc"