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.

Meson Build System 1.0

150 pointsby TangerineDreamover 2 years ago

16 comments

oldgradstudentover 2 years ago
Meson still won&#x27;t have user defined functions, and gives a bad excuse:<p>&gt; Meson does not currently support user-defined functions or methods. The addition of user-defined functions would make Meson Turing-complete which would make it harder to reason about and more difficult to integrate with tools like IDEs.<p>No, user-defined functions won&#x27;t make Meson Turing-complete as long as recursion is not allowed.<p>User defined functions make it easier to encapsulate complicated build logic and reuse it.
评论 #34114051 未加载
评论 #34116394 未加载
评论 #34111411 未加载
评论 #34115487 未加载
评论 #34111823 未加载
评论 #34111462 未加载
lazypenguinover 2 years ago
2019 was the last time I looked into the CMake vs. Meson debate and while Meson looked 100% saner, cleaner, etc. the network effects of most of the popular C++ libraries using CMake made me end up picking CMake. I&#x27;d be curious how the landscape is today but I now have stockholm syndrome with CMake especially using vcpkg.
评论 #34111371 未加载
评论 #34111727 未加载
评论 #34110583 未加载
评论 #34113369 未加载
einpoklumover 2 years ago
In my experience, CMake seems to be more capable and easier to work with, both for the package author and for the person trying to build it. Also, more flexible in terms of how projects&#x2F;packages depend on each other.<p>Now CMake is certainly not great; it has a lot of warts and baggage; and some functionality is _not_ easy to use, like installation (you need a good hour of explanation to make heads from tails with that, and then you&#x27;re supposed to write 4 or 5 different CMake commands even for the simple use-case of &quot;just install my damn plain-vanilla library&quot;). But I&#x27;ll choose it over meson any day of the week, and so would my users (i.e. the people who download and build my packages).
评论 #34111515 未加载
评论 #34111482 未加载
评论 #34110719 未加载
评论 #34113423 未加载
majoeover 2 years ago
I&#x27;m using meson, since I started a new job a few months ago and so far I find it to be absolutely delightful, especially compared to cmake.<p>There is almost always only one certain way to do something, which makes it easy to learn, but sometimes frustrating to use, if you&#x27;re not doing it the &quot;meson way&quot;.<p>I also like the .wrap file mechanism to manage dependencies. It&#x27;s simple, yet powerful enough for our small team and so far we didn&#x27;t have the need to use a more complex solution.
Cloudefover 2 years ago
Every time I have to deal with meson based projects, it needs incredible amount of hacks to build a project if you want to build it in slightly customized way or for bit more different platform. Meson is too smart and often tells you &quot;no you can&#x27;t do that&quot;, which can&#x27;t be overridden without patching the meson&#x27;s python code itself.<p>I also find it bit sad, we need python to build something in the first place.
vbezhenarover 2 years ago
I&#x27;m using shell scripts for my small C projects. Works awesome. I dread the time when I&#x27;d need to deal with those overcomplicated build systems.
评论 #34112352 未加载
hackerbrotherover 2 years ago
Why do many C&#x2F;C++ projects have both Meson and Ninja commands in their install instructions? Shouldn&#x27;t only one be necessary?
评论 #34110962 未加载
评论 #34110949 未加载
评论 #34115248 未加载
prabhu-yuover 2 years ago
How about Scons? I feel, Scons is much simpler even if it less efficient in speed of compilation. Please comment.
Klasiasterover 2 years ago
It&#x27;s really a blessing that this project exists and was so well received and replaced Autotools in many areas already. That said, it has some learning curve for special cases (NB: the fact that it depends on Python may also need some workarounds in bootstrapping environments by e.g. compiling it first to native code or whatever but normally it&#x27;s not a big deal as Python is around almost everywhere).
评论 #34126107 未加载
malkiaover 2 years ago
Are there any stories&#x2F;articles on why people chose meson, over say CMake (or others)? I do like meson much more than CMake for sure, sane syntax and all.
评论 #34110386 未加载
评论 #34110932 未加载
评论 #34115092 未加载
评论 #34115106 未加载
FpUserover 2 years ago
I have no knowledge of CMake other than that of a very superficial user. Still I think due to critical mass unless we have something truly ingenuous it is probably better to keep adding missing features to CMake than create other tools from a scratch.
评论 #34111238 未加载
评论 #34111383 未加载
synergy20over 2 years ago
Played with Meson for one hour and bailed out, will stay with makefile&#x2F;cmake.<p>I especially like cmake that can convert pkg-config from -I header.h to -isystem header.h.
评论 #34111852 未加载
AussieWog93over 2 years ago
If I had the option between going back in time and killing Hitler, or going back in time and preventing CMake from ever being written, I&#x27;d pick the latter every single time[1].<p>Same with Bluetooth, Qt and every other piece of janky garbage that works just well enough to survive, but badly enough that every single person on the planet hates it.<p>[1] This is obviously hyperbole, before anyone gets &quot;HN literal&quot; in the replies.
评论 #34111939 未加载
bandramiover 2 years ago
Any time I&#x27;ve needed something other than make it&#x27;s been a sign I need to refactor
评论 #34113936 未加载
hulituover 2 years ago
I hate the world today. Every program needs its own build system. &#x2F;s
jiggawattsover 2 years ago
Something that I learned from listening to Jonathan Blow about his new language Jai is that the implicit assumptions on which traditional C&#x2F;C++ toolchains are built are horrendously out-of-date.<p>The whole concept of &quot;discovering&quot; which compiler you have, what your linker is, and then using a DSL to generate a script that triggers shell commands is more than a little bonkers if you stand back and look at it objectively.<p>It&#x27;s common to see SDKs or APIs with 2-10 functions in them that weigh in at over 100 KB due to the overheads of having to deal with toolchains, platforms, and other sideshows that have no real contribution to the business at hand.<p>Jonathan has demonstrated recompiling, linking, and reloading an entire game engine <i>live</i>, which then lets you escape the tarpit of having to add non-compiled DSLs to everything as a workaround for slow compile times. If your compile times are measured in hundreds of milliseconds, scripting isn&#x27;t needed any more! No more bytecodes, or JIT, or any of that. Just churn the code through a <i>single process</i> that outputs an executable directly and you can sidestep the need for entire industries.<p>This is why tools like CMake or Meson feel to me like they&#x27;re <i>solving the wrong problem</i>. It&#x27;s like selling a better horse when automobiles have been demonstrated by Henry Ford.
评论 #34114006 未加载
评论 #34112931 未加载
评论 #34115609 未加载
评论 #34114905 未加载