Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350339 - net-misc/asterisk-1.8.1.1 & net-misc/asterisk-1.8.0 fail to install when MAKEOPTS has -j option with value >1
Summary: net-misc/asterisk-1.8.1.1 & net-misc/asterisk-1.8.0 fail to install when MAKE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-02 09:05 UTC by rad0xicated
Modified: 2011-01-11 20:20 UTC (History)
1 user (show)

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


Attachments
Patch file for the ebuild (asterisk-1.8.1.1.patch,415 bytes, patch)
2011-01-02 09:12 UTC, rad0xicated
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rad0xicated 2011-01-02 09:05:55 UTC
Summary explains all.

Reproducible: Always

Steps to Reproduce:
1. Set MAKEOPTS="-j4" in /etc/make.conf
2. Emerge =asterisk-1.8.1.1 (or 1.8.0 for that matter)


Expected Results:  
To fix this, add -j1 to line 157 of asterisk-1.8.1.1.ebuild:
'emake DESTDIR="${D}" install || die "emake install failed"' => 'emake -j1 DESTDIR="${D}" install || die "emake install failed"'

make -j4 DESTDIR=/var/tmp/portage/net-misc/asterisk-1.8.1.1/image/ install 
/usr/bin/install -c -d "/var/tmp/portage/net-misc/asterisk-1.8.1.1/image//usr/lib/asterisk/modules"
/usr/bin/install: cannot create regular file `/var/tmp/portage/net-misc/asterisk-1.8.1.1/image//usr/sbin/astcanary': No such file or directory
make[1]: *** [install] Error 1
make: *** [utils-install] Error 2
make: *** Waiting for unfinished jobs....
Comment 1 rad0xicated 2011-01-02 09:12:54 UTC
Created attachment 258607 [details, diff]
Patch file for the ebuild
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2011-01-02 17:14:54 UTC
No, this is not the correct fix.
Please try the patchset on bug #344533 and report success/failure here.

The Makefile isn't appropriately serialized, so the directory creation is not in front on the file installs. If we pre-create the directories, we can continue to do a parallel install.
Comment 3 rad0xicated 2011-01-02 21:13:38 UTC
It installs when I apply the menuselect-deps-and-mkdir.patch as posted in bug #344533.

Are you sure it's the safest way to go though? I would think -j1 for the install isn't that bad, but i'm not an expert at this.
Comment 4 Tony Vroon (RETIRED) gentoo-dev 2011-01-02 22:00:09 UTC
(In reply to comment #3)
> It installs when I apply the menuselect-deps-and-mkdir.patch as posted in bug
> #344533.

Thank you. I will leave this report open until 1.8.1.1-r1 hits the tree.

> Are you sure it's the safest way to go though?

Yes, there is no difference between enforcing the correct order on the broken build system (making sure that the install statements that create the required directories go first) or pre-creating the directories in question so that copy statements can safely trigger before the directory creation statements.
You are welcome to benchmark the two solutions against each other. What I suspect that you will find is that both methods (my pre-creation and your -j1) put the exact same amount of files on disk, but that mine is faster. How much faster depends on the amount of CPUs in the machine.
Comment 5 Tony Vroon (RETIRED) gentoo-dev 2011-01-04 17:31:42 UTC
+*asterisk-1.8.1.1-r1 (04 Jan 2011)
+
+  04 Jan 2011; Tony Vroon <chainsaw@gentoo.org> -asterisk-1.8.0.ebuild,
+  -asterisk-1.8.1.1.ebuild, +asterisk-1.8.1.1-r1.ebuild:
+  As pointed out by Ivan L. Isaev in bug #344533, MySQL was not fully enabled.
+  Together with Michael Lesniewski I have redone all conditional statements
+  through menuselect instead of through use_with. Pre-creating directories in
+  the installation image allows parallel install with MAKEOPTS above -j1,
+  closes bug #350339 by rad0xicated@gmail.com. Kill USE=logrotate which snuck
+  back in. Kill USE=keepsrc as I do not believe it is used. Petition me through
+  a bug report if you disagree and present a clear use case. Nuke older 1.8
+  branch ebuilds, they are useless now because of a gtalk protocol change.
Comment 6 rad0xicated 2011-01-11 19:12:14 UTC
I'm getting install errors again after adding srtp to the use flags. The use flags this occurred with are: caps gtalk iconv samples srtp ssl. MAKE_OPTS="-j4". The errors aren't occurring every emerge though.

/usr/bin/install: cannot create directory `/var/tmp/portage/net-misc/asterisk-1.8.1.1-r1/image//var/lib/asterisk/images': File exists
make: *** [installdirs] Error 1

Comment 7 Tony Vroon (RETIRED) gentoo-dev 2011-01-11 20:20:11 UTC
That is a new bug on a different ebuild. Please do not reopen old bugs.
File a new report instead.