I have tried to install OpenCV 4.0 on an UP Board with 2 GB & 16 GB emmc. First attempts with Ubilinux failed in the compilation stage around 7% (can't remember the error something like page error). Trying OpenCV 3.4.x got further (22%) but again failed on compilation similar error. Tried make -j1 instead of make -j4 got further this time 50% then failed on lack of storage my 9GB spare all used.
Tried Ubuntu 18.04 on my other UP board same spec. This is happy with OpenCV 4.0 and make -j4 but it again fails on lack of storage.
As an UP Board beginner is it possible to install OpenCV with 16 GB emmc? Installed fine on my Pi albeit with a 32 GB SD.