'/usr/bin/gcc' failed with exit code 1 while installing cryptography package python on Python:3.7-alpine - python-3.x

Error stack trace
creating build/temp.linux-aarch64-cpython-37/build
#9 13.81 creating build/temp.linux-aarch64-cpython-37/build/temp.linux-aarch64-cpython-37
#9 13.81 gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.7m -c build/temp.linux-aarch64-cpython-37/_openssl.c -o build/temp.linux-aarch64-cpython-37/build/temp.linux-aarch64-cpython-37/_openssl.o -Wconversion -Wno-error=sign-conversion
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:2183:7: error: 'EVP_PKEY_CTX_set_rsa_oaep_md' redeclared as different kind of symbol
#9 13.81 2183 | int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 In file included from /usr/include/openssl/x509.h:36,
#9 13.81 from /usr/include/openssl/ct.h:29,
#9 13.81 from build/temp.linux-aarch64-cpython-37/_openssl.c:636:
#9 13.81 /usr/include/openssl/rsa.h:158:5: note: previous declaration of 'EVP_PKEY_CTX_set_rsa_oaep_md' with type 'int(EVP_PKEY_CTX *, const EVP_MD *)' {aka 'int(struct evp_pkey_ctx_st *, const struct evp_md_st *)'}
#9 13.81 158 | int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:2190:7: error: 'EVP_PKEY_CTX_set0_rsa_oaep_label' redeclared as different kind of symbol
#9 13.81 2190 | int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *,
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 /usr/include/openssl/rsa.h:164:5: note: previous declaration of 'EVP_PKEY_CTX_set0_rsa_oaep_label' with type 'int(EVP_PKEY_CTX *, void *, int)' {aka 'int(struct evp_pkey_ctx_st *, void *, int)'}
#9 13.81 164 | int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function 'Cryptography_pem_password_cb':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:2943:37: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion]
#9 13.81 2943 | memcpy(buf, st->password, st->length);
#9 13.81 | ~~^~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_DISABLE':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7085:12: error: 'CRYPTO_MEM_CHECK_DISABLE' undeclared (first use in this function); did you mean '_cffi_const_CRYPTO_MEM_CHECK_DISABLE'?
#9 13.81 7085 | int n = (CRYPTO_MEM_CHECK_DISABLE) <= 0;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 | _cffi_const_CRYPTO_MEM_CHECK_DISABLE
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7085:12: note: each undeclared identifier is reported only once for each function it appears in
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_ENABLE':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7092:12: error: 'CRYPTO_MEM_CHECK_ENABLE' undeclared (first use in this function); did you mean '_cffi_const_CRYPTO_MEM_CHECK_ENABLE'?
#9 13.81 7092 | int n = (CRYPTO_MEM_CHECK_ENABLE) <= 0;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 | _cffi_const_CRYPTO_MEM_CHECK_ENABLE
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_OFF':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7099:12: error: 'CRYPTO_MEM_CHECK_OFF' undeclared (first use in this function)
#9 13.81 7099 | int n = (CRYPTO_MEM_CHECK_OFF) <= 0;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_CRYPTO_MEM_CHECK_ON':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7106:12: error: 'CRYPTO_MEM_CHECK_ON' undeclared (first use in this function)
#9 13.81 7106 | int n = (CRYPTO_MEM_CHECK_ON) <= 0;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_const_EVP_R_KEYGEN_FAILURE':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:7886:12: error: 'EVP_R_KEYGEN_FAILURE' undeclared (first use in this function)
#9 13.81 7886 | int n = (EVP_R_KEYGEN_FAILURE) <= 0;
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_BIO_s_datagram':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:13688:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 13688 | return BIO_s_datagram();
#9 13.81 | ^~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_BIO_s_datagram':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:13699:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 13699 | { result = BIO_s_datagram(); }
#9 13.81 | ^
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_BIO_s_mem':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:13714:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 13714 | return BIO_s_mem();
#9 13.81 | ^~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_BIO_s_mem':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:13725:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 13725 | { result = BIO_s_mem(); }
#9 13.81 | ^
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_CRYPTO_mem_ctrl':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:16642:10: warning: implicit declaration of function 'CRYPTO_mem_ctrl'; did you mean 'CRYPTO_memcmp'? [-Wimplicit-function-declaration]
#9 13.81 16642 | return CRYPTO_mem_ctrl(x0);
#9 13.81 | ^~~~~~~~~~~~~~~
#9 13.81 | CRYPTO_memcmp
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_ERR_GET_FUNC':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:25626:10: warning: implicit declaration of function 'ERR_GET_FUNC'; did you mean 'ERR_GET_LIB'? [-Wimplicit-function-declaration]
#9 13.81 25626 | return ERR_GET_FUNC(x0);
#9 13.81 | ^~~~~~~~~~~~
#9 13.81 | ERR_GET_LIB
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_FIPS_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:31224:10: warning: implicit declaration of function 'FIPS_mode' [-Wimplicit-function-declaration]
#9 13.81 31224 | return FIPS_mode();
#9 13.81 | ^~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_FIPS_mode_set':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:31250:10: warning: implicit declaration of function 'FIPS_mode_set' [-Wimplicit-function-declaration]
#9 13.81 31250 | return FIPS_mode_set(x0);
#9 13.81 | ^~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_OCSP_resp_get0_certs':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:34338:10: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 34338 | return OCSP_resp_get0_certs(x0);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_OCSP_resp_get0_certs':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:34361:12: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#9 13.81 34361 | { result = OCSP_resp_get0_certs(x0); }
#9 13.81 | ^
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_add_extra_chain_cert':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:40821:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 40821 | return SSL_CTX_add_extra_chain_cert(x0, x1);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_add_extra_chain_cert':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:40859:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 40859 | { result = SSL_CTX_add_extra_chain_cert(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_get_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:41289:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 41289 | return SSL_CTX_get_mode(x0);
#9 13.81 | ^~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_get_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:41312:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 41312 | { result = SSL_CTX_get_mode(x0); }
#9 13.81 | ^~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_get_session_cache_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:41403:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 41403 | return SSL_CTX_get_session_cache_mode(x0);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_get_session_cache_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:41426:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 41426 | { result = SSL_CTX_get_session_cache_mode(x0); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43067:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43067 | return SSL_CTX_set_mode(x0, x1);
#9 13.81 | ^~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43067:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43100:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43100 | { result = SSL_CTX_set_mode(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43100:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 In file included from build/temp.linux-aarch64-cpython-37/_openssl.c:798:
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_session_cache_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43463:45: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43463 | return SSL_CTX_set_session_cache_mode(x0, x1);
#9 13.81 | ^~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43463:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43463 | return SSL_CTX_set_session_cache_mode(x0, x1);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_session_cache_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43496:49: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43496 | { result = SSL_CTX_set_session_cache_mode(x0, x1); }
#9 13.81 | ^~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43496:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43496 | { result = SSL_CTX_set_session_cache_mode(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_tmp_dh':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43869:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43869 | return SSL_CTX_set_tmp_dh(x0, x1);
#9 13.81 | ^~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_tmp_dh':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43907:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43907 | { result = SSL_CTX_set_tmp_dh(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_CTX_set_tmp_ecdh':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43922:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43922 | return SSL_CTX_set_tmp_ecdh(x0, x1);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_CTX_set_tmp_ecdh':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:43960:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 43960 | { result = SSL_CTX_set_tmp_ecdh(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_SESSION_get_ticket_lifetime_hint':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:44675:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 44675 | return SSL_SESSION_get_ticket_lifetime_hint(x0);
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_SESSION_get_ticket_lifetime_hint':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:44698:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 44698 | { result = SSL_SESSION_get_ticket_lifetime_hint(x0); }
#9 13.81 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_get_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:46091:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 46091 | return SSL_get_mode(x0);
#9 13.81 | ^~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_get_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:46114:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 46114 | { result = SSL_get_mode(x0); }
#9 13.81 | ^~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_SSL_set_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:47950:10: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 47950 | return SSL_set_mode(x0, x1);
#9 13.81 | ^~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:47950:10: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_f_SSL_set_mode':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:47983:14: warning: conversion to 'long int' from 'long unsigned int' may change the sign of the result [-Wsign-conversion]
#9 13.81 47983 | { result = SSL_set_mode(x0, x1); }
#9 13.81 | ^~~~~~~~~~~~
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:47983:14: warning: conversion to 'long unsigned int' from 'long int' may change the sign of the result [-Wsign-conversion]
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_EVP_PKEY_CTX_set_rsa_oaep_md':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:28273:1: warning: control reaches end of non-void function [-Wreturn-type]
#9 13.81 28273 | }
#9 13.81 | ^
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c: In function '_cffi_d_EVP_PKEY_CTX_set0_rsa_oaep_label':
#9 13.81 build/temp.linux-aarch64-cpython-37/_openssl.c:28161:1: warning: control reaches end of non-void function [-Wreturn-type]
#9 13.81 28161 | }
#9 13.81 | ^
#9 13.81 error: command '/usr/bin/gcc' failed with exit code 1
#9 13.81 [end of output]
#9 13.81
#9 13.81 note: This error originates from a subprocess, and is likely not a problem with pip.
#9 13.81 ERROR: Failed building wheel for cryptography
#9 13.81 Building wheel for cffi (setup.py): started
#9 17.02 Building wheel for cffi (setup.py): finished with status 'done'
#9 17.02 Created wheel for cffi: filename=cffi-1.15.1-cp37-cp37m-linux_aarch64.whl size=194157 sha256=4d9b4b781f90c9a48ba70d4b20376e205e3de1ad40ffc80a65e7b1760e68a019
#9 17.02 Stored in directory: /tmp/pip-ephem-wheel-cache-gz78zwhy/wheels/a1/3b/8e/0d937b639299138f2af58408c94c78bb6c18839c57d0ad8671
#9 17.02 Successfully built cffi
#9 17.02 Failed to build cryptography
#9 17.02 ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
Dockerfile
`
FROM python:3.7-alpine
RUN apk add libpq libxml2-dev libxslt-dev
RUN apk add --no-cache libffi-dev postgresql-dev gcc python3-dev musl-dev gfortran build-base wget freetype-dev libpng-dev openblas-dev mariadb-connector-c-dev \
# && ln -s /usr/include/locale.h /usr/include/xlocale.h
COPY requirements.txt requirements.txt
RUN /usr/local/bin/python3 -m pip install --no-cache --upgrade pip \
&& pip3 install --no-cache -r requirements.txt
COPY /crawlers /crawlers
COPY /config /config
COPY /src ./src
Copy credentials.storage credentials.storage
CMD python -m src.app --service import_prices --config ./src/config/docker_config.yml --store 1 --channel medizinfuchs --all True
`
I would like to install cryptography==2.4.2.
Things I've done already:
Tried to install later versions of cryptography (didn't work)
Tried fixing the version of pip when it worked (still didn't work)
added dependencies based here (didn't work)
Tried using other versions of Python (3.8)
I'm just torn on why this suddenly broke.

Solution
use crytography==3.4
this would require to add the following packages
$ sudo apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo
from cryptography documentation
My final Dockerfile looked like this:
FROM python:3.7-alpine
RUN apk add libpq libxml2-dev libxslt-dev
RUN apk add --no-cache libffi-dev postgresql-dev gcc g++ python3-dev musl-dev linux-headers make libc-dev openssl-dev cargo gfortran build-base wget freetype-dev libpng-dev openblas-dev mariadb-connector-c-dev \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
COPY requirements.txt requirements.txt
RUN /usr/local/bin/python3 -m pip install --no-cache --upgrade pip \
&& pip3 install -r requirements.txt
COPY /crawlers /crawlers
COPY /config /config
COPY /src ./src
Copy credentials.storage credentials.storage
CMD python -m src.app --service import_prices --config ./src/config/docker_config.yml --store 1 --channel medizinfuchs --all True

Related

Undetected platform due to Clang address' sanitizer?

I use clang 14.0.5 and link against what is provided by ocl-icd-devel (v 2.3.1) on a fedora 36 box. I am running on a x86-64 CPU attached to a gtx1050ti and the nvidia-smi report is given below:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05 Driver Version: 525.85.05 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 39C P8 N/A / N/A | 3MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
Assuming the code below:
#include <CL/cl.h>
#include <iostream>
int main() {
::cl_uint platform_count;
::clGetPlatformIDs(0, NULL, &platform_count);
std::cout << platform_count << "\n";
}
The clGetPlatformIDs function does not fail.
Compiled with clang++ test.cc -lOpenCL leads to the following output:
2
I indeed have two OpenCL platforms, Nvidia and Mesa, as properly reported by clinfo. This is the expected behavior.
Now, compiling with clang++ test.cc -lOpenCL -fsanitize=address leads to the following output:
1
=================================================================
==119688==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1120 byte(s) in 20 object(s) allocated from:
#0 0x4cfd97 in __interceptor_calloc (/../test+0x4cfd97) (BuildId: 66d5be805632cad14f58fab06c64ebed85d7da00)
#1 0x7f6d3ce7fad9 (/lib64/libnvidia-opencl.so.1+0x27fad9) (BuildId: ca94830f39da5d51a55258eb21cc484556b036b5)
Indirect leak of 1920 byte(s) in 20 object(s) allocated from:
#0 0x4cfd97 in __interceptor_calloc (/../test+0x4cfd97) (BuildId: 66d5be805632cad14f58fab06c64ebed85d7da00)
#1 0x7f6d3ce7faf4 (/lib64/libnvidia-opencl.so.1+0x27faf4) (BuildId: ca94830f39da5d51a55258eb21cc484556b036b5)
...
<cut for brievety>
This issue does not shows up if I target x86 (clang triple: i686--linux-), that is, I get two platforms. Though the sanitizer still catches potential memory leaks:
================================================================
==119438==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 880 byte(s) in 20 object(s) allocated from:
#0 0x8120c0b in __interceptor_calloc (/../test+0x8120c0b) (BuildId: 9b9e395397d659c010914e0c90e5d710fc95826d)
#1 0xf36bea17 (/lib/libnvidia-opencl.so.1+0x2bea17) (BuildId: 9ea2f83814d7ff837ade8227643aea1f94ba6908)
#2 0xf36944c3 (/lib/libnvidia-opencl.so.1+0x2944c3) (BuildId: 9ea2f83814d7ff837ade8227643aea1f94ba6908)
#3 0xf36a07a9 (/lib/libnvidia-opencl.so.1+0x2a07a9) (BuildId: 9ea2f83814d7ff837ade8227643aea1f94ba6908)
#4 0xf351358c (/lib/libnvidia-opencl.so.1+0x11358c) (BuildId: 9ea2f83814d7ff837ade8227643aea1f94ba6908)
...
<cut for brievety>
The same code in C leads to:
#include <CL/cl.h>
#include <stdio.h>
int main() {
cl_uint platform_count;
if(CL_SUCCESS == clGetPlatformIDs(0, NULL, &platform_count))
printf("%d\n", platform_count);
}
Which also fails but in a different way:
AddressSanitizer: CHECK failed: asan_interceptors.cpp:321 "((__interception::real___cxa_throw)) != (0)" (0x0, 0x0) (tid=72340)
#0 0x4d7a5a in __asan::CheckUnwind() asan_rtl.cpp.o
#1 0x4f3a0d in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/.../test+0x4f3a0d) (BuildId: 957a08089740f3382763ab916b58469c68e1b465)
#2 0x444804 in __interceptor___cxa_throw (/.../test+0x444804) (BuildId: 957a08089740f3382763ab916b58469c68e1b465)
#3 0x7faa03669d28 (/lib64/libMesaOpenCL.so.1+0x30d28) (BuildId: 810b5bd27dbdbfd1325bb221f29c97960f5b6183)
#4 0x7faa036a3699 (/lib64/libMesaOpenCL.so.1+0x6a699) (BuildId: 810b5bd27dbdbfd1325bb221f29c97960f5b6183)
#5 0x7faa0366d77c (/lib64/libMesaOpenCL.so.1+0x3477c) (BuildId: 810b5bd27dbdbfd1325bb221f29c97960f5b6183)
#6 0x7faa05df1f7d in call_init /usr/src/debug/glibc-2.35-22.fc36.x86_64/elf/dl-init.c:70:3
#7 0x7faa05df1f7d in call_init /usr/src/debug/glibc-2.35-22.fc36.x86_64/elf/dl-init.c:26:1
#8 0x7faa05df206b in _dl_init /usr/src/debug/glibc-2.35-22.fc36.x86_64/elf/dl-init.c:117:5
#9 0x7faa05b54773 in _dl_catch_exception (/lib64/libc.so.6+0x154773) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#10 0x7faa05df9195 in dl_open_worker /usr/src/debug/glibc-2.35-22.fc36.x86_64/elf/dl-open.c:808:5
#11 0x7faa05b5471d in _dl_catch_exception (/lib64/libc.so.6+0x15471d) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#12 0x7faa05df952b in _dl_open /usr/src/debug/glibc-2.35-22.fc36.x86_64/elf/dl-open.c:884:17
#13 0x7faa05a88edb in dlopen_doit (/lib64/libc.so.6+0x88edb) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#14 0x7faa05b5471d in _dl_catch_exception (/lib64/libc.so.6+0x15471d) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#15 0x7faa05b547d2 in _dl_catch_error (/lib64/libc.so.6+0x1547d2) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#16 0x7faa05a889ae in _dlerror_run (/lib64/libc.so.6+0x889ae) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#17 0x7faa05a88f90 in dlopen##GLIBC_2.34 (/lib64/libc.so.6+0x88f90) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#18 0x46c007 in __interceptor_dlopen.part.0 asan_interceptors.cpp.o
#19 0x7faa05dab8a5 (/lib64/libOpenCL.so.1+0xc8a5) (BuildId: 0ebfaaa96fdffe2b1aa490dea42c38ae14275426)
#20 0x7faa05daee70 (/lib64/libOpenCL.so.1+0xfe70) (BuildId: 0ebfaaa96fdffe2b1aa490dea42c38ae14275426)
#21 0x7faa05db0f73 in clGetPlatformIDs (/lib64/libOpenCL.so.1+0x11f73) (BuildId: 0ebfaaa96fdffe2b1aa490dea42c38ae14275426)
#22 0x511689 in main (/.../test+0x511689) (BuildId: 957a08089740f3382763ab916b58469c68e1b465)
#23 0x7faa05a2950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#24 0x7faa05a295c8 in __libc_start_main#GLIBC_2.2.5 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#25 0x41c304 in _start (/.../test+0x41c304) (BuildId: 957a08089740f3382763ab916b58469c68e1b465)
Finally, if I use the undefined sanitizer, I do not get the platform count issue nor reported undefined behavior.

problem with make command in arch linux (while trying to install RTL8723DE driver)

make -C /lib/modules/5.18.12-arch1-1/build M=/home/rim/Downloads/rtw88_8723de-master
make[1]: Entering directory '/usr/lib/modules/5.18.12-arch1-1/build'
CC [M] /home/rim/Downloads/rtw88_8723de-master/mac80211.o
In file included from ././include/linux/kconfig.h:5,
from <command-line>:
./include/generated/autoconf.h:1332: warning: "CONFIG_RTW88_DEBUGFS" redefined
1332 | #define CONFIG_RTW88_DEBUGFS 1
|
<command-line>: note: this is the location of the previous definition
./include/generated/autoconf.h:6997: warning: "CONFIG_RTW88_DEBUG" redefined
6997 | #define CONFIG_RTW88_DEBUG 1
|
<command-line>: note: this is the location of the previous definition
/home/rim/Downloads/rtw88_8723de-master/mac80211.c:741:35: error: initialization of ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info *)’ from incompatible pointer type ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, u16)’ {aka ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, short unsigned int)’} [-Werror=incompatible-pointer-types]
741 | .mgd_prepare_tx = rtw_ops_mgd_prepare_tx,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/rim/Downloads/rtw88_8723de-master/mac80211.c:741:35: note: (near initialization for ‘rtw_ops.mgd_prepare_tx’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/rim/Downloads/rtw88_8723de-master/mac80211.o] Error 1
make[1]: *** [Makefile:1838: /home/rim/Downloads/rtw88_8723de-master] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.18.12-arch1-1/build'
make: *** [Makefile:44: all] Error 2
[rim#archie rtw88_8723de-master]$
I have no idea why is this happening, I tried to install RTL8723_DE driver because I want to connect my computer to web.
Driver I used: https://github.com/rtlwifi-linux/rtw88_8723de
Can somebody help, please?

Unable to insert char* to the Azure Telemetry Payload In Arduino

I'm trying to add char* variable which contains date to the Azure telemetry payload. But error is occurring.
az_span temp_span = az_span_create(telemetry_payload, sizeof(telemetry_payload));
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR("{ \"Humidity\": "));
(void)az_span_u32toa(temp_span, humidity, &temp_span);
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR(", \n \"Temperature\": "));
(void)az_span_u32toa(temp_span, temperature, &temp_span);
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR(", \n \"LocalTime\": "));
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
//Error from above line
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR(" }"));
temp_span = az_span_copy_u8(temp_span, '\0');
getCurrentLocalTimeString function definition is here
static char* getCurrentLocalTimeString()
{
time_t now = time(NULL);
return ctime(&now);
}
Error
In file included from C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_base64.h:20,
from C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_core.h:18,
from G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino:40:
G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino: In function 'char* getTelemetryPayload()':
Azure_IoT_Hub_ESP8266:335:57: error: cast from 'char*' to 'uint8_t' {aka 'unsigned char'} loses precision [-fpermissive]
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:108:25: note: in definition of macro 'AZ_SPAN_LITERAL_FROM_STR'
108 | .ptr = (uint8_t*)(STRING_LITERAL), \
| ^~~~~~~~~~~~~~
G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino:335:39: note: in expansion of macro 'AZ_SPAN_FROM_STR'
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~
Azure_IoT_Hub_ESP8266:335:57: error: cast from 'char*' to 'uint8_t' {aka 'unsigned char'} loses precision [-fpermissive]
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:93:43: note: in definition of macro '_az_STRING_LITERAL_LEN'
93 | #define _az_STRING_LITERAL_LEN(S) (sizeof(S "") - 1)
| ^
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:125:52: note: in expansion of macro 'AZ_SPAN_LITERAL_FROM_STR'
125 | #define AZ_SPAN_FROM_STR(STRING_LITERAL) (az_span) AZ_SPAN_LITERAL_FROM_STR(STRING_LITERAL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino:335:39: note: in expansion of macro 'AZ_SPAN_FROM_STR'
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:93:45: error: expected ')' before string constant
93 | #define _az_STRING_LITERAL_LEN(S) (sizeof(S "") - 1)
| ~ ^~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:109:15: note: in expansion of macro '_az_STRING_LITERAL_LEN'
109 | .size = _az_STRING_LITERAL_LEN(STRING_LITERAL), \
| ^~~~~~~~~~~~~~~~~~~~~~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:125:52: note: in expansion of macro 'AZ_SPAN_LITERAL_FROM_STR'
125 | #define AZ_SPAN_FROM_STR(STRING_LITERAL) (az_span) AZ_SPAN_LITERAL_FROM_STR(STRING_LITERAL)
| ^~~~~~~~~~~~~~~~~~~~~~~~
G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino:335:39: note: in expansion of macro 'AZ_SPAN_FROM_STR'
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~
C:\Users\hansa\Documents\Arduino\libraries\Azure_SDK_for_C\src/az_span.h:125:50: error: expected primary-expression before ')' token
125 | #define AZ_SPAN_FROM_STR(STRING_LITERAL) (az_span) AZ_SPAN_LITERAL_FROM_STR(STRING_LITERAL)
| ^
G:\AZURE Messaging IoT\Azure_IoT_Hub_ESP8266\Azure_IoT_Hub_ESP8266.ino:335:39: note: in expansion of macro 'AZ_SPAN_FROM_STR'
335 | temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR( (uint8_t)getCurrentLocalTimeString() ));
| ^~~~~~~~~~~~~~~~
exit status 1
cast from 'char*' to 'uint8_t' {aka 'unsigned char'} loses precision [-fpermissive]
This bit of code:
(uint8_t)getCurrentLocalTimeString()
doesn't do what you think it does.
Your function getCurrentLocalTimeString() returns the address of an array of characters which contains a string representing the current local time.
You then try to cast this 32 bit memory address to an 8 bit unsigned integer, which is why the compiler warns that you're losing precision.
The best you can hope for here is publishing the first 8 bits of the memory address of this string, which I'm sure isn't what you want.
Since you seem to want to publish this as a string, you'd just drop the (uint8_t), like so:
temp_span = az_span_copy(temp_span, AZ_SPAN_FROM_STR(getCurrentLocalTimeString() ));

