nabijaczleweli / cargo-update

A cargo subcommand for checking and applying updates to installed executables
MIT License
1.25k stars 41 forks source link

Crashes on run on macOS Sonoma 14.0 Beta (23A5312d) #240

Open schwa opened 1 year ago

schwa commented 1 year ago

Using cargo 1.71.0 (cfd3bbd8f 2023-06-08)

cargo install-update immediately crashes.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString stringByStandardizingPath]: unrecognized selector sent to instance 0x600001908440'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000192774960 __exceptionPreprocess + 176
    1   libobjc.A.dylib                     0x000000019226deb4 objc_exception_throw + 60
    2   CoreFoundation                      0x000000019282646c -[NSObject(NSObject) __retain_OA] + 0
    3   CoreFoundation                      0x00000001926deb24 ___forwarding___ + 1572
    4   CoreFoundation                      0x00000001926de440 _CF_forwarding_prep_0 + 96
    5   Foundation                          0x00000001937afd80 -[NSProcessInfo arguments] + 188
    6   CoreFoundation                      0x00000001927f0094 __getDefaultArguments_block_invoke + 96
    7   libdispatch.dylib                   0x0000000192475910 _dispatch_client_callout + 20
    8   libdispatch.dylib                   0x000000019247714c _dispatch_once_callout + 32
    9   CoreFoundation                      0x00000001927efa30 _addBackstopValuesForIdentifierAndSource + 640
    10  CoreFoundation                      0x00000001926aa3b4 __81-[_CFXPreferences(SourceAdditions) withNamedVolatileSourceForIdentifier:perform:]_block_invoke + 144
    11  CoreFoundation                      0x00000001927ef6d8 -[_CFXPreferences withNamedVolatileSourceForIdentifier:perform:] + 272
    12  CoreFoundation                      0x00000001926b0724 -[CFPrefsSearchListSource addNamedVolatileSourceForIdentifier:] + 136
    13  CoreFoundation                      0x000000019282e94c __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke.155 + 296
    14  CoreFoundation                      0x000000019282e5f4 -[_CFXPreferences withSearchLists:] + 84
    15  CoreFoundation                      0x00000001926abc78 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 300
    16  CoreFoundation                      0x000000019282e7a0 -[_CFXPreferences withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 384
    17  CoreFoundation                      0x00000001926ab5a0 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 156
    18  CoreFoundation                      0x00000001926ab4c8 _CFPreferencesCopyAppValueWithContainerAndConfiguration + 112
    19  SystemConfiguration                 0x0000000193438488 SCDynamicStoreCopyProxiesWithOptions + 180
    20  cargo-install-update                0x0000000102861a68 Curl_macos_init + 16
    21  cargo-install-update                0x0000000102850574 curl_global_init + 176
    22  cargo-install-update                0x000000010283e504 _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hac714a257a9e32a7E + 36
    23  cargo-install-update                0x0000000102a94d28 _ZN3std10sys_common4once5queue4Once4call17h5a1c3f8d4cad741fE + 1056
    24  cargo-install-update                0x000000010283e62c _ZN4curl9INIT_CTOR9init_ctor17h6cadb2258443a9ccE + 96
    25  dyld                                0x00000001922c55c8 ___ZZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateEENK3$_0clEv_block_invoke + 168
    26  dyld                                0x000000019230a920 ___ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv_block_invoke.209 + 340
    27  dyld                                0x00000001922fdc60 ___ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE_block_invoke + 496
    28  dyld                                0x00000001922a52fc _ZNK5dyld39MachOFile18forEachLoadCommandER11DiagnosticsU13block_pointerFvPK12load_commandRbE + 300
    29  dyld                                0x00000001922fcc98 _ZNK5dyld39MachOFile14forEachSectionEU13block_pointerFvRKNS0_11SectionInfoEbRbE + 192
    30  dyld                                0x000000019230a434 _ZNK5dyld313MachOAnalyzer18forEachInitializerER11DiagnosticsRKNS0_15VMAddrConverterEU13block_pointerFvjEPKv + 516
    31  dyld                                0x00000001922c1798 _ZNK5dyld46Loader25findAndRunAllInitializersERNS_12RuntimeStateE + 448
    32  dyld                                0x00000001922c7b14 _ZNK5dyld416JustInTimeLoader15runInitializersERNS_12RuntimeStateE + 36
    33  dyld                                0x00000001922c1b4c _ZNK5dyld46Loader23runInitializersBottomUpERNS_12RuntimeStateERN5dyld35ArrayIPKS0_EE + 220
    34  dyld                                0x00000001922c5654 _ZZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateEENK3$_1clEv + 112
    35  dyld                                0x00000001922c1ccc _ZNK5dyld46Loader38runInitializersBottomUpPlusUpwardLinksERNS_12RuntimeStateE + 304
    36  dyld                                0x00000001922e6ad4 _ZN5dyld44APIs25runAllInitializersForMainEv + 464
    37  dyld                                0x00000001922a9f34 _ZN5dyld4L7prepareERNS_4APIsEPKN5dyld313MachOAnalyzerE + 3192
    38  dyld                                0x00000001922a8f44 start + 1948
)
libc++abi: terminating due to uncaught exception of type NSException
nabijaczleweli commented 1 year ago

