Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388073 - media-gfx/iscan scan area selection selection problem with >=gcc-4.5
Summary: media-gfx/iscan scan area selection selection problem with >=gcc-4.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Schultz
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2011-10-22 03:06 UTC by Jared B.
Modified: 2015-07-15 19:20 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,85.96 KB, text/plain)
2012-07-15 15:21 UTC, Matthew Schultz
Details
environment (environment,119.92 KB, text/plain)
2012-07-15 15:22 UTC, Matthew Schultz
Details
build_no_strict_aliasing.log (build.log,90.77 KB, text/plain)
2012-08-26 02:58 UTC, Matthew Schultz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared B. 2011-10-22 03:06:32 UTC
After performing a preview scan, you're allowed to select the region of the preview image that you want to fully scan.  After selecting the appropriate region and releasing the mouse button, the selection box literally shifts about a centimeter right and down.  This happens every time, making it impossible to any kind of precise region selection.

I first noticed this after a recent system rebuild, and it turns out it's related to GCC 4.5.  Well, any version >= GCC 4.5.x.  I reinstalled GCC 4.4.5 just to test this theory and rebuilt iscan, and it works perfectly.  However, if I build it with GCC 4.5.3 or 4.6.1 iscan exhibits the behavior I described above.

This happens with all versions of iscan that I've tested, including the current Gentoo stable, 2.26.2, as well as a newer version available from upstream, 2.27.1.  This seems to be a known issue, as the following was included in the 2.27.1:
 * fixes scan area selection issues in the GUI

However, it still behaves the same (broken) way on my system with newer versions of GCC.

I honestly don't even know where to begin troubleshooting something like this, so I'm hoping someone here with a clue about this kind of stuff can help out.

Reproducible: Always
Comment 1 Matthew Schultz 2011-11-06 00:42:35 UTC
I have the same problem here.
Comment 2 Yu Yuwei 2011-11-13 15:11:31 UTC
I encounter this problem even with the 2.28.0-2.

Luckly, I found that it is the CFLAGS="-O2" cause the problem here. After I set CFLAGS="-O1", the annoying problem is gone :)
Comment 3 Jared B. 2011-11-14 00:58:20 UTC
Setting -O1 in CFLAGS fixes it for me as well.  Great find, Yu!  Now I can finally take GCC 4.4 of my system.  :-)
Comment 4 Matthew Schultz 2011-11-14 15:56:56 UTC
See bug 390419 for an updated ebuild patch and libpng patch for your portage overlay without having to modify your CFLAGS manually.
Comment 5 Matthew Schultz 2012-07-05 16:29:47 UTC
FYI, I've uploaded a new ebuild patch for the version bump Diego made since it does not compile and still exhibits this bug.  Grab the patches at bug 390419 and patch the ebuild and add the libpng patch to the files dir.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-07-05 16:38:38 UTC
Toolchain do you want to chip in here?

Jared, Matt, neither of you provided an `emerge --info` — and this is a compilation problem since you report it works with -O1, so that _is_ important. Tremendously so.

We're not going to hide the problem moving from -O* to -O1, instead we should find what is going on. It might be a strict aliasing bug of course, so let's start with some emerge --info.
Comment 7 Matthew Schultz 2012-07-05 17:34:01 UTC
I did not have a problem related to -O1/-O2.  This patch from bug 390419 fixed the problem for me: https://bugs.gentoo.org/attachment.cgi?id=317314

I run an amd64 and x86 environment.  I have tested it and it happens on both arches:

x86:

