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

Apple linker errors in 0.11.22 #2006

Closed
jsantell opened this issue Oct 19, 2023 · 6 comments · Fixed by #2130
Closed

Apple linker errors in 0.11.22 #2006

jsantell opened this issue Oct 19, 2023 · 6 comments · Fixed by #2130

Comments

@jsantell
Copy link

Migrating from 0.11.20 to 0.11.22 unearths some linker issues when building a universal binary for macos/ios (CI run):

Undefined symbols for architecture x86_64:
  "_SCDynamicStoreCopyProxies", referenced from:
      __ZN20system_configuration13dynamic_store14SCDynamicStore11get_proxies17ha9cee4367b0c1fcbE in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCDynamicStoreCreateWithOptions", referenced from:
      __ZN20system_configuration13dynamic_store14SCDynamicStore6create17he63aeeeb3840fdc4E in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCNetworkInterfaceCopyAll", referenced from:
      __ZN20system_configuration21network_configuration14get_interfaces17ha41c0e3fd9b2cb6eE in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCNetworkInterfaceGetBSDName", referenced from:
      __ZN20system_configuration21network_configuration18SCNetworkInterface8bsd_name17h45a02c56c7f559b2E in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCNetworkInterfaceGetInterfaceType", referenced from:
      __ZN20system_configuration21network_configuration18SCNetworkInterface21interface_type_string17hd31e474b334507ecE in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCNetworkInterfaceGetLocalizedDisplayName", referenced from:
      __ZN20system_configuration21network_configuration18SCNetworkInterface12display_name17h94d4d8074b27dd32E in libnoosphere.a(system_configuration-46c6672ca6db6ca9.system_configuration.b48ec42a4ca5d16c-cgu.0.rcgu.o)
  "_SCNetworkReachabilityCreateWithAddress", referenced from:

This looks to be introduced by #1955 and the system-configuration dependency. Some possibly related issues

@jplatte
Copy link
Contributor

jplatte commented Nov 27, 2023

Would be nice if this dependency could be made optional, at least until upstream issue are fixed.

@jsantell
Copy link
Author

jsantell commented Jan 8, 2024

#2080 could circumvent this

@wxitcode
Copy link

add SystemConfiguration.framework

@jsantell
Copy link
Author

add SystemConfiguration.framework

* [irondash/cargokit #52 -1883141494](https://github.com/irondash/cargokit/issues/52#issuecomment-1883141494)

* [irondash/cargokit #52 -1883205459](https://github.com/irondash/cargokit/issues/52#issuecomment-1883205459)

AFAICT, the underlying system-configuration lib is linking to SystemConfiguration:
https://github.com/mullvad/system-configuration-rs/blob/c8711c5c62e263fc00972164293118380df631af/system-configuration-sys/build.rs#L10-L12

fn main() {
    if std::env::var("TARGET").unwrap().contains("-apple") {
        println!("cargo:rustc-link-lib=framework=SystemConfiguration");
    }
}

wyilio added a commit to CommE2E/comm that referenced this issue Jan 17, 2024
Summary:
The reqwest requires the SystemConfiguration which is not available in the MacOS linker.

This adds a reminder comment to our nix shell to remove the SystemConfiguration dependency when the reqwest issue is resolved:
seanmonstar/reqwest#2006 (comment)

Test Plan:
Successfully ran `nix develop`

Reviewers:
ashoat,
varun,

Subscribers:
wyilio added a commit to CommE2E/comm that referenced this issue Jan 18, 2024
Summary:
The reqwest requires the SystemConfiguration which is not available in the MacOS linker.

This adds a reminder comment to our nix shell to remove the SystemConfiguration dependency when the reqwest issue is resolved:
seanmonstar/reqwest#2006 (comment)

Test Plan: Successfully ran `nix develop`

Reviewers: ashoat, varun, O1 Nix

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10668
wyilio added a commit to CommE2E/comm that referenced this issue Jan 18, 2024
Summary:
The reqwest requires the SystemConfiguration which is not available in the MacOS linker.

This adds a reminder comment to our nix shell to remove the SystemConfiguration dependency when the reqwest issue is resolved:
seanmonstar/reqwest#2006 (comment)

Test Plan: Successfully ran `nix develop`

Reviewers: ashoat, varun, O1 Nix

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10668
wyilio added a commit to CommE2E/comm that referenced this issue Jan 19, 2024
Summary:
The reqwest requires the SystemConfiguration which is not available in the MacOS linker.

This adds a reminder comment to our nix shell to remove the SystemConfiguration dependency when the reqwest issue is resolved:
seanmonstar/reqwest#2006 (comment)

Test Plan: Successfully ran `nix develop`

Reviewers: ashoat, varun, O1 Nix

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10668
poljar added a commit to matrix-org/matrix-rust-sdk that referenced this issue Feb 7, 2024
The linking error[1] on Mac still isn't fixed.

[1]: seanmonstar/reqwest#2006
poljar added a commit to matrix-org/matrix-rust-sdk that referenced this issue Feb 7, 2024
The linking error[1] on Mac still isn't fixed.

[1]: seanmonstar/reqwest#2006
@cdata
Copy link
Contributor

cdata commented Feb 12, 2024

It looks like we have a fix in system-configuration released in v0.6.0. Perhaps we could update the dependency to fix this?

I'm going to attempt it in a patch.

@Hywan
Copy link

Hywan commented May 2, 2024

#2130 has been reverted. Can we reopen this issue please?

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

Successfully merging a pull request may close this issue.

5 participants