0

我成功交叉编译了 libuv,我正在尝试交叉编译 libwebsockets,但我在使用 buildroot 工具链的 make for arm 中得到以下错误。请指教。

libwebsockets
    cmake .. \
        -DCMAKE_TOOLCHAIN_FILE=~/buildroot/output/host/share/buildroot/toolchainfile.cmake \
        -DLWS_LIBUV_INCLUDE_DIRS=/tmp/cross/include \
        -DLWS_ZLIB_LIBRARIES=/tmp/cross/lib/libuv.so
    make


[ 31%] Building C object CMakeFiles/websockets_shared.dir/lib/roles/http/server/server.c.o
[ 32%] Building C object CMakeFiles/websockets_shared.dir/lib/roles/http/server/lws-spa.c.o
[ 33%] Building C object CMakeFiles/websockets_shared.dir/lib/event-libs/poll/poll.c.o
[ 33%] Building C object CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o
~/libwebsockets/lib/event-libs/libuv/libuv.c: In function ‘elops_destroy_context1_uv’:
~/libwebsockets/lib/event-libs/libuv/libuv.c:526:7: error: ‘m’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if (m)
       ^
cc1: all warnings being treated as errors
CMakeFiles/websockets_shared.dir/build.make:1166: recipe for target 'CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o' failed
make[2]: *** [CMakeFiles/websockets_shared.dir/lib/event-libs/libuv/libuv.c.o] Error 1
CMakeFiles/Makefile2:363: recipe for target 'CMakeFiles/websockets_shared.dir/all' failed
make[1]: *** [CMakeFiles/websockets_shared.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
4

1 回答 1

3

为什么要手动构建 libwebsockets,而不是使用libwebsockets我们在 Buildroot 中的包?

于 2018-07-18T14:01:00.150 回答