Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600188 - media-libs/devil-1.7.8-r2: 'uchar' undeclared (first use in this function)
Summary: media-libs/devil-1.7.8-r2: 'uchar' undeclared (first use in this function)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 19:32 UTC by Conrad Kostecki
Modified: 2016-12-10 13:53 UTC (History)
2 users (show)

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


Attachments
Change uchar to uint8_t (devil-1.7.8-uchar.patch,540 bytes, patch)
2016-11-19 05:18 UTC, Chris White
Details | Diff
Change uchar to jas_uchar (uchar.patch,739 bytes, patch)
2016-11-20 19:14 UTC, Chris White
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2016-11-18 19:32:31 UTC
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -pthread -I/usr/include/OpenEXR  -march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -c -o libIL_la-il_iff.lo `test -f './../src-IL/src/il_iff.c' || echo './'`./../src-IL/src/il_iff.c
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -pthread -I/usr/include/OpenEXR -march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden -c ./../src-IL/src/il_nvidia.cpp  -fPIC -DPIC -o .libs/libIL_la-il_nvidia.o
In file included from /usr/include/jasper/jasper.h:68:0,
                 from ./../src-IL/src/il_jp2.c:16:
./../src-IL/src/il_jp2.c: In function 'jas_stream_initbuf':
./../src-IL/src/il_jp2.c:462:32: error: 'uchar' undeclared (first use in this function)
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                                ^
./../src-IL/src/il_jp2.c:462:32: note: each undeclared identifier is reported only once for each function it appears in
./../src-IL/src/il_jp2.c:462:23: error: expected expression before ')' token
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                       ^
make[1]: *** [Makefile:1180: libIL_la-il_jp2.lo] Error 1
Comment 1 Conrad Kostecki gentoo-dev 2016-11-18 19:32:54 UTC
Portage 2.3.2 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r3, 4.8.7-gentoo x86_64)
=================================================================
System uname: Linux-4.8.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.3
KiB Swap:   17301500 total,  17301500 free
Timestamp of repository gentoo: Fri, 18 Nov 2016 15:45:01 +0000
sh bash 4.4_p5
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.3 [enabled]
app-shells/bash:          4.4_p5::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/ccache:          3.3.3::gentoo
dev-util/cmake:           3.7.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-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

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

steam-overlay
    location: /usr/local/portage/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
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"
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 a52 aac aalib accessibility acl acpi adns alsa amd64 ao berkdb bluetooth bzip2 cairo caps cdda cddb cdinstall cjk cracklib crypt css ctype cups curl cvs cxx dbus dga djvu dri dts dvb dvd encode exif fbcon ffmpeg flac flite fontconfig ftp gd gdbm gif gimp git glut gmp gnome-keyring gnutls gphoto2 gpm gps graphviz gsm gstreamer gtk http iconv icu idn imlib introspection ipv6 java javascript jit joystick jpeg jpeg2k lame lcms libcaca libnotify libsamplerate lm_sensors lzma lzo mad maildir matroska mbox mhash mikmod mmap mng modplug mono mp3 mpeg mtp ncurses networkmanager nls nntp nptl nsplugin offensive ogg openal opencl openexr opengl openmp orc oss pam pcre pdf perl pie png policykit posix postproc postscript pulseaudio python qt4 qt5 quicktime raw readline recode samba sasl scanner sdl seccomp session simplexml slang smartcard smp sndfile sockets sound speex spell sqlite ssl startup-notification subversion suid svg symlink tcpd theora threads tiff timidity truetype udev udisks unicode upnp usb v4l vaapi vcd vdpau vim-syntax vnc vorbis wavpack webkit wifi wmf x264 xattr xcb xcomposite xface xft xml xmp xpm xscreensaver xv xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="battery cgroups conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec filecount hddtemp interface ipc irq load lvm memory netlink nfs nginx openvpn ping postgresql processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal unixsock uptime users wireless" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi geo geoip gunzip gzip proxy realip rewrite stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip realip ssl_preread" PHP_TARGETS="php7-0" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="intel" XFCE_PLUGINS="power trash"
USE_PYTHON="2.7 3.4 3.5"
Unset:  CC, CPPFLAGS, CTARGET, CXX
Comment 2 Chris White 2016-11-19 05:18:40 UTC
Created attachment 453756 [details, diff]
Change uchar to uint8_t

