Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543602 - app-text/ghostscript-gpl - cp: cannot create regular file ‘/var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/#inst.11767#’: No such file or directory
Summary: app-text/ghostscript-gpl - cp: cannot create regular file ‘/var/tmp/portage/a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 12:08 UTC by S. Gilles
Modified: 2015-07-25 23:15 UTC (History)
1 user (show)

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


Attachments
Mostly-complete build log (build.log,363.44 KB, text/plain)
2015-03-17 12:17 UTC, S. Gilles
Details
`emerge --info '=app-text/ghostscript-gpl-9.15-r1::gentoo'' (info.txt,17.66 KB, text/plain)
2015-03-17 12:17 UTC, S. Gilles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Gilles 2015-03-17 12:08:06 UTC
app-text/ghostscript-gpl-9.15-r1 fails to build.

# emerge -pqv '=app-text/ghostscript-gpl-9.15-r1::gentoo'
[ebuild   R   ] app-text/ghostscript-gpl-9.15-r1  USE="X cups djvu -dbus -gtk -idn -static-libs (-bindist%)" LINGUAS="-de -ja -ko -zh_CN -zh_TW"



Reproducible: Always

Steps to Reproduce:
1. emerge '=app-text/ghostscript-gpl-9.15-r1::gentoo' --ask n
Actual Results:  
Build failure:

cp: cannot create regular file ‘/var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/#inst.11767#’: No such file or directory
contrib/contrib.mak:1091: recipe for target 'extra-upp-install' failed

(see attached build.log)

Expected Results:  
Installation should succeed

(emerge --info is too long for this section, submitting as attachment instead)
Comment 1 S. Gilles 2015-03-17 12:17:14 UTC
Created attachment 399104 [details]
Mostly-complete build log

Full build log is 1.8M, I removed many lines of successful compilation.
Comment 2 S. Gilles 2015-03-17 12:17:53 UTC
Created attachment 399106 [details]
`emerge --info '=app-text/ghostscript-gpl-9.15-r1::gentoo''
Comment 3 Anthony Basile gentoo-dev 2015-07-23 12:40:47 UTC
I think I just hit this or a closely related issue.  Its probably parallel make issue during the install phase.  You got:

  ./base/instcopy -c -m 644 $f /var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/lib || exit 1; \
done
cp: cannot create regular file ‘/var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/#inst.11767#’: No such file or directory
contrib/contrib.mak:1091: recipe for target 'extra-upp-install' failed
make: *** [extra-upp-install] Error 1
make: *** Waiting for unfinished jobs....


On one system I got:


./obj/aux/echogs -e .dev -w- -l-obj ./obj/pdf -include ./obj/psbase ./obj/dps2lib
rm: cannot remove '/var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/lib': Is a 
directory
rm: cannot remove '/var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//usr/share/ghostscript/9.15/lib': Is a 
directory
contrib/contrib.mak:1091: recipe for target 'extra-upp-install' failed
make: *** [extra-upp-install] Error 1
make: *** Waiting for unfinished jobs....
./obj/aux/echogs -e .dev -a-  ./obj/dps -ps gs_dps
contrib/contrib.mak:950: recipe for target 'extra-dmprt-install' failed
make: *** [extra-dmprt-install] Error 1

On another I got

./base/instcopy -c -m 644 ./contrib/japanese/dmp_site.ps /var/tmp/portage/app-text/ghostscript-gpl-9.15-r1/image//
usr/share/ghostscript/9.15/lib || exit 1
contrib/contrib.mak:1091: recipe for target 'extra-upp-install' failed
make: *** [extra-upp-install] Error 1make: *** Waiting for unfinished jobs....


All of these happened with aggressive parallelization.  I'm testing now to see if some -j1's will "fix" the issue --- fix in quotes because the correct fix wold be to fix the build system, but at least we'll know what direction to head in.
Comment 4 Anthony Basile gentoo-dev 2015-07-24 14:37:38 UTC
(In reply to Anthony Basile from comment #3)
> I think I just hit this or a closely related issue.  Its probably parallel
> make issue during the install phase. 

I've pretty much confirmed that this is a parallel `make install` issue.  I can hit it repeatedly under heavy loads with high -jX values and it goes away with the following patch which I'll inline just so it can be easily read.  If its okay with the printing team, I'll commit it without revbump.  It does suck that we have to do -j1 but ghostscript's build system is crazy.

 --- ghostscript-gpl-9.15-r1.ebuild.orig	2015-07-15 17:01:04.000000000 -0400
+++ ghostscript-gpl-9.15-r1.ebuild	2015-07-24 10:27:26.266260904 -0400
@@ -184,7 +184,7 @@
 }
 
 src_install() {
-	emake DESTDIR="${D}" install-so install
+	emake -j1 DESTDIR="${D}" install-so install
 
 	if use djvu ; then
 		dobin gsdjvu
@@ -195,7 +195,7 @@
 	mv -f "${D}/usr/bin/gsc" "${D}/usr/bin/gs" || die
 
 	cd "${S}/ijs"
-	emake DESTDIR="${D}" install
+	emake -j1 DESTDIR="${D}" install
 
 	# rename the original cidfmap to cidfmap.GS
 	mv "${D}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die
Comment 5 Manuel Rüger (RETIRED) gentoo-dev 2015-07-24 14:43:00 UTC
As this is only install phase and not compile phase, I think we can live with -j1 there. :)
Comment 6 Anthony Basile gentoo-dev 2015-07-25 18:00:55 UTC
(In reply to Manuel Rüger from comment #5)
> As this is only install phase and not compile phase, I think we can live
> with -j1 there. :)

Okay I committed this without a rev bump.

@S. Gilles.  Please test to make sure this fixes your issue and reopen if you're still getting the problem.
Comment 7 S. Gilles 2015-07-25 23:15:22 UTC
This seems to install fine for me, so I won't reopen.