Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447040 - dev-util/cmake src_prepare bootstrap fails when MAKEOPTS has multiple -j options
Summary: dev-util/cmake src_prepare bootstrap fails when MAKEOPTS has multiple -j options
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 20:45 UTC by Ben Kohler
Modified: 2013-01-01 19:26 UTC (History)
0 users

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


Attachments
~ben/cmake-funny-makeopts.patch (cmake-funny-makeopts.patch,616 bytes, patch)
2012-12-12 20:45 UTC, Ben Kohler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2012-12-12 20:45:44 UTC
Created attachment 332168 [details, diff]
~ben/cmake-funny-makeopts.patch

The cmake_src_bootstrap function in current dev-util/cmake ebuilds attempts to pull the -j/--jobs option from MAKEOPTS to pass it to the bootstrap script's --parallel= option.  If MAKEOPTS has multiple -j parameters, eg "-j2 -j3", it grabs the integer from both of them and passes "--parallel=2 3" causing an error.  In this example the bootstrap would die with "Unknown option: 3".

Not many people will pass MAKEOPTS like this, but certain custom setups will "stack" MAKEOPTS, and it is valid according to make.  The attached patch makes it only pass the final -j number, so MAKEOPTS="-j2 -j3" translates to simply "--parallel=3".
Comment 1 Chris Reffett (RETIRED) gentoo-dev Security 2013-01-01 19:26:17 UTC
I can't imagine that this will be reached very often, but added in 2.8.10.2-r1.