Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230509 - media-video/ogmrip-0.12.0 turns warnings into errors
Summary: media-video/ogmrip-0.12.0 turns warnings into errors
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Olivier Rolland
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 12:03 UTC by Paweł Zaskórski
Modified: 2008-12-03 14:32 UTC (History)
3 users (show)

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


Attachments
Complete build log (build.log,58.25 KB, text/plain)
2008-07-02 12:04 UTC, Paweł Zaskórski
Details
The ebuild environment file (environment,101.30 KB, text/plain)
2008-07-02 12:05 UTC, Paweł Zaskórski
Details
Created by "LC_ALL=C emerge ogmrip >/tmp/file.log 2>&1" (file.log,59.16 KB, text/plain)
2008-07-06 20:39 UTC, Paweł Zaskórski
Details
the patch removes -Werror from CFLAGS in configure (ogmrip-werror-removal.patch,980 bytes, patch)
2008-07-07 04:31 UTC, Attila Tóth
Details | Diff
ogmrip-0.12.0-aac-ac3-avi.patch (ogmrip-0.12.0-aac-ac3-avi.patch,3.29 KB, patch)
2008-07-07 22:37 UTC, Olivier Rolland
Details | Diff
ogmrip-0.12.0-r1.ebuild (ogmrip-0.12.0-r1.ebuild,3.14 KB, text/plain)
2008-07-07 22:38 UTC, Olivier Rolland
Details
ogmrip-0.12.0-uninitialized.patch (ogmrip-0.12.0-uninitialized.patch,570 bytes, patch)
2008-07-13 19:53 UTC, Olivier Rolland
Details | Diff
ogmrip-0.12.0-r1.ebuild (ogmrip-0.12.0-r1.ebuild,3.18 KB, text/plain)
2008-07-13 19:54 UTC, Olivier Rolland
Details
ogmrip-0.12.0-uninitialized.patch (ogmrip-0.12.0-uninitialized.patch,2.17 KB, patch)
2008-07-13 22:28 UTC, Olivier Rolland
Details | Diff
ogmrip-0.12.0-undefined.patch (ogmrip-0.12.0-undefined.patch,768 bytes, patch)
2008-07-14 18:49 UTC, Olivier Rolland
Details | Diff
ogmrip-0.12.0-r1.ebuild (ogmrip-0.12.0-r1.ebuild,3.22 KB, text/plain)
2008-07-14 18:49 UTC, Olivier Rolland
Details
ogmrip-0.12-subp2pgm.patch (ogmrip-0.12-subp2pgm.patch,596 bytes, patch)
2008-08-29 19:15 UTC, Olivier Rolland
Details | Diff
ogmrip-0.12.0-r1.ebuild (ogmrip-0.12.0-r1.ebuild,3.27 KB, text/plain)
2008-08-29 19:16 UTC, Olivier Rolland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Zaskórski 2008-07-02 12:03:23 UTC
ogmrip 0.12.0 gives the following error when compiling:

if /bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include    -I../libogmjob -I../libogmdvd -DOGMRIP_LIB_DIR=\""/usr/lib64"\" -DOGMRIP_DATA_DIR=\""/usr/share"\"  -I/usr/local/include  -O2 -march=athlon64 -pipe -fomit-frame-pointer -finline-functions -I/usr/local/include -I.. -Wall -Werror -MT ogmrip-video-codec.lo -MD -MP -MF ".deps/ogmrip-video-codec.Tpo" -c -o ogmrip-video-codec.lo ogmrip-video-codec.c; \
        then mv -f ".deps/ogmrip-video-codec.Tpo" ".deps/ogmrip-video-codec.Plo"; else rm -f ".deps/ogmrip-video-codec.Tpo"; exit 1; fi
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../libogmjob -I../libogmdvd -DOGMRIP_LIB_DIR=\"/usr/lib64\" -DOGMRIP_DATA_DIR=\"/usr/share\" -I/usr/local/include -O2 -march=athlon64 -pipe -fomit-frame-pointer -finline-functions -I/usr/local/include -I.. -Wall -Werror -MT ogmrip-video-codec.lo -MD -MP -MF .deps/ogmrip-video-codec.Tpo -c ogmrip-video-codec.c  -fPIC -DPIC -o .libs/ogmrip-video-codec.o
 x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../libogmjob -I../libogmdvd -DOGMRIP_LIB_DIR=\"/usr/lib64\" -DOGMRIP_DATA_DIR=\"/usr/share\" -I/usr/local/include -O2 -march=athlon64 -pipe -fomit-frame-pointer -finline-functions -I/usr/local/include -I.. -Wall -Werror -MT ogmrip-video-codec.lo -MD -MP -MF .deps/ogmrip-video-codec.Tpo -c ogmrip-video-codec.c -o ogmrip-video-codec.o >/dev/null 2>&1
