Wireshark mailing list archives
Re: Compiling with ninja
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Mon, 10 Nov 2014 16:00:05 -0500
On 11/04/14 09:12, Dario Lombardo wrote:
Hi list Some days ago I played a bit with ninja and I found useful info I'd like to share with you. Ninja is a compilation system similar to make. It's advantage is that it was built with parallelism in mind, to take advantage of multi-core CPUs. Wireshark uses cmake that has a generator for ninja, so I decided to make some tests. 1) cmake and make This a very common way to compile stuff, and wireshark too. The advantage of using cmake and make is that you get a progress of the compilation. Very useful! The disadvantage is that this progress runs bad with parallel make (-j). Not only the output is a mess, but sometimes compilation breaks. I think that cmake doesn't manage well parallel gcc instances. Autotools manage well parallel make, but afaik the cmake subsystem in wireshark has a better support.
FWIW the autotools' parallel make stuff works quite well. I think quite a number of people still use it as their primary build system so it's quite well supported.
I can also do parallel cmake builds (cmake version is 2.8.12.2) with significant speedup and only minor output messiness, for example:
[ 58%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-mip.c.o [ 58%] [ 58%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-mip6.c.o Building C object epan/CMakeFiles/epan.dir/dissectors/packet-mmse.c.o
This is all on Fedora 20. Some stats: autotools (compiling Gtk2 and Qt GUIs): --------------------------------------- make: 9m43 (9 minutes 43 seconds) make -j 9: 2m45 cmake (compiling just the Gtk3 GUI): ------------------------------------ make: 6m55 make -j 9: 1m57 ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Compiling with ninja Dario Lombardo (Nov 04)
- Re: Compiling with ninja Jeff Morriss (Nov 10)