I'm having a hard time getting an environment to reproduce your build error but uchar isn't great standards wise. I'm attaching a patch that changes uchar to a more standard uint8_t and confirmed it compiles with the gcc version you mentioned.
Comment 3 Conrad Kostecki gentoo-dev 2016-11-19 10:38:59 UTC
(In reply to Chris White from comment #2)
> Created attachment 453756 [details, diff] [details, diff]
> Change uchar to uint8_t
> 
> I'm having a hard time getting an environment to reproduce your build error
> but uchar isn't great standards wise. I'm attaching a patch that changes
> uchar to a more standard uint8_t and confirmed it compiles with the gcc
> version you mentioned.

Hey Chris!
Thanks for you patch. It did work. I was able to compile devil.

Cheers
Conrad
Comment 4 Peter Asplund 2016-11-19 20:51:12 UTC
I can add a bit more to this log... It might be caused by the compiler using C++-standard instead of C, and that the build flags doesn't match this.

I cut out some parts that was just repetitions and replaced them with [...].

[...]
make -j4 
Making all in lib
make[1]: Entering directory '/var/tmp/portage/media-libs/devil-1.7.8-r2/work/devil-1.7.8/lib'
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3  -march=native -O3 -pipe -c -o libIL_la-il_alloc.lo `test -f './../src-IL/src/il_alloc.c' || echo './'`./../src-IL/src/il_alloc.c
[...]
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3  -march=native -O3 -pipe -c -o libIL_la-il_bits.lo `test -f './../src-IL/src/il_bits.c' || echo './'`./../src-IL/src/il_bits.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_rle.c  -fPIC -DPIC -o .libs/libIL_la-il_rle.o
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3  -march=native -O3 -pipe -c -o libIL_la-il_endian.lo `test -f './../src-IL/src/il_endian.c' || echo './'`./../src-IL/src/il_endian.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_bits.c  -fPIC -DPIC -o .libs/libIL_la-il_bits.o
./../src-IL/src/il_rle.c: In function ‘ilRleCompressLine’:
./../src-IL/src/il_rle.c:20:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  const ILint bmp_pad_to_even = 1 - ((ILint)q - *DestWidth) % 2;
                                     ^
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_endian.c  -fPIC -DPIC -o .libs/libIL_la-il_endian.o
[...]
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_exr.cpp  -fPIC -DPIC -o .libs/libIL_la-il_exr.o
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-fgnu89-inline’ is valid for C/ObjC but not for C++
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3  -march=native -O3 -pipe -c -o libIL_la-il_sgi.lo `test -f './../src-IL/src/il_sgi.c' || echo './'`./../src-IL/src/il_sgi.c
[...]
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_rawdata.c  -fPIC -DPIC -o .libs/libIL_la-il_rawdata.o
./../src-IL/src/il_pal.c: In function ‘ilLoadPal’:
./../src-IL/src/il_pal.c:53:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
  fread(Head, 1, 8, f);
  ^
./../src-IL/src/il_pal.c: In function ‘ilLoadColPal’:
./../src-IL/src/il_pal.c:400:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&FileSize, 4, 1, (FILE*)ColFile);
   ^
/bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL  -I ./../src-IL/include -I ./../include  -std=gnu99 -fgnu89-inline -msse -msse2 -msse3  -march=native -O3 -pipe -c -o libIL_la-il_devil.lo `test -f './../src-IL/src/il_devil.c' || echo './'`./../src-IL/src/il_devil.c
[...]
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/altivec_typeconversion.c  -fPIC -DPIC -o .libs/libIL_la-altivec_typeconversion.o
In file included from /usr/include/jasper/jasper.h:68:0,
                 from ./../src-IL/src/il_jp2.c:16:
