TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

C++ Package Managers: The Ultimate Roundup

42 pointsby tragiclosabout 1 year ago

12 comments

dupedabout 1 year ago
Conan does a very poor job of managing versions and accidental cycles in your dependency graph. I recall having issues that needed manual patching of conanfiles to bootstrap packages when no prebuilt version existed for the target and it contained itself as a transitive dependency.<p>Also if you use it, make sure not to rely on Conan center. Their outages can ruin your week.
hnaxabout 1 year ago
Why is XMake not mentioned in the list of build systems whereas XRepo is mentioned in the list of package managers? (subjective: XMake is a great tool if you like Lua).
frankohnabout 1 year ago
I have made my own tool to solve this problem:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;franko&#x2F;lhelper">https:&#x2F;&#x2F;github.com&#x2F;franko&#x2F;lhelper</a><p>It is currently used by nobody except me but it serves me well.<p>Its strong points are:<p>- it works on macOS, Linux and Windows - it is possible to choose the options you want to enable for each package - compiles packages using your own compiler toolchain - create static libraries by default but you can choose a shared library.
senkoraabout 1 year ago
This is a great overview, very comprehensive.<p>I personally have a system based on Guix, which is like Nix.<p>One important note is that doing LTO with such a setup is tricky (and I haven’t attempted it yet).<p>It is possible to transform existing packages to use your preferred C++ toolchain using —-with-c-toolchain, which avoids the ABI incompatibility trap, but I haven’t figured out how to create LTO-enabled static libs from system packages yet.
TillEabout 1 year ago
vcpkg is well on its way to becoming the de facto standard, with support for just about every major platform out there.<p>But FetchContent &#x2F; ExternalProject in CMake is super convenient and works really well if you just have a couple simple dependencies.
winridabout 1 year ago
Meson&#x27;s Wraps are pretty useful for including and building dependencies across different OSes.<p>We migrated netpanzer from Scons to Meson - that was a lot of work (which I didn&#x27;t do), but it actually integrates with CLion now, builds on win&#x2F;Linux easily, and builds fast with Ninja.<p>Scons wasn&#x27;t that bad, though, I just feel like the build script being turing complete was a pain.<p>Also Meson doesn&#x27;t want to just output a binary in your source root. It insists to put it in a build dir, unlike scons.
frumiousircabout 1 year ago
&gt; Spack cons. Not as well-suited for general-purpose development<p>While I would not use Spack (or any package manager) to drive the usual hack-build-test development loop, Spack does provide at least two mechanisms to support that kind of general-purpose development activity: &quot;environments&quot; and &quot;views&quot;.<p>Given the list of build systems includes SCons, I&#x27;d expect to see waf (waf.io) here.
评论 #39515664 未加载
pjmlpabout 1 year ago
&gt; Requires rebuild all dependencies are every machine<p>Regarding vcpkg, this hasn&#x27;t been true for a while.<p><a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;vcpkg&#x2F;users&#x2F;binarycaching" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;vcpkg&#x2F;users&#x2F;binarycaching</a>
bun_terminatorabout 1 year ago
vcpkg is the only reasonable one. But I&#x27;ve been burned too many times by libraries staying outdated for months. So I&#x27;ll stick with manually managing my libraries and also avoiding cmake. Still the best way IMO
foofieabout 1 year ago
Is it weird that the list doesn&#x27;t include plain old Linux package repositories?<p>Downloading the dev version of libraries is ancient history.
评论 #39503514 未加载
hnaxabout 1 year ago
Although you mention XRepo in the list of package managers, you don&#x27;t mention XMake in the list of build systems.
dongpingabout 1 year ago
The new bzlmod mechanism from Bazel can be count as a kind of package manager.