4 ms·
There are degrees of difficulty. If you're developing on Linux there are numerous portability traps you might fall into if you're not paying attention and test
by rleigh 8y ago
There are degrees of difficulty. If you're developing on Linux there are numerous portability traps you might fall into if you're not paying attention and testing on other platforms like MacOS or BSD. From glibc-specific functions and structure members, to libraries which are Linux-only. You also have compiler differences, e.g. GCC vs LLVM.
None of these are usually much work to correct. But they can creep in without you realising if your CI isn't testing on multiple platforms.
The most annoying I had recently was a service using PAM for authentication/authorisation. Linux-PAM is both Linux-specific and subtly incompatible with Solaris PAM (the original implementation) and OpenPAM on FreeBSD. This means you have to have three sets of ifdefs for the different implementations, which is annoying. But if you developed for Linux and never tried building or testing on the other platforms, you would never appreciate the problem even existed!
- rbanffy 8y agoIt's a bit like shell scripts that call for sh, but have bashisms in them. Thanks for the comments. It's easy to forget the norm is not testing on multiple compilers and OSs. BTW, I haven't been testing my stuff on ARM and I probably should. Not that I expect anything to break, but I don't want the stuff I don't expect to break surprising me.