Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 559500

Summary: dev-util/cmake-3.2.2 fails to build with musl
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: [OLD] UnspecifiedAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: blueness, kde, toast+misc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 561620    
Bug Blocks: 546890    
Attachments: pach against musl overlay
alternative patch for musl 3.2.2

Description tt_1 2015-09-03 10:23:47 UTC
Created attachment 410912 [details]
pach against musl overlay

patch shamelessly stolen from the alpine repos. please apply to the overlay if it is to your liking.
Comment 1 toast+misc 2015-09-19 07:02:27 UTC
Created attachment 412232 [details, diff]
alternative patch for musl 3.2.2

Changes as little as possible.
Includes sys/types.h rather than sys/stat.h (as it should be).
Technically should patch versions prior to this, and versions up until v3.3.0-rc1 (3.3.1-r1 is the first in the gentoo tree that doesn't need this patch).
Comment 2 toast+misc 2015-09-19 07:03:38 UTC
Was just working on that, and quickly checked in here.
The only change that actually needs to happen is to add an #include <sys/types.h> to cmake-[version]/Source/cmGeneratorExpressionEvaluationFile.h
This patch gets <sys/stat.h> into what looks like an includes file that's included everywhere (with potentially more changes, didn't go through it all)

I think any changes beyond what is necessary should be dropped (attachment against musl tree present).

Notable fact: Upstream has this patched as of version v3.3.0-rc1.
This means that this patch is only useful to stable users.
An alternative solution is simply put 3.3.1-r1 or 3.3.2 into stable on the tree until 'gentoo' catches up.

(added patch above)
Comment 3 Anthony Basile gentoo-dev 2015-09-19 07:29:49 UTC
(In reply to Chloe Kudryavtsev from comment #1)
> Created attachment 412232 [details, diff] [details, diff]
> alternative patch for musl 3.2.2
> 
> Changes as little as possible.
> Includes sys/types.h rather than sys/stat.h (as it should be).
> Technically should patch versions prior to this, and versions up until
> v3.3.0-rc1 (3.3.1-r1 is the first in the gentoo tree that doesn't need this
> patch).

do any cmake versions in the gentoo tree build without patching because we could just stabilize those.
Comment 4 toast+misc 2015-09-19 09:19:23 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to Chloe Kudryavtsev from comment #1)
> > Created attachment 412232 [details, diff] [details, diff] [details, diff]
> > alternative patch for musl 3.2.2
> > 
> > Changes as little as possible.
> > Includes sys/types.h rather than sys/stat.h (as it should be).
> > Technically should patch versions prior to this, and versions up until
> > v3.3.0-rc1 (3.3.1-r1 is the first in the gentoo tree that doesn't need this
> > patch).
> 
> do any cmake versions in the gentoo tree build without patching because we
> could just stabilize those.

Anything beyond 3.3.0-rc1 should build. Just built latest unstable (3.3.2) and it builds fine. That one line change was indeed all that was needed.
Comment 5 Anthony Basile gentoo-dev 2015-10-12 13:56:45 UTC
cmake-3.3.1-r1 is now stable on all the musl supported arches.
Comment 6 Felix Janda 2015-12-23 08:38:35 UTC
@blueness: So cmake can be removed from the musl overlay
Comment 7 Anthony Basile gentoo-dev 2015-12-23 08:55:00 UTC
(In reply to Felix Janda from comment #6)
> @blueness: So cmake can be removed from the musl overlay

It is.  Can you check in case something went wrong.