-
Clone this repo.
git clone --recursive https://github.com/Azure/iot-identity-service cd iot-identity-service/
-
Install build dependencies.
gcc
libclang1
llvm-config
make
openssl
headers and librariespkg-config
Check
/ci/install-build-deps.sh
for the exact names of the packages for your distro that contain these components. -
Install
rustup
. Ensure that~/.cargo/bin
is in$PATH
. The exact toolchain used to build this repository will automatically be downloaded later if necessary. -
Install
bindgen
andcbindgen
. Again, check/ci/install-build-deps.sh
for the exact command and versions. -
Build the services.
make
If the build fails with an error like:
/usr/include/limits.h:124:16: fatal error: 'limits.h' file not found
... this is because
bindgen
got confused by the defaultlimits.h
that ships withgcc
. Instead, you need to point it to an alternative one that doesn't useinclude_next
. Find it with:find /usr/lib*/gcc/ -name limits.h | grep include-fixed
This will print something like
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed/limits.h
Then export an env var to tell
bindgen
(and in turn, libclang) about this directory.export BINDGEN_EXTRA_CLANG_ARGS='-isystem /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed'
Then invoke
make
again.