Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 592450

Summary: media-libs/smpeg-0.4.4-r10: building w/gcc-6: audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
Product: Gentoo Linux Reporter: Francesco Turco <fturco>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: b.buschinski, fkrogh, plevine457, toralf
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: build log for media-libs/smpeg-0.4.4-r10 using gcc-6.2.0
emerge --info
smpeg-0.4.4-gcc6.patch

Description Francesco Turco 2016-08-30 16:16:57 UTC
Created attachment 444460 [details]
build log for media-libs/smpeg-0.4.4-r10 using gcc-6.2.0

After having upgraded gcc to version 6.2.0 I can't build media-libs/smpeg-0.4.4-r10 anymore. It used to work with gcc-5.4.0

Snippet of error message:

> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> };
> ^
> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> /var/tmp/portage/media-libs/smpeg-0.4.4-r10/work/smpeg-0.4.4/audio/huffmantable.cpp:587:1: error: narrowing conversion of '-1' from 'int' to 'unsigned int' inside { } [-Wnarrowing]
> make[1]: *** [Makefile:427: huffmantable.lo] Error 1

----------------

# emerge -pv smpeg

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] media-libs/smpeg-0.4.4-r10::gentoo  USE="X opengl -debug -static-libs" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(-mmx)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 1 Francesco Turco 2016-08-30 16:17:23 UTC
Created attachment 444462 [details]
emerge --info
Comment 2 Francesco Turco 2016-08-31 16:45:09 UTC
Adding -std=gnu++98 to CXXFLAGS fixes the problem.
Comment 3 Peter Levine 2016-09-21 21:35:47 UTC
Created attachment 447256 [details, diff]
smpeg-0.4.4-gcc6.patch
Comment 4 Francesco Turco 2016-09-21 22:04:19 UTC
I confirm I'm able to correctly build media-libs/smpeg-0.4.4-r10 with patch from comment 3.
Comment 5 Toralf Förster gentoo-dev 2016-11-15 16:58:08 UTC
*** Bug 598452 has been marked as a duplicate of this bug. ***
Comment 6 Alexis Ballier gentoo-dev 2016-12-29 14:18:35 UTC
commit ef5af0ae93adbe5f549ad922756f3f566244d274
Author: Alexis Ballier <aballier@gentoo.org>
Date:   Thu Dec 29 15:17:32 2016 +0100

    media-libs/smpeg: fix build with gcc6, bug #592450, patch by Peter Levine.
 


thanks