linux - 编译 WolfSSL 时出错

标签 linux ubuntu compiler-errors amqp coap

我是新手,我正在尝试为 Click Router 编译静态库,目前是 wolfSSL,我在 Ubuntu 17.10 上

我正在执行以下步骤:

  1. 克隆 wolfSSL GIT 存储库:

    cd clickDynCOAP
    git clone https://github.com/fvdnabee/wolfssl.git
    cd wolfssl
    git checkout click
    
  2. 编译 wolfSSL:

    [cd wolfssl]
    ./autogen.sh
    ./configure CFLAGS='-DWOLFSSL_STATIC_PSK' CXXFLAGS='-DWOLFSSL_STATIC_PSK' --enable-dtls --enable-aesccm --enable-psk --enable-static --enable-debug --enable-ipv6 --enable-ecc --enable-supportedcurves --enable-dsa --enable-tlsx --enable-opensslextra  --enable-fastmath
    make -j4
    

并给我以下错误

stefano@stefano-Lenovo-Y50:~/click/click-lpwan/clickDynCOAP/wolfssl$ make -j4
make -j9  all-am
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[1]: Entering directory '/home/stefano/click/click-lpwan/clickDynCOAP/wolfssl'
  CC       wolfcrypt/src/src_libwolfssl_la-signature.lo
  CC       src/src_libwolfssl_la-ssl.lo
  CC       examples/selectserver/selectserver.o
  CC       examples/client/client.o
  CC       examples/server/server.o
  CC       examples/echoclient/echoclient.o
  CC       examples/client/testsuite_testsuite_test-client.o
  CC       src/src_libwolfssl_la-internal.lo
  CC       examples/echoserver/echoserver.o
In file included from examples/client/client.c:52:0:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
In file included from ./cyassl/test.h:3:0,
                 from examples/selectserver/selectserver.c:5:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
In file included from ./cyassl/test.h:3:0,
                 from examples/echoclient/echoclient.c:51:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
In file included from ./cyassl/test.h:3:0,
                 from examples/server/server.c:54:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
In file included from examples/client/client.c:52:0:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
In file included from ./cyassl/test.h:3:0,
                 from examples/echoserver/echoserver.c:48:
./wolfssl/test.h: In function ‘build_addr’:
./wolfssl/test.h:600:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (peer == INADDR_ANY)
              ^~
./wolfssl/test.h:600:9: note: did you mean to dereference the pointer?
     if (peer == INADDR_ANY)
         ^