emerge --info
Portage 2.1.10.65 (default/linux/x86/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.4.4-gentoo i686)
=================================================================
System uname: Linux-3.4.4-gentoo-i686-AMD_Opteron-tm-_Processor_144-with-gentoo-2.1
Timestamp of tree: Fri, 29 Jun 2012 03:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2                                                                                                                                                                                 
sys-devel/gcc-config:     1.6                                                                                                                                                                                      
sys-devel/libtool:        2.4-r1                                                                                                                                                                                   
sys-devel/make:           3.82-r1                                                                                                                                                                                  
sys-kernel/linux-headers: 3.1 (virtual/os-headers)                                                                                                                                                                 
sys-libs/glibc:           2.14.1-r3                                                                                                                                                                                
Repositories: gentoo sunrise x-portage mythtv                                                                                                                                                                      
ACCEPT_KEYWORDS="x86"                                                                                                                                                                                              
ACCEPT_LICENSE="*"                                                                                                                                                                                                 
CBUILD="i686-pc-linux-gnu"                                                                                                                                                                                         
CFLAGS="-march=opteron -O2 -pipe -fomit-frame-pointer"                                                                                                                                                             
CHOST="i686-pc-linux-gnu"                                                                                                                                                                                          
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"                                                                                                                                             
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=opteron -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://portage.home http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.phy.olemiss.edu/mirror/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/sunrise /usr/local/portage /usr/local/mythtv_portage/Gentoo"
SYNC="rsync://server.home/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi adns alsa apache2 audiofile avi bcmath bdf berkdb bluetooth bzip2 cairo calendar caps cdda cdr chardet cjk clamav cli consolekit cracklib crypt css ctype cups curl curlwrappers cxx dbus declarative device-mapper dga directfb dri dts dvb dvd dvdread enca encode exif fbcon ffmpeg flac foomaticdb fortran ftp fts3 gd gdbm gif gmp gnutls gpm gsm gtk gtk2 gzip hal hash hbci iconv ieee1394 imagemagick imap imlib innodb ipv6 java java6 javascript jpeg jpeg2k json kde kipi lcms libcaca libnotify lm_sensors logrotate lzma lzo mad matroska mcal mhash mime mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer msession mudflap mysql mysqli mythtv ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ofx ogg openal opengl openmp osc oss pam pcntl pcre pdf pdo pear perl pgo php png policykit posix ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl semantic-desktop session simplexml soap sockets spell spl sql sqlite sse sse2 ssl subversion suhosin svg syslog tcpd theora thumbnail tidy tiff tokenizer transcode truetype udev unicode usb utempter v4l v4l2 vaapi vcd vorbis vpx wddx webkit win32codecs wxwindows x264 x86 xcb xcomposite xforms xine xinerama xml xorg xpm xsl xv xvfb xvid xvmc zip zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" 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 ru" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau nv vesa fbdev v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON



AMD64:

emerge --info
Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.3.5-gentoo x86_64)
=================================================================
System uname: Linux-3.3.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-2540M_CPU_@_2.60GHz-with-gentoo-2.1
Timestamp of tree: Fri, 29 Jun 2012 03:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo sunrise mythtv x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://portage.home http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.phy.olemiss.edu/mirror/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/sunrise /usr/local/mythtv_portage/Gentoo /usr/local/portage"
SYNC="rsync://server.home/gentoo-portage"
USE="X a52 aac acl acpi adns alsa amd64 apache2 audiofile avi bcmath bdf berkdb bluetooth bzip2 cairo calendar caps cdda cdr chardet cjk clamav cli consolekit cracklib crypt css ctype cups curl curlwrappers cxx dbus declarative device-mapper dga directfb dri dts dvb dvd dvdread emu-linux-x86 enca encode exif fbcon ffmpeg flac fontconfig foomaticdb fortran ftp fts3 gd gdbm gif gmp gnutls gpm gsm gtk gtk2 gzip hash hbci iconv idn ieee1394 imagemagick imap imlib innodb ipv6 ithreads java java6 javascript jpeg jpeg2k json kde kipi lcms libcaca libnotify lirc lm_sensors logrotate lzma lzo mad matroska mbox mcal mhash mime mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer msession mudflap multilib mysql mysqli mysqlnd mythtv ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ofx ogg openal opengl openmp osc oss pam pcntl pcre pdf pdo pear perl pgo php png policykit posix ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey semantic-desktop session simplexml smp snmp soap sockets spell spl sql sqlite sse sse2 ssl ssse3 subversion suhosin svg syslog sysvipc tcpd theora threads thumbnail tidy tiff tokenizer transcode truetype udev udisks unicode usb utempter v4l v4l2 vcd vdpau vorbis vpx wddx webkit wifi wxwindows x264 xcb xcomposite xforms xine xinerama xml xorg xpm xsl xv xvfb xvid xvmc zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" PHP_TARGETS="php5-2 php5-3 php5-4" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia intel nv vesa fbdev v4l qxl virtualbox" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 8 Matthew Schultz 2012-07-05 17:35:26 UTC
(In reply to comment #7)
> I did not have a problem related to -O1/-O2.  This patch from bug 390419
> fixed the problem for me: https://bugs.gentoo.org/attachment.cgi?id=317314

Note, I am referring to the replace-flags portion of that patch, not the libpng problem which you already fixed on July 1.
Comment 9 Matthew Schultz 2012-07-05 17:43:21 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I did not have a problem related to -O1/-O2.  This patch from bug 390419
> > fixed the problem for me: https://bugs.gentoo.org/attachment.cgi?id=317314
> 
> Note, I am referring to the replace-flags portion of that patch, not the
> libpng problem which you already fixed on July 1.

Sorry I wasn't paying attention to what the patch was doing.  I agree that changing the flag to -O1 is not the solution but in the interim until a patch can be made, at least it makes iscan useable.
Comment 10 Jared B. 2012-07-05 17:47:42 UTC
Guys, thanks for the new info.  I haven't had much need for my scanner lately, so I haven't really been keeping up with the iscan stuff.  I'll check out the mentioned patch as soon as I get the chance and provide feedback.

Diego - apologies for the lack of emerge --info.  I should have some time tonight to do this.  Let me do a bit of testing with the latest versions to see how things currently work, and I'll report back with the results and the emerge--info output.
Comment 11 Jared B. 2012-07-06 07:58:32 UTC
OK, so just to confirm, the problem still exists for me.  With both stable 2.26 and unstable 2.28, when I compile with -02, the selection box 'jumps' as described in the original post, and if I compile with -O1 it works as expected.

Here's my emerge --info.  Please let me know if I can do/provide anything else.

Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.3.8-gentoo x86_64)
=================================================================
System uname: Linux-3.3.8-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Fri, 06 Jul 2012 06:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.3 DOOM3 Introversion LOKI-EULA Oracle-BCLA-JavaSE postal2 PUEL Q3AEULA QUAKE4 RTCW RTCW-ETEULA ut2003"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/jbreland/data/files/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_COMPRESS_FLAGS="-7"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/jbreland/data/dev/portage"
SYNC="rsync://209.221.142.124/gentoo-portage"
USE="X a52 aac acl alsa amd64 ao bash-completion bzip2 cairo cdda cddb cli cracklib crypt cxx dbus dga dri dts dvd exif fam flac gdbm gif gmp handbook iconv icu jpeg jpeg2k kde lcms libnotify libsamplerate lzma lzo mad matroska mmap mmx modules mp3 mudflap multilib nls nptl ogg openal openexr opengl openmp pam pch pcntl pcre png pppd qt4 readline session smp sndfile spell sse sse2 ssl startup-notification svg syslog taglib tcpd theora threads tiff truetype unicode vim-syntax vorbis x264 xcb xcomposite xinerama xmp xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" CAMERAS="canon" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2012-07-15 05:26:12 UTC
I don't think there's anything for toolchain to do here.  It's highly likely the bug is in the package.  Try -fno-strict-aliasing and/or look at the warnings the compiler generates.  Post your build log as well.
Comment 13 Matthew Schultz 2012-07-15 15:21:55 UTC
Created attachment 318234 [details]
build.log