make[2]: *** [ogmrip-video-codec.lo] Błąd 1
make[2]: Opuszczenie katalogu `/var/tmp/portage/media-video/ogmrip-0.12.0/work/ogmrip-0.12.0/libogmrip'
make[1]: *** [all-recursive] Błąd 1
make[1]: Opuszczenie katalogu `/var/tmp/portage/media-video/ogmrip-0.12.0/work/ogmrip-0.12.0'
make: *** [all] Błąd 2
 *
 * ERROR: media-video/ogmrip-0.12.0 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2669:  Called gnome2_src_compile
 *             environment, line 2004:  Called die
 * The specific snippet of code:
 *       emake || die "compile failure"
 *  The die message:
 *   compile failure
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-video/ogmrip-0.12.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/ogmrip-0.12.0/temp/environment'.
 *


Reproducible: Always

Steps to Reproduce:
1. try to emerge =media-video/ogmrip-0.12.0 on amd64
2. watch results
3.

Actual Results:  
The program failed to compile


Portage 2.2_rc1 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r4-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Wed, 02 Jul 2008 08:00:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer -finline-functions"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config"
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/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer -finline-functions"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="pl"
LC_ALL="pl_PL.UTF8"
LDFLAGS=""
LINGUAS="pl"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip S3TC X a52 aac acl alsa amd64 apache2 bash-completion berkdb branding bzip2 cairo cdparanoia cdr chm cli colordiffcracklib crypt css dbus divx dri dvd dvdnav dvdr dvdread emerald encode exif extras fam ffmpeg firefox flac fontconfig ftp gd gdbm gecko geoip gif gimp gnome gnutls gpg gphoto2 gtk gzip hal iconv id3tag imagemagick inotify ipv6 jabber javascript jpeg jpeg2k lame libnotify lm_sensors lzo lzw maps matroska mbox midi mmx mmxext mng mp3 mp4 mplayer mplayer-bin mudflap multilib musepack musicbrainz mysql nautilus ncursesnls nowin nptl nptlonly nsplugin nvidia ogg opengl openmp pam pcre pdf perl php png python qt3support qt4 query-browser quicktime readline realmedia scenarios semantic-desktop session slang sou spl sqlite sqlite3 srt sse sse2 ssl startup-notification svg symlink tcpd theora thunderbird tiff trayicon truetype unicode usb vcd vim-syntax vorbis wma wmf wmp workbench x264 xcomposite xorg xscreensaver xv xvid zip zlib zsh-completion" ALSA_CARDS="emu10k1" 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" APACHE2_MODULES="alias auth_basic auth_digest autoindex authn_dbm authn_file authz_host authz_user deflate dir filter headers log_config mime mime_magic setenvif negotiation rewrite status userdir" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia none"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Paweł Zaskórski 2008-07-02 12:04:34 UTC
Created attachment 159311 [details]
Complete build log
Comment 2 Paweł Zaskórski 2008-07-02 12:05:00 UTC
Created attachment 159313 [details]
The ebuild environment file
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-07-02 15:11:41 UTC
Maybe there's a configure option to not set -Werror? :)
Comment 4 Olivier Rolland 2008-07-02 16:00:28 UTC
I don't see any warning in your log file. Perhaps you forgot to redirect the error output.
Comment 5 Paweł Zaskórski 2008-07-02 16:31:50 UTC
build.log is a standard log file created by portage. Should I build this package with some extra options for additional error output?
Comment 6 Olivier Rolland 2008-07-06 19:58:44 UTC
I know build.log is a standard log file created by portage. But I can't find the compilation error in this file. Can you please try emerging ogmrip again with an unlocalized gcc, redirect both standard output and standard error in a single file and post it here ?