Some messages shows when vim startup

When I try to start or source neovim/vim/vi, I'll get follow messages.
syntax_on #1
did_load_filetypes #1
ft_ignore_pat \.\(Z\|gz\|bz2\|zip\|tgz\)$
b:changedtick #1
v:beval_winid #0
v:version #800
v:t_list #3
v:beval_winnr #0
v:errors []
v:lnum #0
v:hlsearch #1
v:t_channel #9
v:oldfiles [
v:dying #0
v:windowid #0
v:mouse_winid #0
v:lang C.UTF-8
v:t_none #7
v:count #0
v:progpath /usr/bin/vim.basic
v:true v:true
v:t_string #1
v:none v:none
v:progname vi
v:t_bool #6
v:t_number #0
v:vim_did_enter #0
v:cmdbang #0
v:foldlevel #0
v:t_func #2
v:ctype C.UTF-8
v:t_job #8
v:prevcount #0
v:register "
v:mouse_win #0
v:count1 #0
v:foldstart #0
v:foldend #0
v:profiling #0
v:t_float #5
v:null v:null
v:beval_col #0
v:beval_lnum #0
v:mouse_lnum #0
v:completed_item {}
v:t_dict #4
v:false v:false
v:beval_bufnr #0
v:shell_error #0
v:testing #0
v:lc_time C.UTF-8
v:searchforward #1
v:event {}
v:mouse_col #0
Press ENTER or type command to continue
I don't know what's happend. I was tried to setup some vim key map befor I saw those messages first.
After that, I tried to off all plugin, and it's dosen`t work.
You probably have a line in your .vimrc / .config/nvim/init.vim, or some file included by them, that just says let. Maybe you got distracted in the middle of writing something else?

Package xtables was not found in the pkg-config search path

I have downloaded iproute2. When I make ./configure && make && make install I get these errors.
TC schedulers
ATM no
IPT Package xtables was not found in the pkg-config search path.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xtables' found
using iptables
IPSET yes
iptables modules directory: /lib/xtables
libc has setns: yes
SELinux support: no
ELF support: no
libmnl support: no
Berkeley DB: no
docs: latex: no
WARNING: no docs can be built from LaTeX files
sgml2html: no
WARNING: no HTML docs can be built from SGML
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/lib'
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/ip'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/ip'
make[1]: Entering directory `/home/mininet/iproute2-4.6.0/tc'
gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DHAVE_SETNS -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"/lib/xtables\" -DYY_NO_INPUT -c -o m_ipt.o m_ipt.c
In file included from m_ipt.c:17:0:
../include/linux/if.h:106:19: error: redeclaration of enumerator ‘IFF_UP’
#define IFF_UP IFF_UP
^
../include/linux/if.h:79:2: note: previous definition of ‘IFF_UP’ was here
IFF_UP = 1<<0, /* sysfs */
^
../include/linux/if.h:107:25: error: redeclaration of enumerator ‘IFF_BROADCAST’
#define IFF_BROADCAST IFF_BROADCAST
^
../include/linux/if.h:80:2: note: previous definition of ‘IFF_BROADCAST’ was here
IFF_BROADCAST = 1<<1, /* __volatile__ */
^
../include/linux/if.h:108:21: error: redeclaration of enumerator ‘IFF_DEBUG’
#define IFF_DEBUG IFF_DEBUG
^
../include/linux/if.h:81:2: note: previous definition of ‘IFF_DEBUG’ was here
IFF_DEBUG = 1<<2, /* sysfs */
^
../include/linux/if.h:109:24: error: redeclaration of enumerator ‘IFF_LOOPBACK’
#define IFF_LOOPBACK IFF_LOOPBACK
^
../include/linux/if.h:82:2: note: previous definition of ‘IFF_LOOPBACK’ was here
IFF_LOOPBACK = 1<<3, /* __volatile__ */
^
../include/linux/if.h:110:27: error: redeclaration of enumerator ‘IFF_POINTOPOINT’
#define IFF_POINTOPOINT IFF_POINTOPOINT
^
../include/linux/if.h:83:2: note: previous definition of ‘IFF_POINTOPOINT’ was here
IFF_POINTOPOINT = 1<<4, /* __volatile__ */
^
../include/linux/if.h:111:26: error: redeclaration of enumerator ‘IFF_NOTRAILERS’
#define IFF_NOTRAILERS IFF_NOTRAILERS
^
../include/linux/if.h:84:2: note: previous definition of ‘IFF_NOTRAILERS’ was here
IFF_NOTRAILERS = 1<<5, /* sysfs */
^
../include/linux/if.h:112:23: error: redeclaration of enumerator ‘IFF_RUNNING’
#define IFF_RUNNING IFF_RUNNING
^
../include/linux/if.h:85:2: note: previous definition of ‘IFF_RUNNING’ was here
IFF_RUNNING = 1<<6, /* __volatile__ */
^
../include/linux/if.h:113:21: error: redeclaration of enumerator ‘IFF_NOARP’
#define IFF_NOARP IFF_NOARP
^
../include/linux/if.h:86:2: note: previous definition of ‘IFF_NOARP’ was here
IFF_NOARP = 1<<7, /* sysfs */
^
../include/linux/if.h:114:23: error: redeclaration of enumerator ‘IFF_PROMISC’
#define IFF_PROMISC IFF_PROMISC
^
../include/linux/if.h:87:2: note: previous definition of ‘IFF_PROMISC’ was here
IFF_PROMISC = 1<<8, /* sysfs */
^
../include/linux/if.h:115:24: error: redeclaration of enumerator ‘IFF_ALLMULTI’
#define IFF_ALLMULTI IFF_ALLMULTI
^
../include/linux/if.h:88:2: note: previous definition of ‘IFF_ALLMULTI’ was here
IFF_ALLMULTI = 1<<9, /* sysfs */
^
../include/linux/if.h:116:22: error: redeclaration of enumerator ‘IFF_MASTER’
#define IFF_MASTER IFF_MASTER
^
../include/linux/if.h:89:2: note: previous definition of ‘IFF_MASTER’ was here
IFF_MASTER = 1<<10, /* __volatile__ */
^
../include/linux/if.h:117:21: error: redeclaration of enumerator ‘IFF_SLAVE’
#define IFF_SLAVE IFF_SLAVE
^
../include/linux/if.h:90:2: note: previous definition of ‘IFF_SLAVE’ was here
IFF_SLAVE = 1<<11, /* __volatile__ */
^
../include/linux/if.h:118:25: error: redeclaration of enumerator ‘IFF_MULTICAST’
#define IFF_MULTICAST IFF_MULTICAST
^
../include/linux/if.h:91:2: note: previous definition of ‘IFF_MULTICAST’ was here
IFF_MULTICAST = 1<<12, /* sysfs */
^
../include/linux/if.h:119:23: error: redeclaration of enumerator ‘IFF_PORTSEL’
#define IFF_PORTSEL IFF_PORTSEL
^
../include/linux/if.h:92:2: note: previous definition of ‘IFF_PORTSEL’ was here
IFF_PORTSEL = 1<<13, /* sysfs */
^
../include/linux/if.h:120:25: error: redeclaration of enumerator ‘IFF_AUTOMEDIA’
#define IFF_AUTOMEDIA IFF_AUTOMEDIA
^
../include/linux/if.h:93:2: note: previous definition of ‘IFF_AUTOMEDIA’ was here
IFF_AUTOMEDIA = 1<<14, /* sysfs */
^
../include/linux/if.h:121:23: error: redeclaration of enumerator ‘IFF_DYNAMIC’
#define IFF_DYNAMIC IFF_DYNAMIC
^
../include/linux/if.h:94:2: note: previous definition of ‘IFF_DYNAMIC’ was here
IFF_DYNAMIC = 1<<15, /* sysfs */
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:111:8: error: redefinition of ‘struct ifmap’
struct ifmap
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:189:8: note: originally defined here
struct ifmap {
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:126:8: error: redefinition of ‘struct ifreq’
struct ifreq
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:226:8: note: originally defined here
struct ifreq {
^
In file included from ../include/xtables.h:16:0,
from ../include/iptables.h:5,
from m_ipt.c:18:
/usr/include/net/if.h:176:8: error: redefinition of ‘struct ifconf’
struct ifconf
^
In file included from m_ipt.c:17:0:
../include/linux/if.h:278:8: note: originally defined here
struct ifconf {
^
In file included from ../include/iptables.h:5:0,
from m_ipt.c:18:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
#include <xtables-version.h>
^
compilation terminated.
make[1]: *** [m_ipt.o] Error 1
make[1]: Leaving directory `/home/mininet/iproute2-4.6.0/tc'
make: *** [all] Error 2
please help
UPDATE
I ended up updating the kernel and it work!
TC schedulers
ATM no
IPT Package xtables was not found in the pkg-config search path.
Install libxtables-dev on Ubuntu. I can't find a similar package from Fedora. On Fedora you may need to build from sources.
Ubuntu:
$ apt-cache search xtables
libip4tc-dev - Development files for libiptc
libip4tc0 - netfilter libi4pt library
libip6tc-dev - Development files for libiptc
libip6tc0 - netfilter libipt library
libiptc-dev - Development files for libiptc
libiptc0 - netfilter libipt library
libxtables-dev - netfilter xtables library
libxtables11 - netfilter xtables library
Fedora:
$ dnf search xtables
No matches found.
$ dnf search libxtables
No matches found.
Perhaps you should add the directory containing `xtables.pc'
to the PKG_CONFIG_PATH environment variable
If you install into /usr/local/lib on Ubuntu (or /usr/local/lib64 on Fedora`), then you will see something like this:
$ ls -Al /usr/local/lib/pkgconfig/
total 88
-rw-r--r-- 1 root root 228 Oct 22 08:15 expat.pc
-rw-r--r-- 1 root root 726 Oct 19 23:56 gnutls-dane.pc
-rw-r--r-- 1 root root 911 Oct 19 23:56 gnutls.pc
-rw-r--r-- 1 root root 1199 Oct 22 08:53 guile-2.2.pc
-rw-r--r-- 1 root root 563 Oct 22 08:13 hogweed.pc
-rw-r--r-- 1 root root 315 Oct 16 06:56 libcrypto.pc
-rw-r--r-- 1 root root 1678 Oct 16 06:58 libcurl.pc
-rw-r--r-- 1 root root 860 Oct 16 06:52 libidn.pc
...
When you configure you can you can do something like:
INSTALL_PREFIX="/usr/local"
INSTALL_LIBDIR="$INSTALL_PREFIX/lib"
OPT_PKGCONFIG=("$INSTALL_LIBDIR/pkgconfig")
OPT_CPPFLAGS=("-I$INSTALL_PREFIX/include" "-DNDEBUG")
OPT_CFLAGS=("$SH_MARCH" "$SH_NATIVE")
OPT_CXXFLAGS=("$SH_MARCH" "$SH_NATIVE")
OPT_LDFLAGS=("$SH_MARCH" "-Wl,-rpath,$INSTALL_LIBDIR" "-L$INSTALL_LIBDIR")
OPT_LIBS=("-ldl" "-lpthread")
...
PKG_CONFIG_PATH="${OPT_PKGCONFIG[*]}" \
CPPFLAGS="${OPT_CPPFLAGS[*]}" \
CFLAGS="${OPT_CFLAGS[*]}" CXXFLAGS="${OPT_CXXFLAGS[*]}" \
LDFLAGS="${OPT_LDFLAGS[*]}" LIBS="${OPT_LIBS[*]}" \
./configure --enable-shared --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR"
<other config options>

Resources