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

[py2.7] pip install uwsgi2.0.14 failure. compile error in 'core/ssl.c' #1468

Closed
cupen opened this issue Feb 10, 2017 · 3 comments
Closed

[py2.7] pip install uwsgi2.0.14 failure. compile error in 'core/ssl.c' #1468

cupen opened this issue Feb 10, 2017 · 3 comments

Comments

@cupen
Copy link

cupen commented Feb 10, 2017

My env:

  • centos 6.5
  • python2.7.13
  • pip 9.0.1
  • gcc 4.4.7

C packages:

  • openssl 1.0.1e
  • pcre 7.8
.......
    [thread 2][gcc -pthread] core/sharedarea.o
    [thread 1][gcc -pthread] core/rpc.o
    [thread 3][gcc -pthread] core/gateway.o
    [thread 1][gcc -pthread] core/loop.o
    [thread 2][gcc -pthread] core/cookie.o
    [thread 3][gcc -pthread] core/querystring.o
    [thread 0][gcc -pthread] core/rb_timers.o
    [thread 1][gcc -pthread] core/transformations.o
    [thread 2][gcc -pthread] core/uwsgi.o
    [thread 3][gcc -pthread] proto/base.o
    [thread 1][gcc -pthread] proto/uwsgi.o
    [thread 0][gcc -pthread] proto/http.o
    [thread 3][gcc -pthread] proto/fastcgi.o
    [thread 1][gcc -pthread] proto/scgi.o
    [thread 1][gcc -pthread] proto/puwsgi.o
    [thread 3][gcc -pthread] lib/linux_ns.o
    [thread 0][gcc -pthread] core/zlib.o
    [thread 1][gcc -pthread] core/regexp.o
    [thread 3][gcc -pthread] core/routing.o
    [thread 0][gcc -pthread] core/yaml.o
    [thread 1][gcc -pthread] core/ssl.o
    [thread 0][gcc -pthread] core/legion.o
    core/ssl.c: In function ‘uwsgi_ssl_init’:
    core/ssl.c:17: warning: ‘OPENSSL_config’ is deprecated (declared at /usr/local/include/openssl/conf.h:92)
    core/ssl.c: In function ‘uwsgi_ssl_info_cb’:
    core/ssl.c:26: error: dereferencing pointer to incomplete type
    core/ssl.c:27: error: dereferencing pointer to incomplete type
    core/ssl.c: In function ‘uwsgi_ssl_session_new_cb’:
    core/ssl.c:62: error: dereferencing pointer to incomplete type
    core/ssl.c:62: error: dereferencing pointer to incomplete type
    core/ssl.c: In function ‘uwsgi_ssl_session_remove_cb’:
    core/ssl.c:96: error: dereferencing pointer to incomplete type
    core/ssl.c:96: error: dereferencing pointer to incomplete type
    core/ssl.c: In function ‘uwsgi_ssl_new_server_context’:
    core/ssl.c:408: warning: passing argument 2 of ‘SSL_CTX_sess_set_get_cb’ from incompatible pointer type
    /usr/local/include/openssl/ssl.h:618: note: expected ‘struct SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int,  int *)’ but argument is of type ‘struct SSL_SESSION * (*)(struct SSL *, unsigned char *, int,  int *)’
    core/legion.c: In function ‘uwsgi_legion_register’:
    core/legion.c:1077: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’
    core/legion.c:1112: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX’

    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eLz6iK/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-NONXy_-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-eLz6iK/uwsgi/

@cupen cupen changed the title pip install uwsgi2.0.14 failure. there's some compile error in 'core/ssl.c' [py2.7] pip install uwsgi2.0.14 failure. compile error in 'core/ssl.c' Feb 11, 2017
@jakabk
Copy link

jakabk commented Feb 17, 2017

I have similar problem with

  • Debian 9
  • python 2.7.13
  • pip 9.0.1
  • gcc 6.3.0
  • openssl 1.1.0d

pip install uwsgi fails # uWSGI (2.0.14)
pip install https://github.com/unbit/uwsgi/archive/uwsgi-2.0.zip works # uWSGI-2.0.14

log

     In file included from /usr/include/openssl/crypto.h:32:0,
                     from /usr/include/openssl/bio.h:20,
                     from /usr/include/openssl/conf.h:13,
                     from ./uwsgi.h:356,
                     from core/ssl.c:1:
    /usr/include/openssl/conf.h:92:1: note: declared here
     DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))

    core/ssl.c: In function ‘uwsgi_ssl_info_cb’:
    core/ssl.c:26:24: error: dereferencing pointer to incomplete type ‘SSL {aka const struct ssl_st}’
                     if (ssl->s3) {
    core/ssl.c: In function ‘uwsgi_ssl_session_new_cb’:
    core/ssl.c:62:69: error: dereferencing pointer to incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
             if (uwsgi_cache_set2(uwsgi.ssl_sessions_cache, (char *) sess->session_id, sess->session_id_length, session_blob, len, uwsgi.ssl_sessions_timeout, 0)) {
    core/ssl.c: In function ‘uwsgi_ssl_new_server_context’:
    core/ssl.c:408:46: warning: passing argument 2 of ‘SSL_CTX_sess_set_get_cb’ from incompatible pointer type [-Wincompatible-pointer-types]
                     SSL_CTX_sess_set_get_cb(ctx, uwsgi_ssl_session_get_cb);
    In file included from ./uwsgi.h:357:0,
                     from core/ssl.c:1:
    /usr/include/openssl/ssl.h:621:6: note: expected ‘SSL_SESSION * (*)(struct ssl_st *, const unsigned char *, int,  int *) {aka struct ssl_session_st * (*)(struct ssl_st *, const unsigned char *, int,  int *)}’ but argument is of type ‘SSL_SESSION * (*)(SSL *, unsigned char *, int,  int *) {aka struct ssl_session_st * (*)(struct ssl_st *, unsigned char *, int,  int *)}’
     void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
    core/legion.c: In function ‘uwsgi_legion_register’:
    core/legion.c:1077:44: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
      EVP_CIPHER_CTX *ctx = uwsgi_malloc(sizeof(EVP_CIPHER_CTX));
    core/legion.c:1112:45: error: invalid application of ‘sizeof’ to incomplete type ‘EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}’
      EVP_CIPHER_CTX *ctx2 = uwsgi_malloc(sizeof(EVP_CIPHER_CTX));

@xrmx
Copy link
Collaborator

xrmx commented Feb 18, 2017

Openssl 1.1.0 compatibility will come with uwsgi 2.0.15

@cupen
Copy link
Author

cupen commented Feb 21, 2017

[cupen@tank ~]$ ll /usr/lib64/ | grep ssl
-rw-r--r--.  1 root root  249368   16 2013 libssl3.so
-rw-r--r--.  1 root root  762152    9 20:11 libssl.a
lrwxrwxrwx.  1 root root      16    9 21:01 libssl.so -> libssl.so.1.0.1e
lrwxrwxrwx.  1 root root      16    9 21:01 libssl.so.10 -> libssl.so.1.0.1e
-rwxr-xr-x.  1 root root  445416   27 20:30 libssl.so.1.0.1e
-rwxr-xr-x.  1 root root  513052    9 20:11 libssl.so.1.1
drwxr-xr-x.  3 root root    4096   27 20:29 openssl
drwxr-xr-x.  3 root root    4096    4 11:34 openssl098e

@xrmx Oh, I see. Both of the OpenSSL 1.0.1e and OpenSSL 1.1.0 was installed in my env.
It works fine after remove the includes of OpenSSL 1.1.0,
Thank you very much.

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

3 participants