GithubHelp home page GithubHelp logo

Comments (5)

1756816846 avatar 1756816846 commented on May 26, 2024

I used -- disable benchmark to compile Wolfssl successfully, but now there is an error in compiling the demo

└─# /etc/xcompile/armv5l/bin/armv5l-gcc -o demo demo.c -lwolfssl -static -lpthread -lm -DWC_NO_HARDEN

In file included from /etc/xcompile/armv5l/bin/../include/wolfssl/wolfcrypt/hash.h:41,
from /etc/xcompile/armv5l/bin/../include/wolfssl/wolfcrypt/hmac.h:29,
from /etc/xcompile/armv5l/bin/../include/wolfssl/openssl/compat_types.h:31,
from /etc/xcompile/armv5l/bin/../include/wolfssl/ssl.h:42,
from demo.c:40:
/etc/xcompile/armv5l/bin/../include/wolfssl/wolfcrypt/sha512.h:141: error: expected specifier-qualifier-list before 'word64'
In file included from /etc/xcompile/armv5l/bin/../include/wolfssl/openssl/ssl.h:46,
from /etc/xcompile/armv5l/bin/../include/wolfssl/openssl/asn1.h:27,
from /etc/xcompile/armv5l/bin/../include/wolfssl/ssl.h:4178,
from demo.c:40:
/etc/xcompile/armv5l/bin/../include/wolfssl/openssl/crypto.h:71: error: expected ')' before 'opts'
In file included from demo.c:40:
/etc/xcompile/armv5l/bin/../include/wolfssl/ssl.h:4952: error: expected ')' before 'opts'

from wolfssl.

kareem-wolfssl avatar kareem-wolfssl commented on May 26, 2024

Hi @1756816846 ,

It looks like you are linking wolfSSL to your application and seeing build errors there. You need to include our options.h and settings.h headers before all other wolf/OpenSSL headers in all files which include these headers:

#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/settings.h>

I would also recommend removing WC_NO_HARDEN as this define should not be needed.

from wolfssl.

1756816846 avatar 1756816846 commented on May 26, 2024

#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>

/include/wolfssl/wolfcrypt/sha512.h:141: error: expected specifier-qualifier-list before 'word64'

from wolfssl.

dgarske avatar dgarske commented on May 26, 2024

Hi @1756816846 ,

The SHA2-512 requires a 64-bit type. Most 32-bit systems support a "long long" or "uint64_t". I suspect your compiler and configure is not properly detecting "long long" as 64-bit.

You can try adding CFLAGS="-DSIZEOF_LONG_LONG=8" to the ./configure.

If that doesn't work please share your config.log from ./configure.

Thanks,
David Garske, wolfSSL

from wolfssl.

1756816846 avatar 1756816846 commented on May 26, 2024

Yes, you have successfully helped me solve this problem. Thank you

from wolfssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.