You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compilation fails on MacOS 12.0.1 due to missing _iconv symbols
Now this is obviously as it says since it's using a different install location, most likely from the SDK iconv which doesn't provide this symbols. That said, I just can't figure out how to force it to use the correct one.
As you can see in the error log below, which is generated from
Brew bottle works for what it's worth so not a huge problem - that said I would need some further help digging if you're interested in debugging this (but also understand if you're not :)). Given it's a frequent, well documented error it might be worth fixing it (or at least keeping this open so others can find it and use brew).
And since nobody reads long issue descriptions, for people from google
solved by using brew bottle vs installing from source
Describe the bug
Compilation fails on MacOS 12.0.1 due to missing _iconv symbols
Now this is obviously as it says since it's using a different install location, most likely from the SDK iconv which doesn't provide this symbols. That said, I just can't figure out how to force it to use the correct one.
As you can see in the error log below, which is generated from
on the current master, it does pick up the location.
I can also confirm that indeed that lib contains the required symbols, however it still doesn't seem to use them
nm /opt/homebrew/opt/libiconv/lib//libiconv.2.dylib | rg close 000000000000526c T _libiconv_close
Any help here?
error log
= note: undefined symbols for architecture arm64: "_iconv", referenced from: _git_fs_path_iconv in liblibgit2_sys-8c1c49e6f1be4fb6.rlib(fs_path.o) (maybe you meant: _git_fs_path_iconv, _git_fs_path_iconv_clear , _git_fs_path_iconv_init_precompose ) "_iconv_close", referenced from: _git_fs_path_iconv_clear in liblibgit2_sys-8c1c49e6f1be4fb6.rlib(fs_path.o) "_iconv_open", referenced from: _git_fs_path_iconv_init_precompose in liblibgit2_sys-8c1c49e6f1be4fb6.rlib(fs_path.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)error: could not compile
gitui
due to previous errorcaused by:
process didn't exit successfully:
rustc --crate-name gitui --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -c embed-bitcode=no -c split-debuginfo=unpacked -c debuginfo=2 --cfg 'feature="default"' --cfg 'feature="gh-emoji"' --cfg 'feature="ghemoji"' --cfg 'feature="trace-libgit"' -c metadata=24098d56512c14f2 -c extra-filename=-24098d56512c14f2 --out-dir /users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps --target aarch64-apple-darwin -c incremental=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/incremental -l dependency=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps -l dependency=/users/yingzhu/gitui/target/debug/deps --extern anyhow=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libanyhow-e0c5e043bd9d01e5.rlib --extern asyncgit=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libasyncgit-cafb2126f1c3ff7d.rlib --extern backtrace=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libbacktrace-2fca0e941eb9cb76.rlib --extern bitflags=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libbitflags-70befd232f377a82.rlib --extern bugreport=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libbugreport-a40cceb44e4a62c1.rlib --extern bytesize=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libbytesize-bda95e913fe0091e.rlib --extern chrono=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libchrono-330480ed9e468d22.rlib --extern clap=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libclap-b449dd6250b93990.rlib --extern crossbeam_channel=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libcrossbeam_channel-2abbcf6a000eabf6.rlib --extern crossterm=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libcrossterm-374c4c96ad9521f8.rlib --extern dirs_next=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libdirs_next-8326e75e9e49c827.rlib --extern easy_cast=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libeasy_cast-a32c9a561adb3458.rlib --extern filetreelist=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libfiletreelist-1abf9b1c45b8294e.rlib --extern fuzzy_matcher=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libfuzzy_matcher-209a54a503403db9.rlib --extern gh_emoji=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libgh_emoji-7c719ba8c7ff5ed7.rlib --extern itertools=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libitertools-84abd0173cf116c4.rlib --extern lazy_static=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/liblazy_static-379fe28123f2618f.rlib --extern log=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/liblog-9cb3579b2799ed2b.rlib --extern rayon_core=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/librayon_core-548c264e673a5c39.rlib --extern ron=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libron-86fa92687b5b3135.rlib --extern scopeguard=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libscopeguard-122cd3c8bd4e5623.rlib --extern scopetime=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libscopetime-3ed2c4ea54090efb.rlib --extern serde=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libserde-4237e171c52078c7.rlib --extern simplelog=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libsimplelog-1d3c61d1cbb9cca1.rlib --extern syntect=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libsyntect-1fe23898aa45e9b8.rlib --extern textwrap=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libtextwrap-526e8094fc1c0dc3.rlib --extern tui=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libtui-37c557cb816f76f8.rlib --extern unicode_segmentation=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libunicode_segmentation-e25b980839d2773c.rlib --extern unicode_truncate=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libunicode_truncate-81861e304cade4fc.rlib --extern unicode_width=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/deps/libunicode_width-2a3d9792650bef3c.rlib -l /opt/homebrew/opt/libiconv/lib/ -l native=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/build/libgit2-sys-bbcd2036835da531/out/build -l native=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/build/libssh2-sys-1c8b8c4ee966f43d/out/build -l native=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/build/openssl-sys-0fbc82104a0f8789/out/openssl-build/install/lib -l native=/users/yingzhu/gitui/target/aarch64-apple-darwin/debug/build/sys-info-f560534a1daf1044/out
(exit status: 1)I've tried all solutions on these issues:
-rust-lang/git2-rs#263
-rust-lang/git2-rs#180
Context (please complete the following information):
M1 MacBook Air - same issue with cargo install.
MacOS 12.0.1
gitui from both master and cargo
The text was updated successfully, but these errors were encountered: