Здравствуйте, я програмист и я не умею компилировать. Прошу вашей помощи.
Пытаюсь собрать mosquitto с подержкой libwebsockets. Командую cmake установить всё в директорию ~/local.
Libwebsocket собрался и установился:
cd ~/Downloads/libwebsocket
cmake -D CMAKE_INSTALL_PREFIX=~/local ./
cmake --build ./ --target install
Точно такими же командами собираю mosquitto (предварительно перейдя в директорию с ним) А он ругается, что не может найти libwebsockets.h. Хотя файл ~/local/include/libwebsockets.h существует.
А в манах написано, что "The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so that find_package, find_program, find_library, find_path, and find_file will search the prefix for other software"
Полный текст ошибки:
[34/57] Building C object src/CMakeFiles/mosquitto.dir/loop.c.o FAILED: /usr/bin/cc -DCMAKE -DTIMESTAMP=«\„2015-08-27 16:30:38+0900\“» -DVERSION=\«1.4.3\» -DWITH_BRIDGE -DWITH_BROKER -DWITH_MEMORY_TRACKING -DWITH_PERSISTENCE -DWITH_SYS_TREE -DWITH_UUID -DWITH_WEBSOCKETS -I. -Isrc -Ilib -MMD -MT src/CMakeFiles/mosquitto.dir/loop.c.o -MF src/CMakeFiles/mosquitto.dir/loop.c.o.d -o src/CMakeFiles/mosquitto.dir/loop.c.o -c src/loop.c src/loop.c:40:29: fatal error: libwebsockets.h: No such file or directory compilation terminated. [34/57] Building C object src/CMakeFiles/mosquitto.dir/mosquitto.c.o FAILED: /usr/bin/cc -DCMAKE -DTIMESTAMP=«\„2015-08-27 16:30:38+0900\“» -DVERSION=\«1.4.3\» -DWITH_BRIDGE -DWITH_BROKER -DWITH_MEMORY_TRACKING -DWITH_PERSISTENCE -DWITH_SYS_TREE -DWITH_UUID -DWITH_WEBSOCKETS -I. -Isrc -Ilib -MMD -MT src/CMakeFiles/mosquitto.dir/mosquitto.c.o -MF src/CMakeFiles/mosquitto.dir/mosquitto.c.o.d -o src/CMakeFiles/mosquitto.dir/mosquitto.c.o -c src/mosquitto.c In file included from /usr/include/unistd.h:25:0, from src/mosquitto.c:22: /usr/include/features.h:148:3: warning: #warning «_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE» [-Wcpp] # warning «_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE» ^ src/mosquitto.c:46:29: fatal error: libwebsockets.h: No such file or directory compilation terminated. [34/57] Building C object src/CMakeFiles/mosquitto.dir/logging.c.o ninja: build stopped: subcommand failed.