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

Bug 426988

Summary: app-text/goldendict-1.0.1 fails to compile with gcc-4.7
Product: Gentoo Linux Reporter: Sven Eden <sven.eden>
Component: [OLD] GCC PortingAssignee: Qt Bug Alias <qt>
Status: RESOLVED FIXED    
Severity: normal CC: nikoli, pva
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: Patch to add the missing inclusions of unistd.h

Description Sven Eden 2012-07-17 12:04:35 UTC
Created attachment 318440 [details]
Patch to add the missing inclusions of unistd.h

Two files miss an inclusion of unistd.h.

Symptom: compiler error saying that "getpid" is not defined in this scope.

Cure: Attached patch with which goldendict compiles fine using gcc-4.7.1 utilizing rather drastic CFLAGS:

CFLAGS="-march=native -pipe -ftree-vectorize -ggdb -O2 -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution"

I daresay it should compile file with more conservative CFLAGS. (Assuming CXXFLAGS==CFLAGS)

One note about the patch:

I can not apply the hunk to processwrapper.cc. patch always fails for me and I do not have any idea why. The patch is made using "diff -auw <original> <changed> >> <patchfile>" so it *should* work.
Comment 1 Michael Palimaka (kensington) gentoo-dev 2012-07-19 17:38:24 UTC
Thank-you for the report. The patch has been added in CVS, and forwarded upstream.

+  19 Jul 2012; Michael Palimaka <kensington@gentoo.org>
+  +files/goldendict-1.0.1-gcc-4.7.patch, goldendict-1.0.1.ebuild:
+  Fix build with GCC 4.7, wrt bug #426988. Thanks to Sven Eden
+  <yamakuzure@gmx.net>.