Closed qianchenzhumeng closed 3 years ago
Well, it doesn't seem to be able to compile the Paho C library due to the missing header file, <gnu/stubs.h>
It may be worth trying to build the C library separately to see if you can do so with your toolchain and, if not, see if the C lib folks can help us out.
From the build.rs
in our -sys crate, we see that we're just using CMake to build the C lib, with these options (keeping in mind that ssl
is true by default):
That converts to a CMake command like:
$ cmake -DPAHO_BUILD_SHARED=OFF -DPAHO_BUILD_STATIC=ON -DPAHO_ENABLE_TESTING=OFF \
-DPAHO_HIGH_PERFORMANCE=ON -DPAHO_WITH_SSL=ON ..
Thanks. I found it was my carelessness, my STAGING_DIR
was wrong. It should be /mnt/f/wsl/OpenWRT/OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2
.
Hello, I tried to cross compile some examples with mips-unknown-linux-uclibc on Ubuntu 20.04.1(Windows Subsystem for Linux), but it didn't work. But on my other computer(Ubuntu 16.04.3, Windows Subsystem for Linux), it can work.
My rust toolchain is a custom toolchain builded from rust source(tag: 1.46.0) with adding mips-unknown-linux-uclibc target.
Searching for head file from
/usr/include/
is strange. Normally, it should search for head file from$STAGING_DIR/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include
.