Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437742 - app-text/tesseract-3.01 with sys-devel/gcc-4.7.2 - In static member function 'static void SVSync::StartProcess(const char*, const char*)': svutil.cpp:89:18: error: 'fork' was not declared in this scope
Summary: app-text/tesseract-3.01 with sys-devel/gcc-4.7.2 - In static member function ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: the_mgt
Keywords: PATCH
Depends on:
Blocks: gcc-4.7
  Show dependency tree
Reported: 2012-10-09 17:20 UTC by eroen
Modified: 2012-10-09 18:05 UTC (History)
3 users (show)

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

Modified ebuild (tesseract-3.01.ebuild,3.93 KB, text/plain)
2012-10-09 17:27 UTC, eroen
build.log showing failed build (build.log,29.56 KB, text/plain)
2012-10-09 17:30 UTC, eroen

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2012-10-09 17:20:13 UTC
The file `viewer/svutil.cpp` in the tarball fails to include the header `unistd.h`, but nonetheless uses functions defined therein. This causes a build failure on compilers that don't silently include the required header through any of the other headers that *are* included. gcc-4.7.2 shows this behaviour.

See , upstream has not fixed it since that release. 

The file in question has not changed much since the tesseract-2.04-r1 release, and the old patch still has correct offsets. I suggest just applying that.
Comment 1 eroen 2012-10-09 17:27:15 UTC
Created attachment 326104 [details]
Modified ebuild

The attached modified ebuild applies the old patch and adds user_patch statement.
Comment 2 eroen 2012-10-09 17:30:17 UTC
Created attachment 326106 [details]
build.log showing failed build
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-09 17:45:49 UTC
Comment on attachment 326104 [details]
Modified ebuild

--- tesseract-3.01.ebuild       2012-10-09 06:13:10.000000000 +0200
+++ -   2012-10-09 19:45:41.765032512 +0200
@@ -73,6 +73,9 @@
        # remove obsolete makefile, install target only in uppercase Makefile
        rm "${S}/java/makefile" || die "remove obsolete java makefile failed"
+       epatch "${FILESDIR}/tesseract-2.04-gcc47.patch"
+       epatch_user
Comment 4 Thomas Kahle (RETIRED) gentoo-dev 2012-10-09 18:05:59 UTC
Added patch from version 2 and epatch_user. Thanks.