cc1: all warnings being treated as errors
Makefile:2396: recipe for target 'examples/selectserver/selectserver.o' failed
make[1]: *** [examples/selectserver/selectserver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
Makefile:2396: recipe for target 'examples/echoclient/echoclient.o' failed
make[1]: *** [examples/echoclient/echoclient.o] Error 1
Makefile:2396: recipe for target 'examples/echoserver/echoserver.o' failed
make[1]: *** [examples/echoserver/echoserver.o] Error 1
cc1: all warnings being treated as errors
cc1: all warnings being treated as errors
Makefile:3015: recipe for target 'examples/client/testsuite_testsuite_test-client.o' failed
make[1]: *** [examples/client/testsuite_testsuite_test-client.o] Error 1
Makefile:2396: recipe for target 'examples/server/server.o' failed
make[1]: *** [examples/server/server.o] Error 1
cc1: all warnings being treated as errors
Makefile:2396: recipe for target 'examples/client/client.o' failed
make[1]: *** [examples/client/client.o] Error 1
wolfcrypt/src/signature.c: In function ‘wc_SignatureVerify’:
wolfcrypt/src/signature.c:195:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 if (ret < 0) {
                    ^
wolfcrypt/src/signature.c:202:13: note: here
             case WC_SIGNATURE_TYPE_RSA:
             ^~~~
wolfcrypt/src/signature.c: In function ‘wc_SignatureGenerate’:
wolfcrypt/src/signature.c:312:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 if (ret < 0) {
                    ^
wolfcrypt/src/signature.c:319:13: note: here
             case WC_SIGNATURE_TYPE_RSA:
             ^~~~
cc1: all warnings being treated as errors
Makefile:2609: recipe for target 'wolfcrypt/src/src_libwolfssl_la-signature.lo' failed
make[1]: *** [wolfcrypt/src/src_libwolfssl_la-signature.lo] Error 1
src/ssl.c: In function ‘wolfSSL_connect’:
src/ssl.c:6866:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: CLIENT_HELLO_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6868:9: note: here
         case CLIENT_HELLO_SENT :
         ^~~~
src/ssl.c:6895:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: HELLO_AGAIN");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6897:9: note: here
         case HELLO_AGAIN :
         ^~~~
src/ssl.c:6943:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: HELLO_AGAIN_REPLY");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6945:9: note: here
         case HELLO_AGAIN_REPLY :
         ^~~~
src/ssl.c:6966:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: FIRST_REPLY_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6968:9: note: here
         case FIRST_REPLY_DONE :
         ^~~~
src/ssl.c:6980:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: FIRST_REPLY_FIRST");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6982:9: note: here
         case FIRST_REPLY_FIRST :
         ^~~~
src/ssl.c:6992:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: FIRST_REPLY_SECOND");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:6994:9: note: here
         case FIRST_REPLY_SECOND :
         ^~~~
src/ssl.c:7005:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: FIRST_REPLY_THIRD");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7007:9: note: here
         case FIRST_REPLY_THIRD :
         ^~~~
src/ssl.c:7014:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: FIRST_REPLY_FOURTH");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7016:9: note: here
         case FIRST_REPLY_FOURTH :
         ^~~~
src/ssl.c:7034:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("connect state: SECOND_REPLY_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7036:9: note: here
         case SECOND_REPLY_DONE:
         ^~~~
src/ssl.c: In function ‘wolfSSL_accept’:
src/ssl.c:7229:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state ACCEPT_CLIENT_HELLO_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7231:9: note: here
         case ACCEPT_CLIENT_HELLO_DONE :
         ^~~~
src/ssl.c:7233:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state ACCEPT_FIRST_REPLY_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7235:9: note: here
         case ACCEPT_FIRST_REPLY_DONE :
         ^~~~
src/ssl.c:7241:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state SERVER_HELLO_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7243:9: note: here
         case SERVER_HELLO_SENT :
         ^~~~
src/ssl.c:7252:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state CERT_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7254:9: note: here
         case CERT_SENT :
         ^~~~
src/ssl.c:7263:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state CERT_STATUS_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7265:9: note: here
         case CERT_STATUS_SENT :
         ^~~~
src/ssl.c:7272:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state KEY_EXCHANGE_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7274:9: note: here
         case KEY_EXCHANGE_SENT :
         ^~~~
src/ssl.c:7284:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state CERT_REQ_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7286:9: note: here
         case CERT_REQ_SENT :
         ^~~~
src/ssl.c:7293:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state SERVER_HELLO_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7295:9: note: here
         case SERVER_HELLO_DONE :
         ^~~~
src/ssl.c:7304:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state  ACCEPT_SECOND_REPLY_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7306:9: note: here
         case ACCEPT_SECOND_REPLY_DONE :
         ^~~~
src/ssl.c:7316:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state  TICKET_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7318:9: note: here
         case TICKET_SENT:
         ^~~~
src/ssl.c:7324:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state  CHANGE_CIPHER_SENT");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7326:9: note: here
         case CHANGE_CIPHER_SENT :
         ^~~~
src/ssl.c:7333:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state ACCEPT_FINISHED_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7335:9: note: here
         case ACCEPT_FINISHED_DONE :
         ^~~~
src/ssl.c:7344:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
             WOLFSSL_MSG("accept state ACCEPT_THIRD_REPLY_DONE");
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ssl.c:7346:9: note: here
         case ACCEPT_THIRD_REPLY_DONE :
         ^~~~
src/internal.c: In function ‘ProcessReply’:
src/internal.c:9081:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
             if (!ssl->options.dtls) {
                ^
src/internal.c:9168:9: note: here
         case getRecordLayerHeader:
         ^~~~
src/internal.c:9192:39: error: this statement may fall through [-Werror=implicit-fallthrough=]
             ssl->options.processReply = getData;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
src/internal.c:9195:9: note: here
         case getData:
         ^~~~
src/internal.c:9213:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
             startIdx = ssl->buffers.inputBuffer.idx;  /* in case > 1 msg per */
             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/internal.c:9216:9: note: here
         case runProcessingOneMessage:
         ^~~~
src/internal.c: In function ‘SendServerKeyExchange’:
src/internal.c:16080:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_BUILD;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
src/internal.c:16083:13: note: here
             case KEYSHARE_BUILD:
             ^~~~
src/internal.c:16862:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_VERIFY;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
src/internal.c:16865:13: note: here
             case KEYSHARE_VERIFY:
             ^~~~
src/internal.c:16956:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_FINALIZE;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
src/internal.c:16959:13: note: here
             case KEYSHARE_FINALIZE:
             ^~~~
src/internal.c:17024:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_END;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
src/internal.c:17027:13: note: here
             case KEYSHARE_END:
             ^~~~
src/internal.c: In function ‘DoClientKeyExchange’:
src/internal.c:18460:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_BUILD;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
src/internal.c:18463:13: note: here
             case KEYSHARE_BUILD:
             ^~~~
src/internal.c:18899:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_VERIFY;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
src/internal.c:18902:13: note: here
             case KEYSHARE_VERIFY:
             ^~~~
src/internal.c:18995:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_FINALIZE;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
src/internal.c:18998:13: note: here
             case KEYSHARE_FINALIZE:
             ^~~~
src/internal.c:19033:44: error: this statement may fall through [-Werror=implicit-fallthrough=]
                 ssl->options.keyShareState = KEYSHARE_END;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
src/internal.c:19036:13: note: here
             case KEYSHARE_END:
             ^~~~
cc1: all warnings being treated as errors
Makefile:2840: recipe for target 'src/src_libwolfssl_la-internal.lo' failed
make[1]: *** [src/src_libwolfssl_la-internal.lo] Error 1
cc1: all warnings being treated as errors
Makefile:2861: recipe for target 'src/src_libwolfssl_la-ssl.lo' failed
make[1]: *** [src/src_libwolfssl_la-ssl.lo] Error 1
make[1]: Leaving directory '/home/stefano/click/click-lpwan/clickDynCOAP/wolfssl'
Makefile:1720: recipe for target 'all' failed
make: *** [all] Error 2

我能做什么?

最佳答案

你使用 git clone https://github.com/fvdnabee/wolfssl.git 有什么原因吗?而不是 wolfSSL 的实际来源?

https://github.com/wolfssl/wolfssl.git

该分支上的版本是 v3.9.8,从 2015 年 4 月开始。您可以尝试同样的测试但使用 wolfSSL 实际分支并让我们知道您的结果吗?

  • K

关于linux - 编译 WolfSSL 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49491032/

相关文章:

linux - 尝试为 ARM 构建 GDB 时出错

Python 视频缩略图,但具有易于获得的库(没有 PyMedia!)

docker - Nginx docker 容器在 Ubuntu 20.04 中退出并出现错误 “fopen:No such file or directory:fopen('/etc/nginx/ssl/live/test.example.dev/fullchain.pem'”

java - 不兼容的类型在 Java 中初始化泛型类型的堆栈

c++ - 使用递归的数组总和中的错误(编译和运行时)

linux - 根据linux中的字符位置排序

Linux ALSA snd_pcm_writei 时序

同时计算来自多个客户端的数据

ubuntu - 禁用 SSH 的密码验证

vb.net - 条件编译常数VB