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

Bug 481688

Summary: net-libs/webkit-gtk-2.0.4 with media-libs/jpeg-9-r1 - Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:345:47: error: cannot convert 'bool' to 'boolean' for argument '2' to 'int jpeg_read_header(j_decompress_ptr, boolean)'
Product: Gentoo Linux Reporter: Markus Goppelt <markus.goppelt>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: devurandom, dirk, griffon26, levertond, slyfox, ssuominen
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://trac.webkit.org/changeset/166490/trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 479818    
Attachments: build.zip
Fix use of different boolean types in JPEGImageDecoder (webkit-gtk-2.0.4)
Fixes mixed use of booleans in JPEGImageDecoder (webkit-gtk-1.8.3)

Description Markus Goppelt 2013-08-19 20:42:36 UTC
net-libs/webkit-gtk-2.0.4::gentoo failed (compile phase)

emerge -pv webkit-gtk

[ebuild     U  ] net-libs/webkit-gtk-2.0.4:3/25 [1.10.2-r300:3/3] USE="geoloc gstreamer introspection jit libsecret%* spell webgl (-aqua) -coverage -debug {-test}" 0 kB

emerge --info

Portage 2.2.0 (default/linux/amd64/13.0/desktop/gnome, gcc-4.7.3, glibc-2.17, 3.10.7-gentoo x86_64)
=================================================================
System uname: Linux-3.10.7-gentoo-x86_64-AMD_Phenom-tm-_II_X4_910e_Processor-with-gentoo-2.2
KiB Mem:     8134028 total,   6069136 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of tree: Mon, 19 Aug 2013 18:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r2, 3.2.5-r2, 3.3.2-r2
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.10 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n"
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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gcj gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 java jpeg lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio python qt3support readline sdl session socialweb spell sse sse2 ssl svg systemd tcpd theora tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="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" 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 ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx" 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"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Relevant part from build.log:

Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp: In member function 'bool WebCore::JPEGImageReader::decode(const WebCore::SharedBuffer&, bool)':
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:345:47: error: cannot convert 'bool' to 'boolean' for argument '2' to 'int jpeg_read_header(j_decompress_ptr, boolean)'
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:431:60: error: cannot convert 'bool' to 'boolean' in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:432:41: error: cannot convert 'bool' to 'boolean' in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:433:41: error: cannot convert 'bool' to 'boolean' in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp: In function 'boolean WebCore::fill_input_buffer(j_decompress_ptr)':
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:584:12: error: cannot convert 'bool' to 'boolean' in return

Attachment: Had to zip build.log because of its size.
Comment 1 Markus Goppelt 2013-08-19 20:44:02 UTC
Created attachment 356442 [details]
build.zip
Comment 2 Pacho Ramos gentoo-dev 2013-08-20 17:03:22 UTC
Are you using jpeg or jpeg-turbo? What versions?
Comment 3 Markus Goppelt 2013-08-21 19:38:41 UTC
It (webkit-gtk) emerges with jpeg-turbo.

jpeg version 9-r1

jpeg-turbo 1.3.0-r2
Comment 4 Dirk Gouders 2013-09-16 14:29:54 UTC
webkit-gtk-1.10.2-r300 fails with a similar error:

Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp: In member function ‘bool WebCore::JPEGImageReader::decode(const WebCore::SharedBuffer&, bool)’:
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:263:47: error: cannot convert ‘bool’ to ‘boolean’ for argument ‘2’ to ‘int jpeg_read_header(j_decompress_ptr, boolean)’
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:340:60: error: cannot convert ‘bool’ to ‘boolean’ in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:341:41: error: cannot convert ‘bool’ to ‘boolean’ in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:342:41: error: cannot convert ‘bool’ to ‘boolean’ in assignment
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp: In function ‘boolean WebCore::fill_input_buffer(j_decompress_ptr)’:
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:493:12: error: cannot convert ‘bool’ to ‘boolean’ in return

I use jpeg:

# equery list \* | grep jpeg
media-libs/jpeg-6b-r11
media-libs/jpeg-9-r1
virtual/jpeg-0-r2
virtual/jpeg-62
Comment 5 Maurice van der Pot 2013-10-06 15:12:14 UTC
Created attachment 360240 [details, diff]
Fix use of different boolean types in JPEGImageDecoder (webkit-gtk-2.0.4)

webkit-gtk is using both the bool built-in type and the boolean type defined by libjpeg. This is fine as long as you don't just pass a value of one where the other type is expected. The patch fixes this problem.

I've compile-tested this with webkit-gtk 2.0.4 and jpeg-9. I expect this to work also with older versions of libjpeg but some testing would be appreciated.
Comment 6 Maurice van der Pot 2013-10-06 15:17:36 UTC
I submitted the following bug report upstream for this issue:
https://bugs.webkit.org/show_bug.cgi?id=122412
Comment 7 Maurice van der Pot 2013-10-06 15:22:02 UTC
Created attachment 360242 [details, diff]
Fixes mixed use of booleans in JPEGImageDecoder (webkit-gtk-1.8.3)

1.8.3 suffers from the same problem, but the code was slightly different so I had to make a separate patch.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2013-10-12 05:06:17 UTC
Got the same breakage here as well. The fix is tiny and looks correct.
Comment 9 Maurice van der Pot 2014-04-07 16:54:28 UTC
Upstream bug closed, fix committed: http://trac.webkit.org/changeset/166490
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2014-08-21 11:19:22 UTC
upstream patch...

http://trac.webkit.org/changeset/166490/trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

...applied to both SLOTs, 2.4.4:3 and 2.4.4-r200:2