Tup - an awesome build tool!! - Page 1
Forum section: electronics / general

author: SreejitS
author_rank: Contributor
timestamp: October 02, 2016, 08:24:02 pm
content: Hello everyone!!I recently ported the build system of an embedded project from GNU make to Tup .I have to say tup really packs a punch!!Lightning fast....Felt a warm and fuzy feeling on seeing the build process happenSo thought to share with everyone.I will recommend it to anyone who wants to make the build process pretty fast.http://gittup.org/tup/What build tools do you people generally use ?

author: andersm
author_rank: Super Contributor
timestamp: October 03, 2016, 07:04:40 am
content: Ninjais very fast, and is supported as a Cmake backend.

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 08:06:35 am
content: tups seems to have same strange requirement about FUSE

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 08:08:40 am
content: ninja uses re2c

author: SreejitS
author_rank: Contributor
timestamp: October 03, 2016, 08:14:48 am
content: QuoteTup does have some weird thing with fuse...It generates a warning on my arch linux...But other than that its cool!

author: SreejitS
author_rank: Contributor
timestamp: October 03, 2016, 08:17:13 am
content: QuoteI dont know anything about re2c ... can you tell why that is such a facepalm?

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 09:50:36 am
content: because it's a problem on gentoo, I need to update a lot of builds

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 09:52:17 am
content: Code:* dev-util/re2cHomepage: http://re2c.sourceforge.net/Description: tool for generating C-based recognizers from regular expressionsrequestedCode:A compatible version of re2c (>= 0.11.3)I am going to emerge v0.13.7.5but first i need to update and sync the whole portage

author: mac.6
author_rank: Regular Contributor
timestamp: October 03, 2016, 09:57:02 am
content: Quote from: SreejitS on October 02, 2016, 08:24:02 pmCMake, with whatever generator you want (makefile, makefile+eclipse, ninja and other exotic build system).

author: nano
author_rank: Contributor
timestamp: October 03, 2016, 11:34:52 am
content: Quote from: legacy on October 03, 2016, 09:50:36 amSounds more like a problem of your linux distribution

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 12:36:53 pm
content: Quote from: nano on October 03, 2016, 11:34:52 amyeah, it is, and … might be solved soon, it's easier than TUP's issuewhose request appears like a wtf? I can't actually figure out what'swrong with FUSE, anyhowportage says OKCode:2016-10-03--11-45-53---2016-10-03--11-47-49 - emerge dev-util/re2c - failure - root2016-10-03--12-07-11---2016-10-03--14-10-38 - emerge update - Last sync was 175d 20h 15m 59s ago, success - root2016-10-03--14-55-57---2016-10-03--14-59-30 - emerge dev-util/re2c - success - rootand finally I got ninja compiledCode:./ninja ninja_test[0/17] CXX build/build_test.o[17/17] LINK ninja_test100% PASSEDthe new env works, ninja should work!whereas TUP … is still no-idea

author: zapta
author_rank: Super Contributor
timestamp: October 03, 2016, 03:16:36 pm
content: Quote from: SreejitS on October 02, 2016, 08:24:02 pmIs it a hoax? The explanation in your link that it's awesome because the arrows go up definitely sounds like a hoax.Build tools are dime a dozen. Everybody feels the need to reinvent the wheel.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: October 03, 2016, 03:41:13 pm
content: Its not a hoax as far as I can see. There is sound academic reasoning about what has to be looked at if the arrows go up or down, and why having them go up means you only need to consider for rebuilding things that actually depend on the changed files. Read the paper.

author: legacy
author_rank: Super Contributor
timestamp: October 03, 2016, 04:48:36 pm
content: I agree

author: SreejitS
author_rank: Contributor
timestamp: October 03, 2016, 05:01:15 pm
content: QuoteNo, I've tried it and results are pretty impressive. Though a thorough testing is required to reach any conclusion, I would say things are looking good as far as I know.

author: janoc
author_rank: Super Contributor
timestamp: October 03, 2016, 06:39:06 pm
content: Quote from: mac.6 on October 03, 2016, 09:57:02 amYep, CMake too. Pretty much the only sane way how to manage builds, especially if you need to handle cross-platform projects (Windows+Linux/Mac, embedded targets, etc.)Also CMake config files are way easier to hack on than the MSVC projects.

author: janoc
author_rank: Super Contributor
timestamp: October 03, 2016, 06:46:34 pm
content: Quote from: SreejitS on October 03, 2016, 05:01:15 pmDoes it actually support out of source builds now?https://github.com/gittup/tup/issues/39That's quite a show stopper for bigger projects, especially with the spew that Microsoft's compilers tend to produce.Personally I am more partial to the approach that ninja took - they aren't trying to track dependencies (which ishard) but focus on building things really quickly. And they leave the dependency specification/tracking to tools that are better equipped for the task - such as CMake or the user.Various make replacements are a dime a dozen and most don't really handle well the difficult problems - such as project configuration (where are dependencies, which libraries need to be linked, which targets to rebuild when, handling code generators, etc).

author: SreejitS
author_rank: Contributor
timestamp: October 03, 2016, 08:05:28 pm
content: Quote@janoc , thanks for pointing it out.To be honest i was not even aware of out-of-source and in-source builds since i always used the former.But i still think it is an excellent replacement for gnu make as projects using it are mostly built in-source.Anyways, i hope they implement the feature as soon as possible

author: janoc
author_rank: Super Contributor
timestamp: October 04, 2016, 07:38:35 pm
content: Quote from: SreejitS on October 03, 2016, 08:05:28 pmWell, that's actually debatable. Speed of compilation is only one parameter and rarely the most important one, actually. GNU make can be a pain to use but most developers at least know how to deal with it. And there are plenty of tools supporting it as well.On the other hand, there are very few other things that can drive me up the wall in frustration faster than needing to build some software and discovering that it uses some obscure build system (jam or autobuild anyone?), requiring non-standard tools which I have to find, install/compile (and potentially troubleshoot!) and then figure out how to use. Oh and good luck if something doesn't work or you need to change something in the build config - then it could take hours trying to reverse engineer the build and make the tool do what I want it to.Good example of this "not invented here/our itches are too special for a standard tool" syndrome is e.g. gradle used for Android builds or the Unreal's C# home-made build tool that is a project/makefile generator, code precompiler, dependency tracker and who knows what else. And does none of it too well - literally a missing comma in a file will make it crash without a word. Good luck tracking that down in the 6GB of Unreal's sources... The build configuration is done literally by writing C# files which get compiled and then it generates either makefiles or Visual Studio projects. To add insult to injury, this tool is the only C#/Mono dependency in the entire engine (which is C++ otherwise) and is pretty slow (and people complained about SCons' Python ...).