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 fails if using futures-preview block_on #69

Closed
HackerWithoutACause opened this issue Aug 30, 2019 · 2 comments
Closed

Building fails if using futures-preview block_on #69

HackerWithoutACause opened this issue Aug 30, 2019 · 2 comments

Comments

@HackerWithoutACause
Copy link

I have to following code:

use futures::executor::block_on;
use isahc::prelude::*;

fn main() {
    println!("{}", block_on(request()).unwrap());
}

async fn request() -> Option<String> {
    let mut response = isahc::get_async("https://httpbin.org/get").await.ok()?;
    Some(response.text_async().await.ok()?)
}

When building on MacOS verson 10.13.6 I get the following error message when trying to compile:

error: linking with `cc` failed: exit code: 1

and then after a wall of text

= note: ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
          ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
          ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
          Undefined symbols for architecture x86_64:
            "___isOSVersionAtLeast", referenced from:
                _sectransp_connect_step1 in libcurl_sys-3a24cc39d88bdc1b.rlib(sectransp.o)
                _sectransp_connect_step2 in libcurl_sys-3a24cc39d88bdc1b.rlib(sectransp.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
@sagebind
Copy link
Owner

sagebind commented Aug 30, 2019

This seems to be the same issue as #68. Disabling default features and not including that static-curl feature should fix this issue for now.

@HackerWithoutACause
Copy link
Author

It works! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants