I'd like to share my opinion after recent experience with OpenGGSN. It's very
portable - supports GNU/Linux, SunOS, FreeBSD and even Darwin. And that makes code
into horrible mess of ifdefs which is hard to follow and update.
On 06.05.2017 15:13, Vadim Yanitskiy wrote:
I also have an idea: what if we could build our projects with several
compilers (GCC and clang) and with their several versions (the three
latest for example) on Jenkins at the same time? I think, it would be
great to keep our projects as portable as possible.
Personally I don't see any benefit in this - if smth compiles on platform X it
doesn't mean it really supports it. We can guess that it does but unless someone
actually uses it on platform X on a regular basis, it's more of a handwaving: it can
fail at runtime, it can fail due to some obscure configuration or file path
differences etc.
On the downside - it makes code more complex and harder to follow. I think we should
only care about portability to platform X iff there's maintainer who cares about
platform X. Someone who's willing to contribute his time (or money) into ensuring
that Osmocom stack actually works on it (not just compiles). Otherwise all the
efforts spent on making various compiler versions happy are simply wasted.
--
Max Suraev <msuraev(a)sysmocom.de>
http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Director: Harald Welte