build.log from earlier posted emerge --info x86 environment.
Comment 14 Matthew Schultz 2012-07-15 15:22:20 UTC
Created attachment 318236 [details]
environment

environment from earlier posted emerge --info x86 environment.
Comment 15 Matthew Schultz 2012-08-26 02:58:08 UTC
Created attachment 322212 [details]
build_no_strict_aliasing.log

This is the build.log with -fno-strict-aliasing enabled.  The buggy behavior remains with this option enabled.
Comment 16 Matthew Schultz 2013-03-18 20:04:23 UTC
(In reply to comment #15)
> Created attachment 322212 [details]
> build_no_strict_aliasing.log
> 
> This is the build.log with -fno-strict-aliasing enabled.  The buggy behavior
> remains with this option enabled.

(In reply to comment #12)
> I don't think there's anything for toolchain to do here.  It's highly likely
> the bug is in the package.  Try -fno-strict-aliasing and/or look at the
> warnings the compiler generates.  Post your build log as well.

Did you find anything in the build.log about this problem?  I still think it would be better at least to patch iscan so users can actually select a box area in the interim otherwise we have to keep maintaining this package in our local repo making the portage one rather useless.
Comment 17 Jared B. 2013-03-18 20:15:40 UTC
I added this a while back:

$ cat /etc/portage/env/iscan.conf 
CFLAGS="-march=native -O1 -pipe"
CXXFLAGS="${CFLAGS}"

$ cat /etc/portage/package.env/misc
# Fix iscan preview issue with GCC >= 4.5
media-gfx/iscan iscan.conf

It "fixes" the issue, so it hasn't really bothered me lately, but I agree that this should really be properly fixed in the ebuild one way or another so that this works for everyone.

Diego, until we're able to track down the root of this problem, would adding something like the following (from the patch Matthew provided) to the iscan ebuild be an acceptable workaround?

replace-flags "-O[0-9s]" "-O1"
Comment 18 Adam Feldman gentoo-dev 2015-07-15 19:20:13 UTC
Resolved in the version bump, 498524, with the replace-flags.  Preferably temporarily, until upstream, or we find a patch to fix their optimization bug.