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

building under Mac OS 10.15.2 (Catalina) with gcc-9 fails #4821

Closed
karen-arutyunov opened this issue Jan 15, 2020 · 7 comments
Closed

building under Mac OS 10.15.2 (Catalina) with gcc-9 fails #4821

karen-arutyunov opened this issue Jan 15, 2020 · 7 comments
Labels

Comments

@karen-arutyunov
Copy link

Building curl 7.68.0 under Mac OS 10.15.2 with gcc-9 with the Secure Transport enabled fails with the following errors:

In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:42,
                 from vtls/sectransp.c:45:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified 'bytes' at file scope
  193 |  char bytes[kAuthorizationExternalFormLength];
      |       ^~~~~
vtls/sectransp.c: In function 'show_verbose_server_cert':
vtls/sectransp.c:2713:6: error: 'SecTrustEvaluateAsync' undeclared (first use in this function); did you mean 'SecTrustEvaluate'?
 2713 |   if(SecTrustEvaluateAsync != NULL) {
      |      ^~~~~~~~~~~~~~~~~~~~~
      |      SecTrustEvaluate
vtls/sectransp.c:2713:6: note: each undeclared identifier is reported only once for each function it appears in

I did this

% curl -O https://curl.haxx.se/download/curl-7.68.0.tar.gz
% tar xf curl-7.68.0.tar.gz
% cd curl-7.68.0
% CC=gcc-9 ./configure --with-darwinssl
% make

I expected the following

I expected to successfully build curl.

curl/libcurl version

7.68.0

operating system

Mac OS 10.15.2

@bagder bagder added the build label Jan 15, 2020
@bagder
Copy link
Member

bagder commented Jan 15, 2020

That first error is not in curl code...

@karen-arutyunov
Copy link
Author

Yeah, seems there is no C standard that allows the definition in the header:

static const size_t kAuthorizationExternalFormLength = 32;

typedef struct {
        char bytes[kAuthorizationExternalFormLength];
} AuthorizationExternalForm;

@nickzman
Copy link
Member

If you're using GCC, try it again with Clang; it ought to work with Clang. Neither error is in curl code; the first one looks like something Clang supports but GCC does not, and the second is because SecTrustEvaluateAsync() is defined behind a preprocessor definition GCC might not have defined (__BLOCKS__).

@karen-arutyunov
Copy link
Author

Yes, it builds with Clang. Just inability to build curl with GCC on MacOS is quite an unfortunate.

@bagder
Copy link
Member

bagder commented Jan 16, 2020

Sure, but since this is at least one error that isn't ours we can't even fix this...

@jzakrzewski
Copy link
Contributor

Judging from a quick googling this is not a new problem. GCC just doesn't like it. The common answer is: use clang...

@bagder
Copy link
Member

bagder commented Jan 24, 2020

This is not a problem in our lap.

@bagder bagder closed this as completed Jan 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants