Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269320 - app-text/tesseract-2.04 build fails with gcc 4.4.0: 'snprintf' was not declared in this scope
Summary: app-text/tesseract-2.04 build fails with gcc 4.4.0: 'snprintf' was not declar...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick McLean
Depends on:
Blocks: gcc-4.4
  Show dependency tree
Reported: 2009-05-10 21:25 UTC by Jose daLuz
Modified: 2009-07-25 21:12 UTC (History)
2 users (show)

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

Output of paludis --info tesseract (tesseract_paludis_info.txt,24.03 KB, text/plain)
2009-05-10 21:26 UTC, Jose daLuz
Patch allowing appt-text/tesseract-2.03 to compile with gcc 4.4 (tesseract-2.03-gcc4.4.patch,420 bytes, patch)
2009-05-11 16:28 UTC, Víctor Ostorga (RETIRED)
Details | Diff
Patch respect to current app-text/tesseract-2.03 ebuild (tesseract-2.03-r1.ebuild.patch,499 bytes, patch)
2009-05-11 16:29 UTC, Víctor Ostorga (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jose daLuz 2009-05-10 21:25:24 UTC
After upgrading gcc from 4.3.3-r2 to 4.4.0, tesseract 2.03 no longer builds:

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c oldbasel.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c pithsync.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c pitsync1.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c scanedg.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c sortflts.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c topitch.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c tordmain.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c tospace.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c tovars.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c underlin.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..  -I../ccstruct -I../ccutil     -I../image -I../viewer     -I../pageseg   -march=native -O2 -pipe -ggdb -c wordseg.cpp
rm -f libtesseract_textord.a
ar cru libtesseract_textord.a blkocc.o drawedg.o drawtord.o edgblob.o edgloop.o fpchop.o gap_map.o makerow.o oldbasel.o pithsync.o pitsync1.o scanedg.o sortflts.o topitch.o tordmain.o tospace.o tovars.o underlin.o wordseg.o 
x86_64-pc-linux-gnu-ranlib libtesseract_textord.a
make[3]: Leaving directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/textord'
make[2]: Leaving directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/textord'
Making all in viewer
make[2]: Entering directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/viewer'
make[3]: Entering directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/viewer'
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..     -march=native -O2 -pipe -ggdb -c scrollview.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..     -march=native -O2 -pipe -ggdb -c svmnode.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I..     -march=native -O2 -pipe -ggdb -c svutil.cpp
svutil.cpp: In constructor 'SVNetwork::SVNetwork(const char*, int)':
svutil.cpp:314: error: 'snprintf' was not declared in this scope
make[3]: *** [svutil.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/viewer'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03/viewer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/paludis/app-text-tesseract-2.03/work/tesseract-2.03'
make: *** [all-recursive-am] Error 2
/usr/libexec/paludis/utils/emake: emake returned error 2

!!! ERROR in app-text/tesseract-2.03:

Portage 2.2_rc33 (default/linux/amd64/2008.0/desktop, gcc-4.4.0, glibc-2.9_p20081201-r2, x86_64)
System uname: Linux-
Timestamp of tree: Sat, 09 May 2009 13:15:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p17-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2, 2.6.2
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -O2 -pipe -ggdb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/overlays/zugaina /usr/local/overlays/THE /usr/local/overlays/sunrise /usr/local/overlays/gnome /usr/local/overlays/desktop-effects /usr/local/overlays/vmware /usr/local/overlays/ikelos /usr/local/overlays/java-overlay /usr/local/overlays/berkano /usr/local/overlays/gcc-porting /usr/local/overlays/myoverlay"
USE="X a52 aac acl acpi alsa amd64 amr avahi bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli cracklib crypt css cups dbus dri dts dvd dvdr dvdread eds emboss encode esd evo expat fam ffmpeg flac fortran gdbm gif gnome gnome-keyring gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg lcms ldap libnotify mad midi mikmod mmx mono mp3 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp paludis pam pcre pdf perl pic png policykit ppds pppd pulseaudio python quicktime readline reflection ruby samba sdl session spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd theora tiff tracker truetype unicode usb userlocales vcd vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="cmipci" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Comment 1 Jose daLuz 2009-05-10 21:26:45 UTC
Created attachment 190874 [details]
Output of paludis --info tesseract
Comment 2 Jose daLuz 2009-05-10 22:49:00 UTC
This is perhaps the same issue:
Comment 3 Jose daLuz 2009-05-10 22:56:44 UTC
And this one:

Possibly fixed with this:

That's in the same source file as this error, I don't know if it's the correct fix.
Comment 4 Víctor Ostorga (RETIRED) gentoo-dev 2009-05-11 16:28:30 UTC
Created attachment 190952 [details, diff]
Patch allowing appt-text/tesseract-2.03 to compile with gcc 4.4
Comment 5 Víctor Ostorga (RETIRED) gentoo-dev 2009-05-11 16:29:48 UTC
Created attachment 190954 [details, diff]
Patch respect to current app-text/tesseract-2.03 ebuild
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-05-11 16:59:50 UTC
+  11 May 2009; Samuli Suominen <> tesseract-2.03.ebuild,
+  +files/tesseract-2.03-gcc44.patch:
+  Fix compile with GCC 4.4 wrt #269320, thanks to Jose daLuz and Victor
+  Ostorga.
Comment 7 Jose daLuz 2009-07-20 00:45:48 UTC
Same issue with 2.04:

x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -ggdb -MT scrollview.o -MD -MP -MF .deps/scrollview.Tpo -c -o scrollview.o scrollview.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -ggdb -MT svmnode.o -MD -MP -MF .deps/svmnode.Tpo -c -o svmnode.o svmnode.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I..     -march=native -O2 -pipe -ggdb -MT svutil.o -MD -MP -MF .deps/svutil.Tpo -c -o svutil.o svutil.cpp
svutil.cpp: In constructor 'SVNetwork::SVNetwork(const char*, int)':
svutil.cpp:323: error: 'snprintf' was not declared in this scope
make[3]: *** [svutil.o] Error 1
Comment 8 Víctor Ostorga (RETIRED) gentoo-dev 2009-07-25 21:12:17 UTC
Fixed in portage.