I did solved this with docker.
Dockerfile:
FROM rustembedded/cross:arm-unknown-linux-gnueabihf
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN dpkg --add-architecture armhf && \
apt-get update && \
apt-get install --assume-yes libpthread-stubs0-dev:armhf && \
apt-get install --assume-yes libudev-dev:armhf && \
apt-get install --assume-yes libudev1:armhf && \
apt-get install --assume-yes pkg-config
On docker container :
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add arm-unknown-linux-gnueabihf
root@aa6d9e933b0f:/home# ls /usr/lib/arm-linux-gnueabihf/pkgconfig
libudev.pc pthread-stubs.pc
build.sh:
#!/bin/sh
SYSROOT=
export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
export PKG_CONFIG_LIBDIR=${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${SYSROOT}
export PKG_CONFIG_ALLOW_CROSS=1
cargo build --target=arm-unknown-linux-gnueabihf