Skip to content

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

@winlinvip

Description

@winlinvip

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

Metadata

Metadata

Assignees

Labels

BugIt might be a bug.EnhancementImprovement or enhancement.TransByAITranslated by AI/GPT.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions