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

gut fails to compile, with two error messages #141

Open
Trondtr opened this issue Jun 4, 2020 · 3 comments
Open

gut fails to compile, with two error messages #141

Trondtr opened this issue Jun 4, 2020 · 3 comments

Comments

@Trondtr
Copy link
Contributor

Trondtr commented Jun 4, 2020

Here quoting the two contexts with --verbatim for the install command:

First error message.
[email protected]/lib' -L native=/Users/ttr000/git/divvun/gut/target/release/build/libsodium-sys-ff8a80687c55792f/out/installed/liberror: linking withcc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/ttr000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib"


Second error message:

pple-darwin/lib/libcompiler_builtins-d477341ac8788dd1.rlib" "-framework" "Security" "-framework" "CoreFoundation" "-lc" "-liconv" "-framework" "Security" "-framework" "CoreFoundation" "-lssl" "-lcrypto" "-lz" "-lSystem" "-lresolv" "-lc" "-lm"
= note: Undefined symbols for architecture x86_64:
"_libiconv", referenced from:
_git_path_iconv in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
"_libiconv_open", referenced from:
_git_path_direach in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
_git_path_iconv_init_precompose in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
_git_path_diriter_init in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
"_libiconv_close", referenced from:
_git_path_direach in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
_git_path_iconv_clear in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
_git_path_diriter_free in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
_git_path_dirload in liblibgit2_sys-bfd1f42cb630ddc7.rlib(path.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

error: failed to compile gut v0.1.0 (/Users/ttr000/git/divvun/gut), intermediate artifacts can be found at /Users/ttr000/git/divvun/gut/target

Caused by:
could not compile gut.

Caused by:
process didn't exit successfully: rustc --crate-name gut --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=f5ce7c87ba1e6b93 -C extra-filename=-f5ce7c87ba1e6b93 --out-dir /Users/ttr000/git/divvun/gut/target/release/deps -L dependency=/Users/ttr000/git/divvun/gut/target/release/deps --extern anyhow=/Users/ttr000/git/divvun/gut/target/release/deps/libanyhow-169802d69c901f5a.rlib --extern base64=/Users/ttr000/git/divvun/gut/target/release/deps/libbase64-8232222c2253c052.rlib --extern color_backtrace=/Users/ttr000/git/divvun/gut/target/release/deps/libcolor_backtrace-d53a4798752f82a4.rlib --extern colored=/Users/ttr000/git/divvun/gut/target/release/deps/libcolored-de096d3467e23c5e.rlib --extern dialoguer=/Users/ttr000/git/divvun/gut/target/release/deps/libdialoguer-71bcfebfb9658e9e.rlib --extern dirs=/Users/ttr000/git/divvun/gut/target/release/deps/libdirs-59721dc778ada7d2.rlib --extern git2=/Users/ttr000/git/divvun/gut/target/release/deps/libgit2-1f16106823caf48c.rlib --extern git2_credentials=/Users/ttr000/git/divvun/gut/target/release/deps/libgit2_credentials-fc76ed3ea2126a01.rlib --extern graphql_client=/Users/ttr000/git/divvun/gut/target/release/deps/libgraphql_client-d02716c7a11efbad.rlib --extern log=/Users/ttr000/git/divvun/gut/target/release/deps/liblog-784a14da354a30e7.rlib --extern pretty_env_logger=/Users/ttr000/git/divvun/gut/target/release/deps/libpretty_env_logger-2a72f28d95553d05.rlib --extern prettytable=/Users/ttr000/git/divvun/gut/target/release/deps/libprettytable-4bd43f2ef20ec1af.rlib --extern regex=/Users/ttr000/git/divvun/gut/target/release/deps/libregex-1159940a5ea1ce00.rlib --extern reqwest=/Users/ttr000/git/divvun/gut/target/release/deps/libreqwest-0b5300538c74e222.rlib --extern serde=/Users/ttr000/git/divvun/gut/target/release/deps/libserde-7fff7222d6448486.rlib --extern serde_json=/Users/ttr000/git/divvun/gut/target/release/deps/libserde_json-f7be05e80323f42b.rlib --extern sodiumoxide=/Users/ttr000/git/divvun/gut/target/release/deps/libsodiumoxide-bf91d426ea6ce77f.rlib --extern structopt=/Users/ttr000/git/divvun/gut/target/release/deps/libstructopt-a50b2d2ee89d4850.rlib --extern thiserror=/Users/ttr000/git/divvun/gut/target/release/deps/libthiserror-cb92f3e948327637.rlib --extern toml=/Users/ttr000/git/divvun/gut/target/release/deps/libtoml-c2865cc74c64cb8d.rlib --extern uuid=/Users/ttr000/git/divvun/gut/target/release/deps/libuuid-d20c1596f9ba0993.rlib --extern walkdir=/Users/ttr000/git/divvun/gut/target/release/deps/libwalkdir-9ecb25d92ba12044.rlib -L native=/Users/ttr000/git/divvun/gut/target/release/build/libgit2-sys-f87e526b0601479b/out/build -L native=/Users/ttr000/git/divvun/gut/target/release/build/libssh2-sys-c1580b8af13e210a/out/build -L 'native=/usr/local/opt/[email protected]/lib' -L native=/Users/ttr000/git/divvun/gut/target/release/build/libsodium-sys-ff8a80687c55792f/out/installed/lib (exit code: 1)
(base) tf-hsl-m0016:gut ttr000$

@Trondtr
Copy link
Contributor Author

Trondtr commented Jun 4, 2020

(The "artefact" referred to in the error message was a release note).

@flammie
Copy link
Contributor

flammie commented Jun 23, 2020

I get the same on fresh mac... googling suggests it has to do with conflicting iconv versions between the os and macports but I haven’t found a working fix yet.

@flammie
Copy link
Contributor

flammie commented Jun 24, 2020

I fixed it with this somehow but it didn't work fully the first time and but I did tons of other workarounds: https://stackoverflow.com/questions/12619600/libiconv-and-macos

sudo port -f deactivate libiconv
LIBGIT2_SYS_USE_PKG_CONFIG=1 cargo build
sudo port -f activate libiconv

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