Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openwrt 15.05错误 #15

Closed
darcyg opened this issue Oct 10, 2016 · 2 comments
Closed

openwrt 15.05错误 #15

darcyg opened this issue Oct 10, 2016 · 2 comments
Labels

Comments

@darcyg
Copy link

darcyg commented Oct 10, 2016

我的openwrt是基于15.05的
原来的libwebsocket的版本低。
我已经升级到1.6.0
但是cmake出错,提示版本不对

s/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2 -DCMAKE_PREFIX_PATH=/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2 -DCMAKE_SKIP_RPATH=TRUE . )
-- The C compiler identification is GNU 4.8.3
-- The CXX compiler identification is GNU 4.8.3
-- Check for working C compiler: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-gcc
-- Check for working C compiler: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-g++
-- Check for working CXX compiler: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-uclibc-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found OpenSSL: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libssl.so;/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libcrypto.so (found version "1.0.2j")
-- Found PkgConfig: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/host/bin/pkg-config (found version "0.29")
-- checking for module 'libwebsockets>=1.6'
-- package 'libwebsockets>=1.6' not found
CMake Error at /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/host/share/cmake-2.8/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/host/share/cmake-2.8/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:22 (pkg_check_modules)

-- Found LIBWEBSOCKETS: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libwebsockets.so
-- Looking for lws_config.h
-- Looking for lws_config.h - found
-- checking for module 'json-c'
-- found json-c, version 0.12
-- Found JSON-C: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib/libjson-c.so
-- Configuring incomplete, errors occurred!
See also "/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/CMakeFiles/CMakeOutput.log".
make[2]: *** [/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/.configured_yyyynnnnnny] Error 1
make[2]: Leaving directory /works/openwrt/packages/scpackages/utils/ttyd' make[1]: *** [package/feeds/scpack/ttyd/compile] Error 2 make[1]: Leaving directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c'
make: *** [package/ttyd/compile] 错误 2

屏蔽cmake中的版本限制后

-- Configuring done
-- Generating done
-- Build files have been written to: /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb
rm -f /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/.configured_*
touch /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/.configured_yyyynnnnnny
CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/usr/lib -L/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/lib -L/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/usr/lib -L/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/lib " make -j1 -C /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/. AR="mipsel-openwrt-linux-uclibc-gcc-ar" AS="mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kec -mdsp -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float" LD=mipsel-openwrt-linux-uclibc-ld NM="mipsel-openwrt-linux-uclibc-gcc-nm" CC="mipsel-openwrt-linux-uclibc-gcc" GCC="mipsel-openwrt-linux-uclibc-gcc" CXX="mipsel-openwrt-linux-uclibc-g++" RANLIB="mipsel-openwrt-linux-uclibc-gcc-ranlib" STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" ;
make[3]: Entering directory /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb' make[4]: Entering directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb'
make[5]: Entering directory /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb' [ 20%] Generating html.h from index.html Scanning dependencies of target ttyd make[5]: Leaving directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb'
make[5]: Entering directory /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb' [ 40%] Building C object CMakeFiles/ttyd.dir/src/server.c.o /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:18:32: error: 'lws_extension_callback_pm_deflate' undeclared here (not in a function) {"permessage-deflate", lws_extension_callback_pm_deflate, "permessage-deflate"}, ^ /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:18:9: warning: initialization makes integer from pointer without a cast [enabled by default] {"permessage-deflate", lws_extension_callback_pm_deflate, "permessage-deflate"}, ^ /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:18:9: warning: (near initialization for 'extensions[0].per_session_data_size') [enabled by default] /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:19:9: warning: initialization makes integer from pointer without a cast [enabled by default] {"deflate-frame", lws_extension_callback_pm_deflate, "deflate_frame"}, ^ /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:19:9: warning: (near initialization for 'extensions[1].per_session_data_size') [enabled by default] /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:20:9: warning: initialization makes integer from pointer without a cast [enabled by default] {NULL, NULL, NULL} ^ /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:20:9: warning: (near initialization for 'extensions[2].per_session_data_size') [enabled by default] /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c: In function 'main': /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/src/server.c:181:9: error: 'struct lws_context_creation_info' has no member named 'timeout_secs' info.timeout_secs = 5; ^ make[5]: *** [CMakeFiles/ttyd.dir/src/server.c.o] Error 1 make[5]: Leaving directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb'
make[4]: *** [CMakeFiles/ttyd.dir/all] Error 2
make[4]: Leaving directory /works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb' make[3]: *** [all] Error 2 make[3]: Leaving directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb'
make[2]: *** [/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/ttyd-e6bea9410c4731b39fe4790030269b1ac45f8dcb/.built] Error 2
make[2]: Leaving directory /works/openwrt/packages/scpackages/utils/ttyd' make[1]: *** [package/feeds/scpack/ttyd/compile] Error 2 make[1]: Leaving directory/works/openwrt/works/openwrt_splctrl_2016-10-09_b21852c'
make: *** [package/ttyd/compile] 错误 2

@tsl0922
Copy link
Owner

tsl0922 commented Oct 10, 2016

libwebsockets 官方目前维护 1.7.x 和 2.0.x 两个分支,ttyd 只对这两个分支的最新版本做测试 (travis-ci 项目地址),所以推荐你使用最新版本,或者使用 openwrt 最新的 package feed。

@darcyg
Copy link
Author

darcyg commented Oct 11, 2016

换了最新的2.10.0,增加了编译参数c99(默认的没起效)后,问题解决

@darcyg darcyg closed this as completed Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants