Meh, AOSP 7.1 requires symlink to /cache to /data/cache. Not to mention at 99 percent of build, I got a error to define partition size.

BuildImage: in_dir = /media/daedroza/workspace/CyanogenMod-14.X/out/target/product/yuga/cache, out_file = /media/daedroza/workspace/CyanogenMod-14.X/out/target/product/yuga/cache.img
Traceback (most recent call last):
  File "./build/tools/releasetools/build_image.py", line 699, in <module>
    main(sys.argv[1:])
  File "./build/tools/releasetools/build_image.py", line 692, in main
    if not BuildImage(in_dir, image_properties, out_file, target_out):
  File "./build/tools/releasetools/build_image.py", line 402, in BuildImage
    build_command.append(prop_dict["partition_size"])
KeyError: 'partition_size'

Now you can use parted to define the size. The Tetsuo way is -

adb push sdparted-recovery.zip /tmp
cd /tmp
unzip sdparted-recovery.zip
chmod +x sdparted/*
cp sdparted/* /sbin
parted /dev/block/mmcblk0 print free,all
blockdev --getsize64 /dev/block/mmcblk0p3

Another way, that I used before Tetsuo taught me this -

df -t
dd if='/dev/block/mmcblk0p3' of='/storage/ext_sdcard/1.img'
cd /storage/ext_sdcard && ls -l

‘dd’ prints the value in getsize64 after the transfer is successful. Thanks to Adrian and Tetsuo for all the knowledge :)