libcurl constructor in backtrace

        19  SystemConfiguration                 0x0000000193438488 SCDynamicStoreCopyProxiesWithOptions + 180
        20  cargo-install-update                0x0000000102861a68 Curl_macos_init + 16
        21  cargo-install-update                0x0000000102850574 curl_global_init + 176
        22  cargo-install-update                0x000000010283e504 _ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17hac714a257a9e32a7E + 36
        23  cargo-install-update                0x0000000102a94d28 _ZN3std10sys_common4once5queue4Once4call17h5a1c3f8d4cad741fE + 1056
        24  cargo-install-update                0x000000010283e62c _ZN4curl9INIT_CTOR9init_ctor17h6cadb2258443a9ccE + 96
nabijaczleweli commented 1 year ago

Forwarded as https://github.com/alexcrichton/curl-rust/issues/524

gaetschwartz commented 1 year ago

Is there any way to work around that ? I tried using vendor curl with --features vendored-libcurl but with no luck..

Ryu-ga commented 1 year ago

TL;DR. Link CoreServices to binaries

In Sonoma, some CoreFoundation functions require CoreServices, but dyld of Sonoma cannot load CoreServices when it should do, like cxx_global_init in gettext, MacOS_init in libcurl. So, some programs like aria2(gettext), cargo(libcurl) didn't work.

gaetschwartz commented 1 year ago

Pardon my ignorance but how do you do that ?

Ryu-ga commented 1 year ago

@gaetschwartz There are 2 ways to solve this issue. 1: Link the rust binary with CoreServices like https://github.com/mitsuhiko/rye/commit/fa2c55bee7abba0ed17ccf059b456edb60014cdb 2: Build curl with CoreServices by editing configure and install. This way may be a bit inconvenient unless you are using brew or macports.

ekwoka commented 1 year ago

This is present in release version 14.0

krishnaTORQUE commented 1 year ago

I am facing the same issue in stable sonoma 14.0. Any update? Thanks

speelbarrow commented 1 year ago

@gaetschwartz There are 2 ways to solve this issue. 1: Link the rust binary with CoreServices like mitsuhiko/rye@fa2c55b

@Ryu-ga thank you for the suggestion! I've implemented it (speelbarrow/cargo-update@282ec6c), tested it (cargo install --git https://github.com/speelbarrow/cargo-update --branch patch-1), and opened a PR (#241).

nabijaczleweli commented 1 year ago

Tracking https://github.com/alexcrichton/curl-rust/issues/524, fixed upstream in https://github.com/curl/curl/commit/6ab7e19.

speelbarrow commented 1 year ago

For anyone looking for a workaround -- cargo install cargo-update -F curl/force-system-lib-on-osx (add --force to reinstall) will install this tool while also using the system-provided libcurl instead of the one provided by curl-rust.

