curl-rust icon indicating copy to clipboard operation
curl-rust copied to clipboard

failed to run custom build command for `curl-sys v0.4.36+curl-7.71.1`

Open rconnol opened this issue 3 years ago • 4 comments

When trying to cargo install a package that depends on this package, I am getting this error.

I found an issue that was very similar, if not the same as mine: https://github.com/alexcrichton/curl-rust/issues/240

I looked at the solution, where someone added a conditional on the custom build script based off of the xcodebuild -version being greater than or less than 9.

I am on xcodebuild -version = 12.3 I am running a mac OS and just upgraded to bigsur

warning: clang-4.0: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
warning: clang-4.0: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
warning: clang-4.0: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
warning: clang-4.0: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
warning: curl/lib/connect.c:1219:30: error: unrecognized platform name macOS
warning:       if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
warning:                              ^
warning: curl/lib/connect.c:1219:43: error: unrecognized platform name iOS
warning:       if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
warning:                                           ^
warning: curl/lib/connect.c:1219:52: error: unrecognized platform name tvOS
warning:       if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
warning:                                                    ^
warning: curl/lib/connect.c:1219:62: error: unrecognized platform name watchOS
warning:       if(__builtin_available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
warning:                                                              ^
warning: 4 errors generated.

error: failed to run custom build command for `curl-sys v0.4.36+curl-7.71.1`

At this point I am not sure if it is something I have configured incorrectly, or an actual issue with the code/project. Because I saw someone with a similar issue, I thought I would repost and try to find out more. Any guidance is much appreciated.

Best Wishes!

rconnol avatar Jan 18 '21 23:01 rconnol

Unfortunately I don't know how to fix this error or really where it's coming from. We compile the curl submodule differently than the curl project (e.g. we don't use its configure/make scripts), so that may be where this is coming from. Without the ability to reproduce though I'm not sure how much I can be of help.

alexcrichton avatar Jan 19 '21 15:01 alexcrichton

I have an Apple device I would try and reproduce on, but we haven't upgraded to Big Sur yet due to company policy. But I can try to reproduce with Xcode 12.3 which was released recently. At least we'll know if it is an Xcode change or not.

sagebind avatar Jan 19 '21 15:01 sagebind

@sagebind Thanks for taking look. I guess if it is an issue with Xcode, I can try to figure out how to downgrade my Xcode version.

Let me know if there is anything I can do to help.

rconnol avatar Jan 19 '21 23:01 rconnol

Unfortunately I was not able to reproduce the compilation error on my machine with Xcode 12.3 installed, so it probably is related to Big Sur specifically and not the Xcode version. (Though I do now get some unrelated warnings about deprecated SecureTransport APIs, but compilation still succeeds.)

At least Apple had the common sense of assigning Big Sur a major version number increase (from 10 to 11) so I suppose they have the liberty to break some of these compilation options if they really want to.

sagebind avatar Jan 20 '21 00:01 sagebind