Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622484 - media-gfx/ufraw-0.22-r1: dcraw.cc:2307:3: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
Summary: media-gfx/ufraw-0.22-r1: dcraw.cc:2307:3: error: narrowing conversion of '-2'...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Graphics Project
URL: https://bugs.debian.org/cgi-bin/bugre...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-22 19:37 UTC by Conrad Kostecki
Modified: 2017-07-19 11:49 UTC (History)
2 users (show)

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


Attachments
03_fix-unsigned-char.patch (03_fix-unsigned-char.patch,506 bytes, patch)
2017-06-22 19:38 UTC, Conrad Kostecki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2017-06-22 19:37:57 UTC
media-gfx/ufraw-0.22-r1 fails to build:

armv7a-hardfloat-linux-gnueabi-g++ -DHAVE_CONFIG_H -I.  -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/lensfun -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -I/usr/include/libpng16  -DDCRAW_NOMAIN -DUFRAW_LOCALEDIR=\"/usr/share/locale\"   -march=armv8-a+crc -mcpu=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mtune=cortex-a53 -O3 -masm-syntax-unified -mfloat-abi=hard -mfp16-format=ieee -mneon-for-64bits -mstructure-size-boundary=8 -mthumb -mtls-dialect=gnu2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -fopenmp -c -o ufraw_exiv2.o ufraw_exiv2.cc
dcraw.cc:10076:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
   strcpy (th->soft, "dcraw v"DCRAW_VERSION);
                     ^
dcraw.cc: In member function 'void DCRaw::kodak_radc_load_raw()':
dcraw.cc:2307:3: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
   };
   ^
dcraw.cc:2307:3: error: narrowing conversion of '-3' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-17' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-5' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-7' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-18' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-9' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-2' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-28' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-49' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-9' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-79' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-16' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-37' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-26' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-13' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-39' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-55' from 'int' to 'char' inside { } [-Wnarrowing]
dcraw.cc:2307:3: error: narrowing conversion of '-76' from 'int' to 'char' inside { } [-Wnarrowing]
make[2]: *** [Makefile:900: dcraw.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/media-gfx/ufraw-0.22-r1/work/ufraw-0.22'
make[1]: *** [Makefile:1036: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-gfx/ufraw-0.22-r1/work/ufraw-0.22'
make: *** [Makefile:592: all] Error 2
 * ERROR: media-gfx/ufraw-0.22-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=media-gfx/ufraw-0.22-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/ufraw-0.22-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-gfx/ufraw-0.22-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/ufraw-0.22-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/media-gfx/ufraw-0.22-r1/work/ufraw-0.22'
 * S: '/var/tmp/portage/media-gfx/ufraw-0.22-r1/work/ufraw-0.22'

Debian seems to fixed this. When I do also apply this patch, I am able to compile.
-> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856227
-> 03_fix-unsigned-char.patch
Comment 1 Conrad Kostecki gentoo-dev 2017-06-22 19:38:07 UTC
Portage 2.3.6 (python 3.6.1-final-0, default/linux/arm/13.0/armv7a, gcc-6.3.0, glibc-2.24-r3, 4.12.0-raspberrypi-v7+ armv7l)
=================================================================
System uname: Linux-4.12.0-raspberrypi-v7+-armv7l-ARMv7_Processor_rev_4_-v7l-with-gentoo-2.4.1
KiB Swap:    2097148 total,   2092028 free
Timestamp of repository gentoo: Thu, 22 Jun 2017 14:45:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.2) 2.28
distcc 3.2rc1 armv7a-hardfloat-linux-gnueabi [disabled]
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.6.1-r1::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.27.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

archeron
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="*"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-march=armv8-a+crc -mcpu=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mtune=cortex-a53 -O3 -masm-syntax-unified -mfloat-abi=hard -mfp16-format=ieee -mneon-for-64bits -mstructure-size-boundary=8 -mthumb -mtls-dialect=gnu2 -pipe -fomit-frame-pointer"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv8-a+crc -mcpu=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mtune=cortex-a53 -O3 -masm-syntax-unified -mfloat-abi=hard -mfp16-format=ieee -mneon-for-64bits -mstructure-size-boundary=8 -mthumb -mtls-dialect=gnu2 -pipe -fomit-frame-pointer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="ftp://ftp.halifax.rwth-aachen.de/gentoo/"
INSTALL_MASK="/etc/xinetd.d/* /usr/lib/systemd/system/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j5 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa arm armv5te armv6 armv6t2 berkdb bluetooth bzip2 cairo caps cddb cjk cracklib crypt cups curl cvs cxx dbus dga djvu encode fbcon ffmpeg flite fontconfig gd gif git gmp gnutls gpm graphviz gsm iconv icu idn imlib introspection ipv6 javascript jbig jit joystick jpeg jpeg2k lcms libcaca libsamplerate lzma lzo maildir mbox mikmod modplug mp3 ncurses neon nls nntp nptl offensive ogg openal opengl openmp oss pam pcre pdf perl png policykit postproc postscript pulseaudio python raw readline samba sdl slang sndfile sound speex spell sqlite ssl subversion suid svg symlink tcpd theora threads tiff truetype udev unicode usb v4l vim-syntax vorbis wavpack webp wmf x264 xattr xcb xface xft xml xmp xpm xvid zeroconf zlib zsh-completion" CPU_FLAGS_ARM="neon edsp thumb thumb2 v4 v5 v6 v7 vfp" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LINGUAS="de de_DE" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_6" USERLAND="GNU" VIDEO_CARDS="fbdev vc4"
USE_PYTHON="2.7 3.6"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 2 Conrad Kostecki gentoo-dev 2017-06-22 19:38:21 UTC
Created attachment 477636 [details, diff]
03_fix-unsigned-char.patch
Comment 3 Jonas Stein gentoo-dev 2017-06-22 20:17:19 UTC
Upstream should fix this (too). Please report upstream and add a link to the ticket here. Thank you.
Comment 4 Conrad Kostecki gentoo-dev 2017-06-22 21:04:12 UTC
(In reply to Jonas Stein from comment #3)
> Upstream should fix this (too). Please report upstream and add a link to the
> ticket here. Thank you.

Reported to upstream:
https://sourceforge.net/p/ufraw/bugs/417/

Btw, Fedora also applied this patch:
https://src.fedoraproject.org/cgit/rpms/ufraw.git/tree/05_fix_build_due_to_unsigned_char.patch

Conrad
Comment 5 Alexis Ballier gentoo-dev 2017-07-19 11:49:37 UTC
applied, thanks