build issue with libmetal package

Hi ,
I am trying to cross compile the libmetal_v2_0 package using cmake on linux.
while building i am getting error like :
error: ‘METAL_MUTEX_INIT’ undeclared (first use in this function); did you mean ‘METAL_LOG_INFO’?
metal_mutex_t lock = METAL_MUTEX_INIT;

step 1:
/new-home/biswajit/rfdc/RFDAC_BUILD_STANDALONE/libmetal_v2_0/src/libmetal
step 2:
mkdir build_libm
Step 3:
cmake … -DLIBRT_LIBRARIES=/new-home/biswajit/svn_ant_rfdc/art-os-ant-revi/os-ant-revi/buildos/root-fs/lib/librt-2.28.so -DLIBSYSFS_INCLUDE_DIR=/new-home/biswajit/svn_ant_rfdc/art-ant-revi/ant-revi/buildsw/install/include -DLIBSYSFS_LIBRARY=/new-home/biswajit/svn_ant_rfdc/art-ant-revi/ant-revi/buildsw/install/lib/libsysfs.so.2.0.1 -DCMAKE_TOOLCHAIN_FILE=…/cmake/platforms/toolchain.cmake

step 4 :
make

Build Log:

[biswajit@build-server-lab2 build_libm]$ export PATH=$PATH:/home/buildtools/xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin

[biswajit@build-server-lab2 build_libm]$ cmake … -DLIBRT_LIBRARIES=/new-home/biswajit/svn_ant_rfdc/art-os-ant-revi/os-ant-revi/buildos/root-fs/lib/librt-2.28.so -DLIBSYSFS_INCLUDE_DIR=/new-home/biswajit/svn_ant_rfdc/art-ant-revi/ant-revi/buildsw/install/include -DLIBSYSFS_LIBRARY=/new-home/biswajit/svn_ant_rfdc/art-ant-revi/ant-revi/buildsw/install/lib/libsysfs.so.2.0.1 -DCMAKE_TOOLCHAIN_FILE=…/cmake/platforms/toolchain.cmake
– The C compiler identification is GNU 8.2.0
– Check for working C compiler: /home/buildtools/xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc
– Check for working C compiler: /home/buildtools/xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/aarch64-linux-gnu-gcc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Build type: Debug
– Host: Linux/x86_64
– Target: Linux/arm
– Machine: Generic
– Looking for include file xintc.h
– Looking for include file xintc.h - not found
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– Looking for include file stdatomic.h
– Looking for include file stdatomic.h - found
– Looking for include file linux/futex.h
– Looking for include file linux/futex.h - found
– Looking for include file linux/dma-buf.h
– Looking for include file linux/dma-buf.h - found
– Could NOT find HUGETLBFS (missing: HUGETLBFS_LIBRARY HUGETLBFS_INCLUDE_DIR)
– Found LIBSYSFS: /new-home/biswajit/svn_ant_rfdc/art-ant-revi/ant-revi/buildsw/install/lib/libsysfs.so.2.0.1
– Looking for include file pthread.h
– Looking for include file pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - found
– Found Threads: TRUE
– Found LibRt: /new-home/biswajit/svn_ant_rfdc/art-os-ant-revi/os-ant-revi/buildos/root-fs/lib/librt-2.28.so
– Configuring done
– Generating done
– Build files have been written to: /new-home/biswajit/rfdc/RFDAC_BUILD_STANDALONE/libmetal_v2_0/src/libmetal/build_libm
[biswajit@build-server-lab2 build_libm]$
[biswajit@build-server-lab2 build_libm]$
[biswajit@build-server-lab2 build_libm]$
[biswajit@build-server-lab2 build_libm]$ make

content of cmake/platforms/toolchain.cmake

set (CMAKE_SYSTEM_PROCESSOR “arm” CACHE STRING “”)
#set (MACHINE “zynqmp_a53”)
set (CROSS_PREFIX “aarch64-linux-gnu-” CACHE STRING “”)
set (CMAKE_SYSTEM_NAME “Linux” CACHE STRING “”)
set (CMAKE_C_FLAGS “-lpthread”)
include (CMakeForceCompiler)
set (CMAKE_C_COMPILER “${CROSS_PREFIX}gcc” )
set (CMAKE_CXX_COMPILER “${CROSS_PREFIX}g++”)
set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER CACHE STRING “”)
set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER CACHE STRING “”)
set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER CACHE STRING “”)

Any input will be really helpful.

Regards,
Biswajit

It looks like a missing #include, but this is a question better suited to libmetal upstream rather than CMake itself (based on the provided information).