Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 426988 - app-text/goldendict-1.0.1 fails to compile with gcc-4.7
Summary: app-text/goldendict-1.0.1 fails to compile with gcc-4.7
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
Depends on:
Blocks: gcc-4.7
  Show dependency tree
Reported: 2012-07-17 12:04 UTC by Sven Eden
Modified: 2012-07-19 17:38 UTC (History)
2 users (show)

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

Patch to add the missing inclusions of unistd.h (goldendict-1.0.1_add_unistd.patch,509 bytes, text/plain)
2012-07-17 12:04 UTC, Sven Eden

Note You need to log in before you can comment on or make changes to this bug.
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 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 <>
+  +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
+  <>.