Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 27987 - media-video/avifile-0.7.38.20030710 fails to compile with gcc-2.95.3
Summary: media-video/avifile-0.7.38.20030710 fails to compile with gcc-2.95.3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-05 02:17 UTC by Tristan Henderson
Modified: 2003-09-05 09:12 UTC (History)
0 users

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


Attachments
Modified version of buggy file. - I don't actually know how to create a patch... (flvenc.c,10.88 KB, text/plain)
2003-09-05 06:33 UTC, Mark Chappell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Henderson 2003-09-05 02:17:51 UTC
avifile-0.7.38.20030710 doesn't compile for me - see errors below. I suspect this might be a gcc-2.
95 bug (I haven't had time to upgrade my system to 1.4 yet).

gcc -DHAVE_CONFIG_H -I. -I. -I../../include -DHAVE_AV_CONFIG_H -I./../libavcodec -I./.. -Wall 
-Wno-unused -I../../include -O2 -mcpu=i686 -march=i686 -ffast-math -fomit-frame-pointer 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pipe -c flvenc.c  -fPIC -DPIC -o 
flvenc.lo
/bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -DHAVE_AV_CONFIG_H 
-I./../libavcodec -I./.. -Wall -Wno-unused -I../../include -O2 -mcpu=i686 -march=i686 -ffast-math 
-fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -pipe -c 
framehook.c
flvenc.c: In function `flv_write_trailer':
flvenc.c:232: parse error before `file_size'
flvenc.c:234: `flags' undeclared (first use in this function)
flvenc.c:234: (Each undeclared identifier is reported only once
flvenc.c:234: for each function it appears in.)
flvenc.c:238: `file_size' undeclared (first use in this function)
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -DHAVE_AV_CONFIG_H -I./../libavcodec
 -I./.. -Wall -Wno-unused -I../../include -O2 -mcpu=i686 -march=i686 -ffast-math
 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -
pipe -c framehook.c  -fPIC -DPIC -o framehook.lo
make[2]: *** [flvenc.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/avifile-0.7.38.20030710/work/avifile-0.7-0.7.
38/ffmpeg/libavformat'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/avifile-0.7.38.20030710/work/avifile-0.7-0.7.
38/ffmpeg'
make: *** [all-recursive] Error 1

!!! ERROR: media-video/avifile-0.7.38.20030710 failed.
!!! Function src_compile, Line 139, Exitcode 2
!!! (no error message)


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.49-r3 (default-1.0, gcc-2.95.3, glibc-2.2.5-r8, 2.4.22)
==============================================================
===
System uname: 2.4.22 i686 Transmeta(tm) Crusoe(tm) Processor TM5800
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=i686 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config 
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ 
/usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=i686 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache autoaddcvs digest sandbox strict"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.
org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 apm avi crypt cups encode libg++ mmx mpeg ncurses pdflib quicktime spell truetype 
xml2 xmms xv aalib berkdb esd gdbm gif gnome-libs gpm gtk imlib java libwww motif oggvorbis pam 
python readline sdl snmp ssl svga tcpd -3dnow alsa apache2 -arts bonobo cdr curses dga dvd 
emacs ethereal evo fbcon gnome gtk2 gtkhtml guile jpeg -kde lcms -lirc -mikmod -moznoxft mysql 
nas -nls odbc -opengl oss pcmcia pda perl pic plotutils png pnp -qt -qtmt samba -slang smooth tcltk 
tetex tiff trusted usb vim-with-x xml X X509 zlib"
Comment 1 Tristan Henderson 2003-09-05 04:36:42 UTC
I've since had a look at the avifile website (http://avifile.sourceforge.net/) and it says that this snapshot (20030710) doesn't compile with gcc 2.95. It also says that a new version is due soon (but that was written over a month ago...)
Comment 2 Mark Chappell 2003-09-05 06:33:49 UTC
Created attachment 17118 [details]
Modified version of buggy file. - I don't actually know how to create a patch...

Having become bored waiting for someone else to deal with this bug, I think
I've fixed it myself.

Having never tried to make a patch before I'm afraid I'm not actually sure how
to make a proper patch.  I'm also going to submit this to the authors.

The file at fault was
/var/tmp/portage/avifile-0.7.38.20030710/work/avifile-0.7-0.7.38/ffmpeg/libavformat/flv.enc


for some reason the authour attempted to define a variable part way through a
function.  Which, AFAIK is not technically legal C.

----------------------------------------------------------
The following is a diff showing what I did.

minimon libavformat # diff old flvenc.c
226a227,228
>     int64_t file_size ;
>     int flags = 0;
232,233c234,235
<     int64_t file_size = url_ftell(pb);
<     int flags = 0;
---
>     file_size = url_ftell(pb);
>
--------------------------------------------------
Comment 3 Mark Chappell 2003-09-05 06:54:11 UTC
Having just poked around on the archives of their mailing list, a similar patch was submitted to them about a week ago, I'd guess that future snapshots should include the fix....
Comment 4 Martin Holzer (RETIRED) gentoo-dev 2003-09-05 07:02:48 UTC
diff -Naur file1 file2 > patch 
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-09-05 09:12:37 UTC
in cvs

thx