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

Bug 437742

Summary: 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
Product: Gentoo Linux Reporter: eroen <erikdenstore+gbugs>
Component: Current packagesAssignee: the_mgt <themgt>
Status: RESOLVED FIXED    
Severity: normal CC: chutzpah, tomka, volkmar
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: Modified ebuild
build.log showing failed build

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 https://bugs.gentoo.org/show_bug.cgi?id=413937 , 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
+
        eautoreconf
 }
Comment 4 Thomas Kahle (RETIRED) gentoo-dev 2012-10-09 18:05:59 UTC
Added patch from version 2 and epatch_user. Thanks.