irondash / cargokit

Integrate cargo build with flutter plugins and applications.
Other
61 stars 19 forks source link

Cargokit error in MacOS #52

Closed AKALugo closed 10 months ago

AKALugo commented 10 months ago

I was using flutter rust bridge and in my Rust code I use the reqwest library to make requests to a server, this application works for Linux, iOS and Android but for MacOS it does not. When I run flutter run in MacOS I get the following error:

akalugo@MBPdeAlejandro my_app % flutter run
Connected devices:
macOS (desktop) • macos  • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
Chrome (web)    • chrome • web-javascript • Google Chrome 120.0.6099.129

Checking for wireless devices...

[1]: macOS (macos)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006030-000E09490AD0001C }
{ platform:macOS, arch:x86_64, id:00006030-000E09490AD0001C }
ld: Undefined symbols:
  _SCDynamicStoreCopyProxies, referenced from:
      system_configuration::dynamic_store::SCDynamicStore::get_proxies::hca7a3e33ea42720a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCDynamicStoreCreateWithOptions, referenced from:
      system_configuration::dynamic_store::SCDynamicStore::create::h1f50eed3aa13ff91 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkInterfaceCopyAll, referenced from:
      system_configuration::network_configuration::get_interfaces::h5cb58503ece28fca in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkInterfaceGetBSDName, referenced from:
      system_configuration::network_configuration::SCNetworkInterface::bsd_name::h3a40fc94d65ef1d2 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkInterfaceGetInterfaceType, referenced from:
      system_configuration::network_configuration::SCNetworkInterface::interface_type_string::h38c50491db9f096d in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkInterfaceGetLocalizedDisplayName, referenced from:
      system_configuration::network_configuration::SCNetworkInterface::display_name::h943477d971a4162a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityCreateWithAddress, referenced from:
      _$LT$system_configuration..network_reachability..SCNetworkReachability$u20$as$u20$core..convert..From$LT$core..net..socket_addr..SocketAddr$GT$$GT$::from::hdfb3d73cd9aaff70 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityCreateWithAddressPair, referenced from:
      system_configuration::network_reachability::SCNetworkReachability::from_addr_pair::h052fe060f69d2906 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityCreateWithName, referenced from:
      system_configuration::network_reachability::SCNetworkReachability::from_host::h8ba2715bc1c607a1 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityGetFlags, referenced from:
      system_configuration::network_reachability::SCNetworkReachability::reachability::h473fdb2b399e1fe7 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityScheduleWithRunLoop, referenced from:
      system_configuration::network_reachability::SCNetworkReachability::schedule_with_runloop::h486ddedc15c59d7f in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkReachabilityUnscheduleFromRunLoop, referenced from:
      system_configuration::network_reachability::SCNetworkReachability::unschedule_from_runloop::h8fe75c704defada3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkServiceCopyAll, referenced from:
      system_configuration::network_configuration::SCNetworkService::get_services::h6748b9b8a830578d in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkServiceGetEnabled, referenced from:
      system_configuration::network_configuration::SCNetworkService::enabled::ha7da5a9f0f84e69a in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkServiceGetInterface, referenced from:
      system_configuration::network_configuration::SCNetworkService::network_interface::h385789985db8e4aa in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkServiceGetServiceID, referenced from:
      system_configuration::network_configuration::SCNetworkService::id::h8515f069c7580bb1 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkSetCopyCurrent, referenced from:
      system_configuration::network_configuration::SCNetworkSet::new::h036e026faf48eba5 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _SCNetworkSetGetServiceOrder, referenced from:
      system_configuration::network_configuration::SCNetworkSet::service_order::h6c67a457b9b9b85e in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCDynamicStoreUseSessionKeys, referenced from:
      system_configuration::dynamic_store::SCDynamicStoreBuilder$LT$T$GT$::create_store_options::ha0e8653be94a3042 in librust_lib.a[arm64][145](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.08.rcgu.o)
  _kSCNetworkInterfaceType6to4, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeBluetooth, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeBond, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeBridge, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeEthernet, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeFireWire, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeIEEE80211, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeIPSec, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeIPv4, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeIrDA, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeL2TP, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeModem, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypePPP, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypePPTP, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeSerial, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeVLAN, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCNetworkInterfaceTypeWWAN, referenced from:
      system_configuration::network_configuration::SCNetworkInterfaceType::from_cfstring::h03bf0d7ffedb1dd3 in librust_lib.a[arm64][156](system_configuration-59f513f20dd3f600.system_configuration.56b5e6df31efacc4-cgu.0.rcgu.o)
  _kSCPropNetProxiesHTTPEnable, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
  _kSCPropNetProxiesHTTPPort, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
  _kSCPropNetProxiesHTTPProxy, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
  _kSCPropNetProxiesHTTPSEnable, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
  _kSCPropNetProxiesHTTPSPort, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
  _kSCPropNetProxiesHTTPSProxy, referenced from:
      reqwest::proxy::get_from_platform_impl::h19033341e1e2d848 in librust_lib.a[arm64][140](reqwest-e78d6ed404beab48.reqwest.26d2dffb21e6b4bb-cgu.03.rcgu.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **

Building macOS application...                                           
Exception: Build process failed

This occurs either on a Mac with an M1 processor or with an M3 pro, to make it happen just simply add the Reqwest dependency to the file.

use reqwest;

Thinking that this error could be caused by the Cargokit configuration that uses flutter rust bridge, I made the configuration manually and the error occurs again. I also tried to use Surf in case the problem was in Reqwest itself and the error is as follows:

akalugo@MBPdeAlejandro my_app % flutter run                         
Connected devices:
macOS (desktop) • macos  • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
Chrome (web)    • chrome • web-javascript • Google Chrome 120.0.6099.129

Checking for wireless devices...

[1]: macOS (macos)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006030-000E09490AD0001C }
{ platform:macOS, arch:x86_64, id:00006030-000E09490AD0001C }
ld: Undefined symbols:
  _curl_easy_cleanup, referenced from:
      _$LT$curl..easy..handler..Easy2$LT$H$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hcaeb10b2cfda84dd in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      _$LT$curl..easy..handler..Easy2$LT$H$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::hd335fadaff0ae0f3 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_escape, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::url_encode::hab7cdda36d5ca71a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_getinfo, referenced from:
      isahc::handler::RequestHandler::get_primary_ip::hac006a2eaabcfb80 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      isahc::handler::RequestHandler::get_primary_port::h741914678a0daa7f in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      isahc::handler::RequestHandler::get_local_ip::h37667b45d918ca65 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      isahc::handler::RequestHandler::get_local_port::h03f235b7ebe1c0e4 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      _$LT$isahc..handler..RequestHandler$u20$as$u20$curl..easy..handler..Handler$GT$::progress::h4a219fe426902a48 in librust_lib.a[arm64][301](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.14.rcgu.o)
      ...
  _curl_easy_init, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::new::h54ae3033228d88ff in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::new::hf2f843ca13d3cb1a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_pause, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::unpause_read::he2f07267981dbc9b in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::unpause_write::hdefb28190196e0c7 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::unpause_read::ha1cb79301716152e in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::unpause_write::h96842eaea3dc67ae in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_perform, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::perform::h51aa1ccda1b1cfea in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_recv, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::recv::hc9cde2f6bedbeb87 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_reset, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::reset::h72694cb0bc1245bf in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_send, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::send::h01c5b16da62d77e0 in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_easy_setopt, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::setopt_ptr::h93c3458cd5b90fde in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::setopt_long::h45fa44d494ad9444 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::setopt_off_t::h12abdae596eca021 in librust_lib.a[arm64][293](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.06.rcgu.o)
      _$LT$isahc..config..dns..DnsCache$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h796e1bf73ab85c22 in librust_lib.a[arm64][295](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.08.rcgu.o)
      curl::multi::Easy2Handle$LT$H$GT$::set_token::h2f6d0bce5b3f249d in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
      _$LT$isahc..config..NetworkInterface$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h01577c134232cd37 in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
      _$LT$isahc..config..AutomaticDecompression$u20$as$u20$isahc..config..internal..SetOpt$GT$::set_opt::h4c93445de5e2f12c in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
      ...
  _curl_easy_strerror, referenced from:
      curl::error::Error::description::h1523a51703a60c7f in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
  _curl_easy_unescape, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::url_decode::h67ff697569e18e3f in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_formadd, referenced from:
      curl::easy::form::Part::add::h0666c18764b742ff in librust_lib.a[arm64][367](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.7.rcgu.o)
  _curl_formfree, referenced from:
      _$LT$curl..easy..form..Form$u20$as$u20$core..ops..drop..Drop$GT$::drop::h18055e4e4669de4f in librust_lib.a[arm64][367](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.7.rcgu.o)
  _curl_free, referenced from:
      curl::easy::handler::Easy2$LT$H$GT$::url_encode::hab7cdda36d5ca71a in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
      curl::easy::handler::Easy2$LT$H$GT$::url_decode::h67ff697569e18e3f in librust_lib.a[arm64][361](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.1.rcgu.o)
  _curl_global_init, referenced from:
      curl::init::_$u7b$$u7b$closure$u7d$$u7d$::hfba944e770deaf65 in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
  _curl_multi_add_handle, referenced from:
      curl::multi::Multi::add2::h51a2eb47990f058c in librust_lib.a[arm64][299](isahc-a6fa43a1a990deb8.isahc.ce9cd58db13bbb97-cgu.12.rcgu.o)
      curl::multi::Multi::add::h513600e42c7539b0 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_assign, referenced from:
      curl::multi::Multi::assign::h50f09520a43d7dba in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_cleanup, referenced from:
      _$LT$curl..multi..RawMulti$u20$as$u20$core..ops..drop..Drop$GT$::drop::h9bd1dd9dd1188893 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_fdset, referenced from:
      curl::multi::Multi::fdset2::hdbb584ab76276f6a in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_info_read, referenced from:
      curl::multi::Multi::_messages::h48df6cc7458580dc in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_init, referenced from:
      curl::multi::Multi::new::hed4ddcf61577a93b in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_perform, referenced from:
      curl::multi::Multi::perform::h6962f22302a69742 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_remove_handle, referenced from:
      curl::multi::DetachGuard::detach::h30665dc45a78ae1a in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_setopt, referenced from:
      curl::multi::Multi::setopt_long::ha478189f0a0f8750 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
      curl::multi::Multi::setopt_ptr::hfdcc28c2293366c0 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_socket_action, referenced from:
      curl::multi::Multi::action::hf9afcc490c381c3d in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
      curl::multi::Multi::timeout::h2e5dcd3b1ce0f760 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_strerror, referenced from:
      curl::error::MultiError::description::h775a2b4625681ed9 in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
  _curl_multi_timeout, referenced from:
      curl::multi::Multi::get_timeout::h4a2f99ad92c66db2 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_multi_wait, referenced from:
      curl::multi::Multi::wait::h356a6528cb1b5037 in librust_lib.a[arm64][363](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.3.rcgu.o)
  _curl_share_strerror, referenced from:
      curl::error::ShareError::description::h66deae251fbb4cda in librust_lib.a[arm64][362](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.2.rcgu.o)
  _curl_slist_append, referenced from:
      curl::easy::list::List::append::h58e2776a75a8120c in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
  _curl_slist_free_all, referenced from:
      _$LT$curl..easy..list..List$u20$as$u20$core..ops..drop..Drop$GT$::drop::h0854b9ceb500b409 in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
  _curl_version, referenced from:
      curl::version::Version::num::h6f468b454888c475 in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
  _curl_version_info, referenced from:
      curl::version::Version::get::he2a4eb089732cf4e in librust_lib.a[arm64][364](curl-a5b6892439537b19.curl.3668729dcdd43ed6-cgu.4.rcgu.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **

Building macOS application...                                           
Exception: Build process failed

To replicate any of the examples simply:

  1. Start a flutter rust bridge project.
  2. add the dependency of surf or reqwest to Cargo.toml
  3. add the dependency to the .rs file (use reqwest or use surf).
  4. run flutter run
knopp commented 10 months ago

Cargokit on macOS and iOS builds the project as static library, so linker flags need to be added to the podspec file. (OTHER_LDFLAGS sections). In this case you're probably missing -framework SystemConfiguration.

AKALugo commented 10 months ago

Indeed, the problem was with the SystemConfiguration.framkework, you have to add it in Frameworks and Libraries.

Captura de pantalla 2024-01-09 a las 14 56 17