./../src-IL/src/il_jp2.c: In function ‘jas_stream_initbuf’:
./../src-IL/src/il_jp2.c:462:32: error: ‘uchar’ undeclared (first use in this function)
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                                ^
./../src-IL/src/il_jp2.c:462:32: note: each undeclared identifier is reported only once for each function it appears in
./../src-IL/src/il_jp2.c:462:23: error: expected expression before ‘)’ token
    stream->bufbase_ = JAS_CAST(uchar *, buf);
                       ^
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_sun.c  -fPIC -DPIC -o .libs/libIL_la-il_sun.o
make[1]: *** [Makefile:1180: libIL_la-il_jp2.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -std=gnu99 -fgnu89-inline -msse -msse2 -msse3 -march=native -O3 -pipe -c ./../src-IL/src/il_nvidia.cpp  -fPIC -DPIC -o .libs/libIL_la-il_nvidia.o
cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-fgnu89-inline’ is valid for C/ObjC but not for C++
make[1]: Leaving directory '/var/tmp/portage/media-libs/devil-1.7.8-r2/work/devil-1.7.8/lib'
make: *** [Makefile:462: all-recursive] Error 1
 * ERROR: media-libs/devil-1.7.8-r2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/devil-1.7.8-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/devil-1.7.8-r2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-libs/devil-1.7.8-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/devil-1.7.8-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/devil-1.7.8-r2/work/devil-1.7.8'
 * S: '/var/tmp/portage/media-libs/devil-1.7.8-r2/work/devil-1.7.8'


You see the warnings regarding:

cc1plus: warning: command line option ‘-std=gnu99’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-fgnu89-inline’ is valid for C/ObjC but not for C++

Environment:

root@skare$ emerge --info '=media-libs/devil-1.7.8-r2::gentoo'
Portage 2.3.2 (python 3.5.2-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r3, 4.8.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.8.4-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.3
KiB Mem:    12303400 total,   3060416 free
KiB Swap:   12418208 total,  12416668 free
Timestamp of repository gentoo: Fri, 18 Nov 2016 18:30:01 +0000
sh bash 4.4_p5
ld GNU ld (Gentoo 2.27 p1.0) 2.27
ccache version 3.3.3 [disabled]
app-shells/bash:          4.4_p5::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/ccache:          3.3.3::gentoo
dev-util/cmake:           3.7.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

FireBurn
    location: /var/lib/layman/FireBurn
    sync-type: laymansync
    sync-uri: git://github.com/FireBurn/Overlay.git
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/java.git
    masters: gentoo
    priority: 50

pg_overlay
    location: /var/lib/layman/pg_overlay
    sync-type: laymansync
    sync-uri: https://github.com/perfect7gentleman/pg_overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sunrise-reviewed.git
    masters: gentoo
    priority: 50

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 9999

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --with-bdeps=y --load-average=50 --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.uoi.gr/mirror/OS/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="24bpp 256-color 3dnow 3dnowext 64bit S3TC X a52 aac aacplus aalib accessibility acl acpi aio alsa amazon amd64 amr amrnb amrwb apng asf aspell autoipd avahi avi bash-completion bidi binary-drivers bluetooth bookmarks branding btrfs bzip2 c++0x cairo ccache cdda cdr cg cgi clang cleartype cleartype_hinting cli clutter cmake colord cover coverart cracklib crypt css cue cups curl custom-optimization cxx daap dbus dconf debugger device-mapper devil dga dhclient dirac divx dmx dns dri dri3 drm dts dvd dvdr dvdread egl eglfs emboss encode evo exif f2fs fakevim fam fastcgi fat fbcon ffmpeg firefox flac fluidsynth fontconfig fortran fpm freeimage freerdp ftp fuse g3dvl gaim gbm gd gdbm gdu gflags ggi gif gimp git glamor glew glib glut gmail gmailtimestamps gmedia gnome gnome-keyring gnome-online-accounts gnome-shell gold google gpm gstreamer gtk gtk2 gtk3 gtkhtml gvim gzip h224 h281 h323 howl-compat hpijs hwdb iconv icq icu idn imap inotify introspection iphone ipv6 jabber java java6 jingle jpeg jpeg2k kde kdrive lame lcms ldap libnotify libsecret libsexy libssh2 libv4l libv4l2 llvm llvm-shared-libs lm_sensors mad madwifi mbox md5sum mdnsresponder-compat mh midi mikmod mime minizip mmx mmxext mng moc mod modplug modules mozembed mozilla moznocompose moznoirc moznomail moznoroaming mozsha1 mozsvg mp2 mp3 mp4 mp4live mpeg msn multimedia musepack musicbrainz nas nautilus ncurses nemesi networkmanager new-hpcups nfsv41 nls nptl nsplugin ntfs ntfsprogs nx ofa ogg openal opencl opencore-amr opengl openmp openssl opensslcrypt optimization pam pango pcntl pcre pdf pdflib perl php pidgin pipechan png pnm policykit pop ppds private-headers pulseaudio pvr python python3 qml qt3support qt4 qt5 qtscript quicktime radio raw rdesktop rdp readline realmedia reiser4 reiserfs rtc s3tc samba sasl schroedinger scintilla sdl seccomp secure-delete session sid sip sndfile sockets spell sql sqlite srt sse sse2 sse3 sse4 sse4.1 sse4.2 sse4_1 sse4_2 ssh ssl ssse3 staging startup-notification static-analyzer steamruntime subtitles subversion suid svg systemd tcpd telepathy teletext tga theora threads tiff tls tracker transcode truetype udev udisks unicode upcall upnp upower usb v4l v4l2 vaapi valgrind vdpau video videos vim vim-pager vim-syntax vim-with-x vorbis vte vulkan wav wavpack wayland webdav webdav-neon webdav-serf webkit webkit2 webm webp webphoto webstart wifi winbind wma wma-fixed wmf wmp wxwidgets x264 x265 xanim xattr xcb xcomposite xdmcp xext xfs xinerama xkb xml xrandr xv xvid xvmc zeitgeist zeroconf zip zlib zoran" ABI_X86="64" ALSA_CARDS="emu10k1 hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev roccat_konextd" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en sv" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="i386 arm x86_64" QEMU_USER_TARGETS="i386 arm x86_64" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.5"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

media-libs/devil-1.7.8-r2::gentoo was built with the following:
USE="X gif glut jpeg jpeg2k mng opengl png sdl tiff -allegro -nvtt -openexr -static-libs -xpm" ABI_X86="64" CPU_FLAGS_X86="sse sse2 sse3"
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"
Comment 5 Chris White 2016-11-20 19:14:27 UTC
Created attachment 453928 [details, diff]
Change uchar to jas_uchar

Based on IRC chat switched to using jasper types instead
Comment 6 Peter Asplund 2016-12-03 12:42:13 UTC
This is the fixing commit on their GitHub. Seems to be in line with the attached patch, but removes more code.
https://github.com/DentonW/DevIL/commit/8b5e3cb38f46afd063a5258af0da1eb6a942dec5
Comment 7 David Seifert gentoo-dev 2016-12-06 22:03:49 UTC
@Conrad, @Chris, @Peter
I've ported the ebuild to EAPI 6, which gives you eapply_user. The git patch works for me, provided you remove one directory level from the paths. If you test it with the oldest (1.900.6) and newest (2.0.0) jasper and it works with both, I'll add it to the tree, deal?

commit 9f4a47a732c6042380d133ec1825d6187666bcf6
Author: David Seifert <soap@gentoo.org>
Date:   Tue Dec 6 22:57:38 2016 +0100

    media-libs/devil: Port to EAPI 6
    
    Gentoo-bug: 600188
    * Make PATCHES -p1 compliant
    * Delete .la files unconditionally
Comment 8 Chris White 2016-12-06 23:25:10 UTC
Just tested the git patch and with it applied devil compiles against both 1.900.6 and 2.0.0 jasper so fire away.
Comment 9 David Seifert gentoo-dev 2016-12-06 23:48:26 UTC
commit d4ca5662e87e32fd71d326e225bc3ca65c6fdabf
Author: David Seifert <soap@gentoo.org>
Date:   Wed Dec 7 00:46:48 2016 +0100

    media-libs/devil: Remove use of 'uchar' from jasper
    
    Gentoo-bug: 600188
Comment 10 Conrad Kostecki gentoo-dev 2016-12-10 13:53:06 UTC
(In reply to Chris White from comment #8)
> Just tested the git patch and with it applied devil compiles against both
> 1.900.6 and 2.0.0 jasper so fire away.

Sorry for my late answer. Same here. It just compiled fine! :)
Thanks!