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

libssh2 + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error #12273

Closed
vszakats opened this issue Nov 5, 2023 · 0 comments
Closed

libssh2 + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error #12273

vszakats opened this issue Nov 5, 2023 · 0 comments

Comments

@vszakats
Copy link
Member

vszakats commented Nov 5, 2023

I did this

Building with:

cmake [...] \
  -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_AWS=ON \
  -DCURL_USE_SCHANNEL=ON \
  -DCURL_USE_LIBSSH2=ON \
  -DLIBSSH2_INCLUDE_DIR=.../libssh2/_x64-win-ucrt/usr/include \
  -DLIBSSH2_LIBRARY=.../libssh2/_x64-win-ucrt/usr/lib/libssh2.a

Results in:

In file included from ./curl/lib/sha256.c:32:
./curl/lib/curl_sha256.h:34:49: error: array has incomplete element type 'const struct HMAC_params'
   34 | extern const struct HMAC_params Curl_HMAC_SHA256[1];
      |                                                 ^
./curl/lib/curl_sha256.h:34:21: note: forward declaration of 'struct HMAC_params'
   34 | extern const struct HMAC_params Curl_HMAC_SHA256[1];
      |                     ^
In file included from ./curl/_x64-win-ucrt-cmake-llvm-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:310:
./curl/lib/sha256.c:527:42: error: array has incomplete element type 'const struct HMAC_params'
  527 | const struct HMAC_params Curl_HMAC_SHA256[] = {
      |                                          ^
./curl/lib/curl_sha256.h:34:21: note: forward declaration of 'struct HMAC_params'
   34 | extern const struct HMAC_params Curl_HMAC_SHA256[1];
      |                     ^
In file included from ./curl/_x64-win-ucrt-cmake-llvm-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:310:
./curl/lib/sha256.c:530:25: error: use of undeclared identifier 'HMAC_hinit_func'
  530 |     CURLX_FUNCTION_CAST(HMAC_hinit_func, my_sha256_init),
      |                         ^
./curl/lib/sha256.c:530:5: error: expected expression
  530 |     CURLX_FUNCTION_CAST(HMAC_hinit_func, my_sha256_init),
      |     ^
./curl/lib/warnless.h:34:17: note: expanded from macro 'CURLX_FUNCTION_CAST'
   34 |   (target_type)(void (*) (void))(func)
      |                 ^
In file included from ./curl/_x64-win-ucrt-cmake-llvm-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:310:
./curl/lib/sha256.c:532:25: error: use of undeclared identifier 'HMAC_hupdate_func'
  532 |     CURLX_FUNCTION_CAST(HMAC_hupdate_func, my_sha256_update),
      |                         ^
./curl/lib/sha256.c:532:5: error: expected expression
  532 |     CURLX_FUNCTION_CAST(HMAC_hupdate_func, my_sha256_update),
      |     ^
./curl/lib/warnless.h:34:17: note: expanded from macro 'CURLX_FUNCTION_CAST'
   34 |   (target_type)(void (*) (void))(func)
      |                 ^
In file included from ./curl/_x64-win-ucrt-cmake-llvm-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:310:
./curl/lib/sha256.c:534:25: error: use of undeclared identifier 'HMAC_hfinal_func'
  534 |     CURLX_FUNCTION_CAST(HMAC_hfinal_func, my_sha256_final),
      |                         ^
./curl/lib/sha256.c:534:5: error: expected expression
  534 |     CURLX_FUNCTION_CAST(HMAC_hfinal_func, my_sha256_final),
      |     ^
./curl/lib/warnless.h:34:17: note: expanded from macro 'CURLX_FUNCTION_CAST'
   34 |   (target_type)(void (*) (void))(func)
      |                 ^
8 errors generated.

The same happens without Schannel by setting -DCURL_DISABLE_NTLM=ON instead.

Enabling e.g. quictls, doesn't fix it.

Possibly regression from e92edfb #11490

I expected the following

No error

curl/libcurl version

8.5.0-DEV 46878b9

operating system

any

@vszakats vszakats changed the title libssh2 + schannel + CURL_DISABLE_DIGEST_AUTH=ON + CURL_DISABLE_AWS=ON build error libssh2 + schannel + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error Nov 6, 2023
@vszakats vszakats changed the title libssh2 + schannel + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error libssh2 + schannel + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error Nov 15, 2023
vszakats added a commit to vszakats/curl that referenced this issue Nov 15, 2023
…SABLE_AWS` builds

HMAC is required by `Curl_sha256it` which is required
by `vssh/libssh2.c`. Make sure to compile it.

Fixes:
```
[...]
In file included from ./curl/_x64-win-ucrt-cmake-llvm-bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:310:
./curl/lib/sha256.c:527:42: error: array has incomplete element type 'const struct HMAC_params'
  527 | const struct HMAC_params Curl_HMAC_SHA256[] = {
      |                                          ^
./curl/lib/curl_sha256.h:34:21: note: forward declaration of 'struct HMAC_params'
[...]
```

Fixes curl#12273
Closes #xxxxx
@vszakats vszakats removed the Windows Windows-specific label Nov 15, 2023
@vszakats vszakats changed the title libssh2 + schannel + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error libssh2 + CURL_DISABLE_DIGEST_AUTH + CURL_DISABLE_AWS build error Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant