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

Build failed on gcc 7.1.0 #51

Open
amoghe opened this issue Jun 8, 2017 · 0 comments
Open

Build failed on gcc 7.1.0 #51

amoghe opened this issue Jun 8, 2017 · 0 comments

Comments

@amoghe
Copy link

amoghe commented Jun 8, 2017

Apart from the previously mentioned issue in detecting gcc version (see #22), the build fails due to this:

crypto/crypto_utils.c: In function 'HMAC_CTX_copy':
crypto/crypto_utils.c:109:28: error: dereferencing pointer to incomplete type 'HMAC_CTX {aka struct hmac_ctx_st}'
  if (!EVP_MD_CTX_copy(&dctx->i_ctx, &sctx->i_ctx))
                            ^~
crypto/crypto_utils.c: In function 'PKCS5_PBKDF2_HMAC':
crypto/crypto_utils.c:131:11: error: storage size of 'hctx' isn't known
  HMAC_CTX hctx;
           ^~~~
crypto/crypto_utils.c:137:2: warning: implicit declaration of function 'HMAC_CTX_init'; did you mean 'HMAC_CTX_new'? [-Wimplicit-function-declaration]
  HMAC_CTX_init(&hctx);
  ^~~~~~~~~~~~~
  HMAC_CTX_new
crypto/crypto_utils.c:173:2: warning: implicit declaration of function 'HMAC_CTX_cleanup'; did you mean 'HMAC_CTX_get_md'? [-Wimplicit-function-declaration]
  HMAC_CTX_cleanup(&hctx);
  ^~~~~~~~~~~~~~~~
  HMAC_CTX_get_md
crypto/crypto_utils.c:131:11: warning: unused variable 'hctx' [-Wunused-variable]
  HMAC_CTX hctx;
           ^~~~
crypto/crypto_utils.c: In function 'hmac_init':
crypto/crypto_utils.c:485:47: error: invalid application of 'sizeof' to incomplete type 'HMAC_CTX {aka struct hmac_ctx_st}'
    HMAC_CTX *ctx = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
                                               ^~~~~~~~
crypto/crypto_utils.c:491:37: error: invalid application of 'sizeof' to incomplete type 'HMAC_CTX {aka struct hmac_ctx_st}'
    ctx = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
                                     ^~~~~~~~
crypto/crypto_utils.c:518:47: error: invalid application of 'sizeof' to incomplete type 'HMAC_CTX {aka struct hmac_ctx_st}'
    HMAC_CTX *ctx = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
                                               ^~~~~~~~
crypto/crypto_utils.c:524:37: error: invalid application of 'sizeof' to incomplete type 'HMAC_CTX {aka struct hmac_ctx_st}'
    ctx = (HMAC_CTX *)malloc(sizeof (HMAC_CTX));
                                     ^~~~~~~~
Makefile:305: recipe for target 'crypto/crypto_utils.o' failed
make: *** [crypto/crypto_utils.o] Error 1

To reproduce this, I used a container:

docker pull gcc
docker run -it gcc /bin/bash
# Download tarball from https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pcompress/pcompress-2.4.tar.bz2
# This is 2.4, from several years ago -- maybe I just need to try with HEAD
apt-get install yasm
./config && make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant