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

clang-cl compile error in 'cipher_rc4_hmac_md5_hw.c' #21150

Closed
gvanem opened this issue Jun 8, 2023 · 3 comments
Closed

clang-cl compile error in 'cipher_rc4_hmac_md5_hw.c' #21150

gvanem opened this issue Jun 8, 2023 · 3 comments
Labels
triaged: bug The issue/pr is/fixes a bug

Comments

@gvanem
Copy link

gvanem commented Jun 8, 2023

Compiling from today's git master and using clang-cl ver. 16.0.0, causes this error:

providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c(80,13):
  error: call to undeclared function 'rc4_md5_enc'; ISO C99 and later do not support implicit function declarations 
  [-Wimplicit-function-declaration]
            rc4_md5_enc(ks, in + rc4_off, out + rc4_off,
            ^
providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c(126,13): 
  error: call to undeclared function 'rc4_md5_enc'; ISO C99 and later do not support implicit function declarations 
  [-Wimplicit-function-declaration]
            rc4_md5_enc(ks, in + rc4_off, out + rc4_off,
            ^
2 errors generated.

Adding a -Wno-implicit-function-declaration to my CFLAGS fixes it.
But there should IMHO be a prototype for this function somewhere. It's now-where AFAICS.

Configured with:

VC-WIN64A-ONECORE no-makedepend no-ec_nistp_64_gcc_128 
enable-tls1_3 enable-md2 enable-asm enable-quic enable-brotli enable-zlib enable-zstd 
enable-crypto-mdebug enable-trace enable-asan enable-aria enable-rc5 enable-heartbeats 

using Strawberry Perl ver. 5.18:

Summary of my perl5 (revision 5 version 18 subversion 4) configuration:

  Platform:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.18.4.1 #1 Thu Oct  2 12:10:29 2014 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef 
...
@gvanem gvanem added the issue: bug report The issue was opened to report a bug label Jun 8, 2023
@t8m t8m added triaged: bug The issue/pr is/fixes a bug and removed issue: bug report The issue was opened to report a bug labels Jun 8, 2023
@t8m
Copy link
Member

t8m commented Jun 8, 2023

I am really curious how you could trigger this code to be compiled in as the build.info currently does not set the RC4_ASM define when building libcrypto or liblegacy.

Could you show me more of the build log? In particular the clang invocation?

t8m added a commit to t8m/openssl that referenced this issue Jun 8, 2023
Also add missing prototype for rc4_md5_enc.

Fixes openssl#21150
@gvanem
Copy link
Author

gvanem commented Jun 8, 2023

Doesn't enable-asm add -DRC4_ASM?

@t8m
Copy link
Member

t8m commented Jun 8, 2023

No, it doesn't.

openssl-machine pushed a commit that referenced this issue Jun 10, 2023
Also add missing prototype for rc4_md5_enc.

Fixes #21150

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #21153)

(cherry picked from commit 58e8af4)
openssl-machine pushed a commit that referenced this issue Jun 10, 2023
Also add missing prototype for rc4_md5_enc.

Fixes #21150

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #21153)

(cherry picked from commit 58e8af4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants