0

I cross compiled libuv successfully and I'm trying to cross compile libwebsockets but I get the following error in make for arm with a buildroot toolchain. Please advise.

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
Myst
  • 18,516
  • 2
  • 45
  • 67
MLB
  • 1
  • 2

1 Answers1

3

Why are you building libwebsockets manually, instead of using the libwebsockets package that we have in Buildroot ?

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • I need libwebsockets 3.0 instead of 2.4 that's included with buildroot. I tried it with buildroot after changing the version but still I get the same error. Thanks for any help. – MLB Jul 24 '18 at 10:54