Thanks,

Olivier

PS: Just in case, the command line if you're using bash:
LC_ALL=C emerge ogmrip > file.log 2>&1
Comment 7 Paweł Zaskórski 2008-07-06 20:39:50 UTC
Created attachment 159731 [details]
Created by "LC_ALL=C emerge ogmrip >/tmp/file.log 2>&1"
Comment 8 Attila Tóth 2008-07-07 04:19:33 UTC
(In reply to comment #6)
> I know build.log is a standard log file created by portage. But I can't find
> the compilation error in this file. Can you please try emerging ogmrip again
> with an unlocalized gcc, redirect both standard output and standard error in a
> single file and post it here ?
> 
> Thanks,
> 
> Olivier

Hi Olivier!

This is it:
cc1: warnings being treated as errors
ogmrip-mplayer.c: In function ‘ogmrip_mencoder_container_append_audio_file’:
ogmrip-mplayer.c:1002: warning: passing argument 1 of ‘strcpy’ discards qualifiers from pointer target type

Dwokfur
Comment 9 Attila Tóth 2008-07-07 04:31:44 UTC
Created attachment 159762 [details, diff]
the patch removes -Werror from CFLAGS in configure

I suggest you to remove Werror flag from release versions of ogmrip. Please take a look at the attached patch.

Regards,
Dw.
Comment 10 Attila Tóth 2008-07-07 04:36:03 UTC
(In reply to comment #9)
> Created an attachment (id=159762) [edit]
> the patch removes -Werror from CFLAGS in configure
> 
> I suggest you to remove Werror flag from release versions of ogmrip. Please
> take a look at the attached patch.
> 
> Regards,
> Dw.
> 

Either you inherit flag-o-matic and do filter-flags -Werror or do epatch the above attached diff.
Do you want me to create the modified ebuild?

Regards,
Dw.

Comment 11 Olivier Rolland 2008-07-07 08:00:00 UTC
Thanks for pointing out the problem and providing a patch. However, I don't want to remove -Werror because experience shows that a warning hides more than often an error. And after looking at the code, I think there is actually a bug. I'll provide a patch ASAP.

Regards,

Olivier
Comment 12 Olivier Rolland 2008-07-07 22:37:35 UTC
Created attachment 159841 [details, diff]
ogmrip-0.12.0-aac-ac3-avi.patch

This patch fixes some issues when merging an AAC audio stream (or an AC3/DTS audio stream with an old version of mplayer) in an AVI container. It should also fix the compilation issue.
Comment 13 Olivier Rolland 2008-07-07 22:38:08 UTC
Created attachment 159842 [details]
ogmrip-0.12.0-r1.ebuild

This ebuild applies the patch above.
Comment 14 Attila Tóth 2008-07-08 08:02:39 UTC
(In reply to comment #13)
> Created an attachment (id=159842) [edit]
> ogmrip-0.12.0-r1.ebuild
> 
> This ebuild applies the patch above.
> 

I greatly appreciate your meticulous policy on warnings. This is a crucial step to produce better code. Not so many project could supply their release builds with -Werror enabled.

Regards,
Dw.
Comment 15 Sven E. 2008-07-12 04:20:18 UTC
Here is an other warning that bails otu as error:

ogmrip-video-codec.c: In function 'ogmrip_video_codec_autosize':
ogmrip-video-codec.c:573: error: 'scale_height' may be used uninitialized in this function
ogmrip-video-codec.c:573: error: 'scale_width' may be used uninitialized in this function

Src:
    guint scale_width, scale_height;

    ogmrip_video_codec_get_scale_size (video, &scale_width, &scale_height);

Although get_scale_size might 'guarantee' scale_width &height are always filled, they should be preinitialized to some sane value.

Comment 16 Olivier Rolland 2008-07-12 08:39:01 UTC
What are your CFLAGS ?
Comment 17 Sven E. 2008-07-12 15:16:50 UTC
CFALGS="-march=nocona -mtune=core2 -O3 -pipe"

on ~amd64/2008.0 profile (I did not turn on any -W flags explicitly, if you had that in mind, don't know about the profile though)
Comment 18 Olivier Rolland 2008-07-13 19:53:08 UTC
Created attachment 160278 [details, diff]
ogmrip-0.12.0-uninitialized.patch

This patch should fix your compilation issue (even though the variables are still not initialized in the function). Can you try it and tell me if there are other similar issues ?

Thanks,

Olivier
Comment 19 Olivier Rolland 2008-07-13 19:54:20 UTC
Created attachment 160280 [details]
ogmrip-0.12.0-r1.ebuild

This ebuild applies all the patches.
Comment 20 Sven E. 2008-07-13 20:34:13 UTC
Yes, we get a little further, now we end up with:

cc1: warnings being treated as errors
ogmrip-lavc.c: In function 'ogmrip_lavc_run':
ogmrip-lavc.c:128: error: 'predia' may be used uninitialized in this function
ogmrip-lavc.c:128: note: 'predia' was declared here
ogmrip-lavc.c:128: error: 'dia' may be used uninitialized in this function
ogmrip-lavc.c:128: note: 'dia' was declared here

BTW: all gcc invocations end in ' >/dev/null 2>&1', which makes it pretty cumbersome to get the errors, because they don'T show up in the build log. I guess, those errors are sent to stdout (not stderr) and that's why they don'T show up in the build log.
Comment 21 Olivier Rolland 2008-07-13 20:47:35 UTC
Can I directly mail you any further patch and only post here when ogmrip compiles cleanly on your system ? Do you need ebuilds to apply the patches ?
Comment 22 Sven E. 2008-07-13 21:13:17 UTC
(In reply to comment #21)
> Can I directly mail you any further patch and only post here when ogmrip
> compiles cleanly on your system ? Do you need ebuilds to apply the patches ?
> 

Yeah, you can mail the patches directly to my email, I won't need ebuilds, can modify the one I put in my overlay.
Comment 23 Olivier Rolland 2008-07-13 22:28:16 UTC
Created attachment 160288 [details, diff]
ogmrip-0.12.0-uninitialized.patch

This patch should fix all compilation issues with gcc-4.3.
Comment 24 Olivier Rolland 2008-07-14 18:49:04 UTC
Created attachment 160372 [details, diff]
ogmrip-0.12.0-undefined.patch

This patch fixes some undefined symbols in libogmrip-lavc-option.so
Comment 25 Olivier Rolland 2008-07-14 18:49:38 UTC
Created attachment 160374 [details]
ogmrip-0.12.0-r1.ebuild

This ebuild applies all the patches.
Comment 26 Attila Tóth 2008-08-07 08:02:02 UTC
Dear Olivier, FYI:
media-video/ogmrip-0.12.1 fails to compile:
cc1: warnings being treated as errors
subp2pgm.c: In function ‘load_palette’:
subp2pgm.c:404: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result

Regards:
Dwokfur
Comment 27 Olivier Rolland 2008-08-29 19:15:28 UTC
Created attachment 164079 [details, diff]
ogmrip-0.12-subp2pgm.patch

This patch fixes a compilation error when using the hardened profile.
Comment 28 Olivier Rolland 2008-08-29 19:16:08 UTC
Created attachment 164080 [details]
ogmrip-0.12.0-r1.ebuild

This ebuild applies the patches above.
Comment 29 Steve Dibb (RETIRED) gentoo-dev 2008-12-03 14:32:20 UTC
dropped the old ebuild from the tree