I saw your bug report, which to be honest, it's probably a bit terse to attract much attention (there's not really enough information to persuade a developer that it's not a user error or a "dirty" environment ).
Anyhow, I was feeling generous of spirit so I have spun up an identical OS in a container and, reinforcing the above, it builds for me following the instructions on https://github.com/Linaro/documentation/blob/master/Reference-Platform/CECommon/OE.md .
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Debian-9.1"
TARGET_SYS = "aarch64-linaro-linux"
MACHINE = "hikey960"
DISTRO = "rpb"
DISTRO_VERSION = "2.2+linaro"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta-rpb = "HEAD:543c07813f4214730bbc2aa8eae4009d1db0fb7c"
meta-python = "HEAD:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta-browser = "HEAD:1b4f1e588b1901d8919ea2362b0fcba37c5023e0"
meta-qt5 = "HEAD:2c9f0e4eb0e9097f6f872ec1e1d81768a8ab5f1b"
meta-virtualization = "HEAD:877379ff111931ea71f8ee47452934a6d649d790"
meta-96boards = "HEAD:6ec11bd5495c93230cea4ee604b84fc27273fff4"
meta-intel = "HEAD:6add41510412ca196efb3e4f949d403a8b6f35d7"
meta-qcom = "HEAD:60ed02c2d3b86b8ebb716ed9b36569bc752ce90a"
meta-st-cannes2 = "HEAD:8ddc346d5b511291d5de1156eb933d2784a1f8ae"
meta-ti = "HEAD:5dd6a49b64acf5a219fe3252662ae0a250dda3db"
meta-optee = "HEAD:49b0f32d7e955f250b0022d1b2f403f45a2c2d9c"
meta-backports = "HEAD:308422876118f514bce8e1aed619a88972d819b3"
meta = "HEAD:32d172c25072251d6cc7fdd40929d76b5f1f5059"
I did have to make a couple of small tweaks. Firstly because the container is really spartan I had to install the python and libssl-dev packages. Additionally I had to update SHA1 hash for the kernel because the kernel we are using for the RPB/hikey960 pre-releases changes frequently.
Anyhow... there's no need for you to worry about the above, the build is failing for you way before any of the above makes a difference. I suggest you create a new user and try to build as that user. This will test the theory that you have set something "weird" in the environment of your own user and that this breaks the build.