Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234378 - app-text/ghostscript-gpl does not parallel-build (forces MAKEOPTS=-j1)
Summary: app-text/ghostscript-gpl does not parallel-build (forces MAKEOPTS=-j1)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
: 430946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-10 14:21 UTC by Mart Raudsepp
Modified: 2015-10-25 07:32 UTC (History)
2 users (show)

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


Attachments
Patch to add dependency so that ijs.$(OBJ) is not built until its prerequisite tools are available (ghostscript-gpl-8.64-ijs-dep.patch,487 bytes, patch)
2009-05-30 16:03 UTC, Kevin Pyle
Details | Diff
Patch to ebuild to apply attachment #192988 and adjust base/zlib.mak (ghostscript-gpl-8.64-r3.ebuild.patch,696 bytes, patch)
2009-05-30 16:15 UTC, Kevin Pyle
Details | Diff
ghostscript-gpl-8.70-parallel-build.patch (ghostscript-gpl-8.70-parallel-build.patch,6.93 KB, patch)
2009-08-04 22:31 UTC, Timo Gurr (RETIRED)
Details | Diff
Patch to fix djvu build failure (gsdjvu-parallell-buildfix.patch,376 bytes, patch)
2010-08-12 13:46 UTC, Xake
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2008-08-10 14:21:27 UTC
app-text/ghostscript-gpl calls emake -j1, forcing one process build, presumable because it fails or used to fail with parallel make. This is taking ages to compile, because my second CPU core is completely unused, as my MAKEOPTS=-j4 is not honored.

This is a bug for someone to look into it as a lower priority reminder and possibly make it work with parallel make.
Comment 1 Kevin Pyle 2009-05-30 16:03:30 UTC
Created attachment 192988 [details, diff]
Patch to add dependency so that ijs.$(OBJ) is not built until its prerequisite tools are available

This package has multiple issues with parallel make.  The first, which is easy to fix, is that ijs.$(OBJ) uses the program named by $(ECHOGS_XE), but does not depend on it, so make may try to run the program before it was built.  This patch adds a dependency to prevent that.  This patch can go upstream easily enough.

Additionally, the package needs four rules from base/zlib.mak to be present, but some of the other rules in base/zlib.mak cause a parallel make to react badly to the ebuild removing the bundled zlib directory.  I will attach a patch to the ebuild which cleans base/zlib.mak of all but the necessary rules.  I doubt upstream will take this, since it probably breaks building the bundled zlib.  I have not investigated why a non-parallel make succeeds with the full zlib.mak present.
Comment 2 Kevin Pyle 2009-05-30 16:15:04 UTC
Created attachment 192991 [details, diff]
Patch to ebuild to apply attachment #192988 [details, diff] and adjust base/zlib.mak

With this patch and the preceding one applied, I am able to build ghostscript with MAKEOPTS=-j10.  This patch does not address the parallel install issue documented in bug #251066.
Comment 3 Timo Gurr (RETIRED) gentoo-dev 2009-08-04 22:31:08 UTC
Hi Kevin and thanks for the patches, I considered the fix for the 8.70 bump but then realized that it doesn't build with USE="djvu". Attached is the patch I used.
Comment 4 Timo Gurr (RETIRED) gentoo-dev 2009-08-04 22:31:43 UTC
Created attachment 200207 [details, diff]
ghostscript-gpl-8.70-parallel-build.patch
Comment 5 Xake 2010-08-12 13:46:21 UTC
Created attachment 242573 [details, diff]
Patch to fix djvu build failure

This patch is against gsdjvu-1.4 for use with USE="djvu". It fixes parallell build failure. Please apply.

Sent upstream.
Comment 6 Xake 2010-08-12 14:25:49 UTC
After applying the patch from Timo Gurr and my patch to the ghostscript-gpl-8.71-r5 ebuild it succeded to build with the following USE-flags:

[ebuild   R   ] app-text/ghostscript-gpl-8.71-r5  USE="X cairo cups djvu gtk jpeg2k -bindist" LINGUAS="-ja -ko -zh_CN -zh_TW" 0 kB [1]


And PLEASE apply these patches, as genlop is my witness they do a difference!
For these outputs where the first and third is with old ebuild, and second and fourth is with patches running -j10 on a Core 7i, 4 cores and hyperthread:

     Sat Jul 31 18:25:47 2010 >>> app-text/ghostscript-gpl-8.71-r5
       merge time: 5 minutes and 8 seconds.

     Thu Aug 12 16:07:20 2010 >>> app-text/ghostscript-gpl-8.71-r5
       merge time: 1 minute and 52 seconds.

     Thu Aug 12 16:14:22 2010 >>> app-text/ghostscript-gpl-8.71-r5
       merge time: 4 minutes and 59 seconds.

     Thu Aug 12 16:16:13 2010 >>> app-text/ghostscript-gpl-8.71-r5
       merge time: 1 minute and 49 seconds.


Yes, that is true, the merge-time more then halved, I had to redo the merges only to confirm.
Comment 7 Xake 2010-08-18 16:29:37 UTC
(In reply to comment #5)
> Created an attachment (id=242573) [details]
> Patch to fix djvu build failure
> 
> This patch is against gsdjvu-1.4 for use with USE="djvu". It fixes parallell
> build failure. Please apply.
> 
> Sent upstream.
> 

This patch is now incorporated upstream.

Is there any bug for upstream ghostscript to fix the remaining issues?
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2011-05-06 15:51:52 UTC
Version in question was removed from the tree
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-12 15:06:23 UTC
(In reply to comment #8)
> Version in question was removed from the tree

Versions are arbitrary labels. Don't confuse them with bug fixes.
Comment 10 Timo Gurr (RETIRED) gentoo-dev 2012-08-13 17:47:54 UTC
*** Bug 430946 has been marked as a duplicate of this bug. ***
Comment 11 Timo Gurr (RETIRED) gentoo-dev 2012-08-13 17:58:43 UTC
Removing the gs version in $summary, this needs to get fixed upstream.

I'll open an upstream bug report if time permits and we'll see if we can get Kevin Pyle's fixes upstreamed if they still fix the issue for >=9.06. If anyone has some spare time to produce a proper patch/diff, test it against the recent gs version and report it upstream in the meantime, feel free to do so (if you do so be sure to add a link to the upstream bug in $URL here so we can track the progress, thanks!). Usually the gs upstream developers are very responsive and appreciate any patches.
Comment 12 Matthias Maier gentoo-dev 2014-11-09 13:52:56 UTC
This issue seems to be finally fixed somewhere in between 9.10 and 9.15. I dropped "-j1" for 9.15*


*ghostscript-gpl-9.10-r4 (09 Nov 2014)
*ghostscript-gpl-9.15-r1 (09 Nov 2014)

  09 Nov 2014; Matthias Maier <tamiko@gentoo.org>
  +ghostscript-gpl-9.10-r4.ebuild, +ghostscript-gpl-9.15-r1.ebuild,
  -ghostscript-gpl-9.10-r3.ebuild, -ghostscript-gpl-9.14.ebuild,
  -ghostscript-gpl-9.15.ebuild:
  also install [...]/Resource/Font/* wrt bug #490248, enable parallel make for
  9.15* wrt bug #234378
Comment 13 Thibaud CANALE 2015-10-25 07:32:14 UTC
(In reply to Matthias Maier from comment #12)
> This issue seems to be finally fixed somewhere in between 9.10 and 9.15. I
> dropped "-j1" for 9.15*

Unfortunately, it doesn't seem to be the case: bug 550926