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

Bug 582852

Summary: media-libs/libraw-0.17.1: building w/ gcc-6: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
Product: Gentoo Linux Reporter: Peter Levine <plevine457>
Component: [OLD] GCC PortingAssignee: Gentoo Graphics Project <graphics>
Status: RESOLVED FIXED    
Severity: normal CC: jstein, mail, plevine457
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: libraw-0.17.1-gcc6.patch

Description Peter Levine 2016-05-12 19:02:50 UTC
Building media-libs/libraw-0.17.1 with gcc-6 fails with:


/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
   }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
   ^
/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '128' from 'int' to 'signed char' inside { } [-Wnarrowing]
/var/tmp/portage/media-libs/libraw-0.17.1/work/LibRaw-0.17.1/internal/dcraw_common.cpp:4539:3: error: narrowing conversion of '136' from 'int' to 'signed char' inside { } [-Wnarrowing]
Comment 1 Peter Levine 2016-05-12 19:04:50 UTC
Created attachment 434102 [details, diff]
libraw-0.17.1-gcc6.patch

Backported from upstream:

https://github.com/LibRaw/LibRaw/commit/eba7a66e23f2f62cc4c8115af8066f2df5da085a
Comment 2 Mark Wright gentoo-dev 2016-06-29 10:53:51 UTC
(In reply to Peter Levine from comment #1)
> Created attachment 434102 [details, diff] [details, diff]
> libraw-0.17.1-gcc6.patch
> 
> Backported from upstream:
> 
> https://github.com/LibRaw/LibRaw/commit/
> eba7a66e23f2f62cc4c8115af8066f2df5da085a

Thanks, I reproduced the problem compiling both 0.17.1 and 0.17.2 with gcc 6.1.0,
and the patch fixes the problem with both 0.17.1 and 0.17.2.
Comment 3 David Seifert gentoo-dev 2016-11-14 18:29:05 UTC
commit 8ecfa678744847c6e13bc5659e6d88c45a321ce5
Author: David Seifert <soap@gentoo.org>
Date:   Mon Nov 14 19:10:07 2016 +0100

    media-libs/libraw: Allow for compiling with GCC 6
    
    Gentoo-bug: 582852
    * Patch by Peter Levine
    * Add pkg_setup() check
    * Disable building of static libraries
    * Prune .la files unconditionally