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

Cygwin: Build srtp with openssl fail for no srtp_aes_icm_ctx_t #3254

Closed
Tracked by #2532
winlinvip opened this issue Nov 20, 2022 · 1 comment
Closed
Tracked by #2532

Cygwin: Build srtp with openssl fail for no srtp_aes_icm_ctx_t #3254

winlinvip opened this issue Nov 20, 2022 · 1 comment
Assignees
Labels
Bug It might be a bug. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Nov 20, 2022

Workaround: Disable openssl for srtp by --srtp-nasm=off

Please note that only the pipeline of github actions has this issue.

It fails with:

gcc -DHAVE_CONFIG_H -Icrypto/include -I./include -I./crypto/include  -fPIC -Wall -pedantic -Wstrict-prototypes -O4 -fexpensive-optimizations -funroll-loops -I/cygdrive/d/a/srs/srs/trunk/objs/Platform-CYGWIN_NT-10.0-20348-3.3.6-341.x86_64-GCC11.3.0-SRS5-x86_64/3rdpatry/openssl/include  -c crypto/cipher/aes_icm_ossl.c -o crypto/cipher/aes_icm_ossl.o
crypto/cipher/aes_icm_ossl.c: In function ‘srtp_aes_icm_openssl_alloc’:
crypto/cipher/aes_icm_ossl.c:113:5: error: unknown type name ‘srtp_aes_icm_ctx_t’
  113 |     srtp_aes_icm_ctx_t *icm;
      |     ^~~~~~~~~~~~~~~~~~
crypto/cipher/aes_icm_ossl.c:133:12: error: ‘srtp_aes_icm_ctx_t’ undeclared (first use in this function); did you mean ‘srtp_aes_icm_256’?
  133 |     icm = (srtp_aes_icm_ctx_t *)srtp_crypto_alloc(sizeof(srtp_aes_icm_ctx_t));
      |            ^~~~~~~~~~~~~~~~~~
      |            srtp_aes_icm_256
crypto/cipher/aes_icm_ossl.c:133:12: note: each undeclared identifier is reported only once for each function it appears in
crypto/cipher/aes_icm_ossl.c:133:32: error: expected expression before ‘)’ token
  133 |     icm = (srtp_aes_icm_ctx_t *)srtp_crypto_alloc(sizeof(srtp_aes_icm_ctx_t));
      |                                ^
crypto/cipher/aes_icm_ossl.c:140:8: error: request for member ‘ctx’ in something not a structure or union
  140 |     icm->ctx = EVP_CIPHER_CTX_new();

This is because the crypto/include/config.h should be updated:

$ diff 3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h 3rdparty/patches/srtp/cygwin-crypto-include-config.h
23c23
< #define GCM 1
---
> /* #undef GCM */
140c140
< #define OPENSSL 1
---
> /* #undef OPENSSL */

TRANS_BY_GPT3

@winlinvip
Copy link
Member Author

winlinvip commented Nov 20, 2022

Fixed by patch of SRTP with openssl:

if [[ $SRS_SRTP_ASM == YES ]]; then
    SRS_PATCH_SOURCE=${SRS_WORKDIR}/3rdparty/patches/srtp/cygwin-gcm-crypto-include-config.h
fi

Please note that only the pipeline of github actions has this issue.

@winlinvip winlinvip self-assigned this Nov 20, 2022
@winlinvip winlinvip added Bug It might be a bug. Enhancement Improvement or enhancement. labels Nov 20, 2022
@winlinvip winlinvip added this to the 5.0 milestone Nov 20, 2022
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. Enhancement Improvement or enhancement. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

1 participant