(Thanks to @kornelski for suggesting this in alexcrichton/curl-rust#524)

ekwoka commented 1 year ago

strange a new version was released but this wasn't in it...

sigseg5 commented 1 year ago

Same error in macOS Sonoma 14.0 on v13.1.0, previous version worked pretty good on macOS Sonoma

ekwoka commented 1 year ago

the previous version did not work on Sonoma, unless you did the above and installed with with forcing the curl lib

nabijaczleweli commented 1 year ago

Unclear to me how or why you expect curl and curl-rust to be part of a cargo-update release?

sigseg5 commented 1 year ago

the previous version did not work on Sonoma

I disagree, I've been running cargo install-update -a every day since the macOS Sonoma release and the error only started showing up after today's cargo-update update.

Perhaps this was due to some additional packages that were installed on the my system via brew earlier?

ekwoka commented 1 year ago

maybe, but of course, we can see this thread is much older than the latest build.

Maybe you had a happy accident, but the latest version didn't change anything related to this

xaocon commented 1 year ago

ahh, the joys of linking C libs and -sys crates. thanks for posting the easy workaround @speelbarrow.

speelbarrow commented 1 year ago

For anyone looking for a workaround -- cargo install cargo-update -F curl/force-system-lib-on-osx ...

Quick follow up to this -- after installing, run cargo install-update-config -f curl/force-system-lib-on-osx cargo-update so that if/when cargo install-update -a updates itself it will install the new version with the feature still enabled.

anzbert commented 1 year ago

For anyone looking for a workaround -- cargo install cargo-update -F curl/force-system-lib-on-osx ...

Quick follow up to this -- after installing, run cargo install-update-config -f curl/force-system-lib-on-osx cargo-update so that if/when cargo install-update -a updates itself it will install the new version with the feature still enabled.

Thx . that worked wonderfully

marchiore commented 1 year ago

For anyone looking for a workaround -- cargo install cargo-update -F curl/force-system-lib-on-osx ...

Quick follow up to this -- after installing, run cargo install-update-config -f curl/force-system-lib-on-osx cargo-update so that if/when cargo install-update -a updates itself it will install the new version with the feature still enabled.

i'm trying to install cargo with this on sonoma but i'm having this error

  Compiling array_tool v1.0.3
   Compiling git2 v0.18.1
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/matheus/Downloads/google-cloud-sdk/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/homebrew/opt/php@7.4/sbin:/opt/homebrew/opt/php@7.4/bin:/opt/homebrew/opt/php@8.1/sbin:/opt/homebrew/opt/php@8.1/bin:/opt/local/bin:/opt/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/matheus/.cargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/rustcZQFELn/symbols.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.00.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.01.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.02.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.03.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.04.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.05.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.06.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.07.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.08.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.09.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.10.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.11.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.12.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.13.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.14.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.cargo_install_update.98c8a34b9a6fd116-cgu.15.rcgu.o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8.25aqbo7pose6bn27.rcgu.o" "-L" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps" "-L" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/build/libnghttp2-sys-5e5e8bcbf49cad09/out/i/lib" "-L" "/opt/local/lib" "-L" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/build/libgit2-sys-e450c2f2fee3a0b5/out/build" "-L" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/build/libssh2-sys-5e66390802355d5a/out/build" "-L" "/opt/homebrew/opt/openssl@3/lib" "-L" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblazysort-3d53d750019833fc.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtabwriter-dd7c4b1bf96a0011.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libunicode_width-3fe0a8279a53fc7c.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libcargo_update-db215b94165b37ef.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libhex-9244b38a4129f0d3.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtoml-e114fc02220e83d9.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libhome-dc116988f5e812fb.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libcurl-7dfb22f188914d81.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libsocket2-b74e025327d87d85.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libcurl_sys-002208127a3b4c59.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libclap-ecd3a9937e79fc4d.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libatty-acecd3a19c910657.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libstrsim-101123f46c894d00.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtermcolor-989ce08b849b21f2.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtextwrap-bd7af7f02e998d5b.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libterminal_size-54512709ce9785c0.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/librustix-057aa5444ac2641f.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liberrno-f72837af4d78ddd1.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libio_lifetimes-b2452a3257c61456.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libclap_lex-858bf18797501662.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libos_str_bytes-659c0710321bf26b.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libindexmap-e61fab7e5eeb166e.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libhashbrown-62790b10662a5568.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libbitflags-a6d6f8c0514a636a.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libgit2-0bbc555b851aec0d.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liburl-812a642aa9d1caf7.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libidna-5abe4893e6d8ba3e.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libunicode_normalization-26f26f93f46347c8.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtinyvec-6dac954f725ade29.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libtinyvec_macros-5136b7b8d2e0236e.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libunicode_bidi-caceec74d1ca9238.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libform_urlencoded-642a6c7b4bd426eb.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libpercent_encoding-05d0d0cbaa661b28.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblog-a848724df960ac4b.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblibgit2_sys-6c76fcfcc2eefbf1.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblibssh2_sys-dca5724a2a499d8e.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libopenssl_sys-3f3428f4a754afe0.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblibz_sys-e62756b3a4d00eb2.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/liblibc-dde6dd643ecd22d6.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libbitflags-497f3a8824918524.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libregex-2b436f8aa1465377.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libregex_automata-c9288fc8b32cfaf9.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libaho_corasick-f07187a3b7e5eeef.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libmemchr-a069b98770e6d05e.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libregex_syntax-b0cde1cd2bf7d231.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libsemver-dcb94337a988228f.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libserde-96e447b51e4517e0.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libonce_cell-dde10d5e34d2fad9.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libarray_tool-3a5f84317a82464d.rlib" "/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/libjson_deserializer-61ae62a5b1c3319f.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd-3d2f8249df972181.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-71f458d6ad9754d3.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libobject-80ca13cc75b9f1f8.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-f61e6e34bb7e3d2c.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-0e0bd047a1477984.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libgimli-2e16542b46c8c2c1.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-715d432050230d26.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-07347eb75450f6dc.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-9def065c9187ef49.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-a77178b509a93e9e.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-e52109799d3633b0.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libadler-71de85e71b396682.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libunwind-9d1db45aded26b54.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-dc8bc139addbc9a1.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liblibc-43ed22d1545fab87.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/liballoc-dfb3f449d0391fb9.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-921be82af751e98a.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcore-ad57bf2066878332.rlib" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-7bc3106ba9bea571.rlib" "-lcurl" "-liconv" "-framework" "Security" "-framework" "CoreFoundation" "-lssl" "-lcrypto" "-lz" "-liconv" "-lSystem" "-lc" "-lm" "-L" "/Users/matheus/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q/release/deps/cargo_install_update-4913a6d5381e04c8" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: warning: ignoring duplicate libraries: '-liconv'
          ld: warning: no platform load command found in '/private/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/rustcZQFELn/symbols.o', assuming: macOS
          ld: Undefined symbols:
            _iconv, referenced from:
                _git_fs_path_iconv in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
            _iconv_close, referenced from:
                _git_fs_path_direach in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv_clear in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_diriter_free in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_dirload in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
            _iconv_open, referenced from:
                _git_fs_path_direach in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_iconv_init_precompose in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
                _git_fs_path_diriter_init in liblibgit2_sys-6c76fcfcc2eefbf1.rlib[114](fs_path.o)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: could not compile `cargo-update` (bin "cargo-install-update") due to previous error
error: failed to compile `cargo-update v13.1.0`, intermediate artifacts can be found at `/var/folders/ll/4d54rz993dd_m22_0ktbh3f40000gn/T/cargo-install99Zg4q`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

What's am i doing wrong?

speelbarrow commented 1 year ago

@marchiore can you post the exact command you ran to get that output?

marchiore commented 1 year ago

@marchiore can you post the exact command you ran to get that output?

cargo install cargo-update -F curl/force-system-lib-on-osx

i have the same error if i run with

cargo install cargo-update
xaocon commented 1 year ago

@marchiore, I'm pretty sure that is unrelated to this issue. You should probably grab any logs you can from the intermediate artifacts directory and try to get some help, maybe from https://github.com/rust-lang/git2-rs .

marchiore commented 1 year ago

i've found the solution, just deactivate libiconv from macports

sudo port deactivate libiconv

Thanks @xaocon and @speelbarrow

SomeoneToIgnore commented 1 year ago

👋 Upstream curl issue had been fixed, new curl-sys version had been released and seems to work on Sonoma. See https://github.com/alexcrichton/curl-rust/issues/524#issuecomment-1753070751 for more details.

ekwoka commented 1 year ago

Now if there is a way to force global crates to use the newest version....

SomeoneToIgnore commented 1 year ago

If global crates are the binary executables installed with cargo install, then cargo install --force can help with that (as mentioned in the details link posted), but nothing can change already compiled and linked executable alas.

HenkPoley commented 1 year ago

I'm seeing something tangentially related:

% cargo-install-update install-update --all
dyld[80649]: Library not loaded: @rpath/libcurl.4.dylib
  Referenced from: <D7283737-5DAF-3CAC-A84D-722B0A103350> /Users/henk/.cargo/bin/cargo-install-update
  Reason: no LC_RPATH's found
zsh: abort      cargo-install-update install-update --all

Even with:

cargo install cargo-update -F curl/force-system-lib-on-osx

Edit: For some reason after some cleaning of .vimrc and ~/vim/, pnpm, and conda after which topgrade worked again, I haven't seen the "Reason: no LC_RPATH's found" issue (even without -F curl/force-system-lib-on-osx).

Edt2: Probably the conda update python -n base command:

The following packages will be UPDATED:

  libcurl                                 7.88.1-h3e2b118_1 --> 8.4.0-h3e2b118_0 

Even though I was running under conda deactivate (no '(base)' prompt).