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

Travis CI: Undefined symbols for architecture x86_64: "_SSLCopyALPNProtocols" on mac #2835

Closed
bagder opened this issue Aug 3, 2018 · 3 comments
Labels

Comments

@bagder
Copy link
Member

bagder commented Aug 3, 2018

We get this in most travis builds on mac now built to use darwinssl. Like here. @nickzman explained the reason here and I'm pasting it here since that was in an unrelated issue.

What's happening is SSLCopyALPNProtocols() and SSLSetALPNProtocols() are defined in the Secure Transport headers, but Apple did not actually implement the functions in the Security framework until macOS 10.13.4 (which is Darwin 7.5.0), and this particular computer is using a pre-.4 point release of macOS 10.13.

Those functions are behind __builtin_available(), so they won't be executed if the user is using an older OS than 10.13.4. But the SecureTransport.h header incorrectly specifies that the function became available in 10.13.0, so I think the linker is trying to hard-link to the function, and that would explain the undefined symbols error you are seeing.

Upgrading the OS on Travis' side would solve the problem. You could also solve it by using the -mmacosx-version-min compiler flag set to 10.12 or earlier to force it to weak-link the symbol. I would recommend you just upgrade the OS, since stock 10.13 had a catastrophic security hole you may have heard about, and there have been other security holes patched as well.

@bagder bagder added the build label Aug 3, 2018
@bagder
Copy link
Member Author

bagder commented Aug 3, 2018

According to the travis docs, 10.13 is the latest macos version we can select!

@bagder
Copy link
Member Author

bagder commented Aug 3, 2018

You could also solve it by using the -mmacosx-version-min compiler flag set to 10.12 or earlier

The build failure linked to above already set -mmacosx-version-min to 10.8. That's what our configure script does by default... Would setting it to 10.12 change anything that 10.8 won't do, @nickzman?

@nickzman
Copy link
Member

nickzman commented Aug 7, 2018

Well, I thought that would work, but I guess it's dead-set on believing the symbol is there when it's not...

There are only two other things: you can force Travis to build against 10.12 or earlier, or you can ask them to upgrade their build computers to the latest 10.13 patch level. They really shouldn't be running any version of 10.13 older than the latest patch level. Versions .0 and .1 had a catastrophic, trivial-to-exploit security hole known on the 'net as "I Am Root." The others had less serious security issues as well. And they're going to need at least .4 before those ALPN symbols will be properly defined.

bagder added a commit that referenced this issue Aug 7, 2018
... as building on 10.13.x before 10.13.4 leads to link errors.

Fixes #2835
@bagder bagder closed this as completed in 537763f Aug 7, 2018
xquery pushed a commit to xquery/curl that referenced this issue Aug 9, 2018
... as building on 10.13.x before 10.13.4 leads to link errors.

Assisted-by: Nick Zitzmann
Fixes curl#2835
Closes curl#2845
falconindy pushed a commit to falconindy/curl that referenced this issue Sep 10, 2018
... as building on 10.13.x before 10.13.4 leads to link errors.

Assisted-by: Nick Zitzmann
Fixes curl#2835
Closes curl#2845
SSE4 added a commit to bincrafters/conan-libcurl that referenced this issue Sep 19, 2018
Signed-off-by: SSE4 <tomskside@gmail.com>
@lock lock bot locked as resolved and limited conversation to collaborators Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants