cmake needs libuv, which needs autoconf. During bootstrap (needing cmake for compiling llvm) autoconf and friends aren't setup completely yet, therefore it would be nice if we could add USE=bootstrap to cmake ebuild which would suppress "-DCMAKE_USE_SYSTEM_LIBRARIES=ON", such that the bundled libuv is used during the bootstrap. cmake will be recompiled lateron without this USE-flag, so eventually all it would use external libuv. Are you ok with me adding this to the 3.7.1 ebuild?
Why is autoconf not set up completely?
In the early bootstrap we're still trying to pull things up one by one. Autoconf itself requires perl and many utilities. Note that this is just the phase where we try to get a sane toolchain. For now I used <cmake-3.7, and perhaps in the future a libuv will be there without a need for autoreconf. Because I thought perhaps in the future more dependencies are added to cmake, this flag would allow us to ignore those during the bootstrap where things aren't fully setup yet (we need cmake to actually install a compiler here, as illustration how incomplete the setup is at this point).
ok, cool, 3.6 was removed so our bootstrap process is broken, can we have this in 3.8 then?
Shouldn't it be USE="build" instead? !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1] Also, do you have a patch already that we could see?
Anyway, I would see it like this: if USE=build install bootstrapped cmake (with bundled deps, if it's not like this already), else build bootstrapped cmake (perhaps even using the same bundled deps) build target cmake with bootstrapped cmake, this time with system libs This requires some changes in build phases, build and runtime deps.
You suggest more changes than I actually think are required for this case. The problem is that we can't use system libs at this stage because we don't have autoconf/etc setup properly yet (we're in the process of doing so). Currently libuv needs an eautoreconf. Normally we would avoid any packages with many dependencies (like cmake), but we can't because llvm/clang (our one and only compiler on Darwin) needs it to be built in Gentoo. For this reason, it would help us if we could use the bundled dependencies during our bootstrap, because cmake patched them all up to work good enough. As soon as we have a compiler and the rest of our toolchain setup, we will reinstall cmake of course, but this time building all dependant libraries because we can.
(In reply to Fabian Groffen from comment #6) > You suggest more changes than I actually think are required for this case. Do I? Just look at what CMake ebuild does already: src_prepare() { (...) if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then CMAKE_BINARY="${S}/Bootstrap.cmk/cmake" cmake_src_bootstrap fi (...) This is where bootstrapped cmake is being built, when not suitable CMake is found in system. Then perhaps somewhat less invasive change would be: if USE=build optionally (no cmake found) build bootstrapped cmake (with bundled deps, if it's not like this already) build target cmake (optionally using bootstrapped cmake), also with bundled deps (this is your change) else optionally (no cmake found) build bootstrapped cmake (perhaps even using the same bundled deps) build target cmake (optionally using bootstrapped cmake), this time with system libs
Yeah, that would work for us here, thanks!
commit 31c96e6a0a9b9f4eb722878519810c51b1ac4087 (HEAD -> master, origin/master, origin/HEAD) Author: Lars Wendler <polynomial-c@gentoo.org> Date: Fri Apr 28 10:03:02 2017 dev-util/cmake: Put cmake-server behind a USE flag (bug #616810). This should also fix the bootstrapping issue reported in bug #603012. Package-Manager: Portage-2.3.5, Repoman-2.3.2 Can you please test if =dev-util/cmake-3.8.0-r1[-server] fixes your issue?
While USE=server will fix this particular bootstrapping problem indirectly, I think we could still have USE=build, so don't close the bug just yet.
Is this still an issue with recent cmake versions?
Yes, but we avoided this by bootstrapping cmake without ebuilds, such that we can use everything it includes, which works fine and avoids the need for lots of conditional code in cmake ebuilds.