Open griff opened 7 years ago
The same here. @johnschug can you please help to find the reason of this error?
Here's my setup:
rustc --version
: rustc 1.21.0cargo --version
: cargo 0.21.1gpg --version
: gpg (GnuPG) 2.2.3 libgcrypt 1.8.1gpgme-config --version
1.9.0Everything is installed via brew
. No other known issues.
Full error message:
» cargo run --verbose --example keylist --
Fresh lazy_static v0.2.11
Fresh gcc v0.3.54
Fresh libc v0.2.34
Fresh custom_derive v0.1.7
Fresh getopts v0.2.15
Fresh cfg-if v0.1.2
Fresh bitflags v0.9.1
Fresh rand v0.3.18
Fresh conv v0.3.3
Fresh tempdir v0.3.5
Fresh libgpg-error-sys v0.2.3
Fresh gpgme-sys v0.6.1 (file:///Users/sobolev/Desktop/rust-gpgme-master/gpgme-sys)
Fresh gpg-error v0.2.2
Compiling gpgme v0.6.1 (file:///Users/sobolev/Desktop/rust-gpgme-master)
Running `rustc --crate-name keylist examples/keylist.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="gpgme-sys"' --cfg 'feature="v1_3_0"' --cfg 'feature="v1_3_1"' --cfg 'feature="v1_4_0"' --cfg 'feature="v1_4_2"' --cfg 'feature="v1_4_3"' --cfg 'feature="v1_5_0"' --cfg 'feature="v1_5_1"' --cfg 'feature="v1_6_0"' --cfg 'feature="v1_7_0"' --cfg 'feature="v1_7_1"' --cfg 'feature="v1_8_0"' --cfg 'feature="v1_9_0"' -C metadata=4d32da24c0c09a9d -C extra-filename=-4d32da24c0c09a9d --out-dir /Users/sobolev/Desktop/rust-gpgme-master/target/debug/examples -L dependency=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps --extern getopts=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgetopts-fd455720cba98519.rlib --extern tempdir=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libtempdir-355c78ded3c7c233.rlib --extern conv=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libconv-f45ddf999f1cb111.rlib --extern libc=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblibc-57f54566e96d170a.rlib --extern gpgme_sys=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme_sys-97b9f6262d819db0.rlib --extern cfg_if=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libcfg_if-76d1547ec6ace83c.rlib --extern bitflags=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libbitflags-3028607acc680b0b.rlib --extern gpg_error=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpg_error-9eac4f45e1ddeb41.rlib --extern lazy_static=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblazy_static-0ae5c0bc89e40f9c.rlib --extern gpgme=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme-bf667998cb8c949a.rlib -L native=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/build/libgpg-error-sys-52baa3959d9cdaf2/out/lib -L native=/usr/local/opt/gpgme/lib -L native=/usr/local/opt/libassuan/lib -L native=/usr/local/opt/libgpg-error/lib`
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/examples/keylist-4d32da24c0c09a9d.0.o" "-o" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/examples/keylist-4d32da24c0c09a9d" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/examples/keylist-4d32da24c0c09a9d.crate.allocator.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps" "-L" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/build/libgpg-error-sys-52baa3959d9cdaf2/out/lib" "-L" "/usr/local/opt/gpgme/lib" "-L" "/usr/local/opt/libassuan/lib" "-L" "/usr/local/opt/libgpg-error/lib" "-L" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgetopts-fd455720cba98519.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme-bf667998cb8c949a.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblazy_static-0ae5c0bc89e40f9c.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme_sys-97b9f6262d819db0.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libcfg_if-76d1547ec6ace83c.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libconv-f45ddf999f1cb111.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblibc-57f54566e96d170a.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpg_error-9eac4f45e1ddeb41.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libbitflags-3028607acc680b0b.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libcustom_derive-dfda4718d0b93900.rlib" "/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblibgpg_error_sys-c00edeb6dc3d402f.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-d6e7f5e476a23265.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-22ef5dcc18b79f0a.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-1ca97dc81589a37e.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-d121e52ef669781d.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-462c3781984390a6.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-2717e8ec5865cc19.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-abb2a8045071f514.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-41d89bf987a47b5b.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/librand-dc272821cf9c4b0d.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-6020affa555cca3d.rlib" "/usr/local/Cellar/rust/1.21.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-b02639f7966b7f27.rlib" "-l" "gpgme" "-l" "assuan" "-l" "gpg-error" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
= note: Undefined symbols for architecture x86_64:
"_libintl_dgettext", referenced from:
__gpg_strerror_r in liblibgpg_error_sys-c00edeb6dc3d402f.rlib(libgpg_error_la-strerror.o)
__gpg_strsource in liblibgpg_error_sys-c00edeb6dc3d402f.rlib(libgpg_error_la-strsource.o)
"_libintl_bindtextdomain", referenced from:
_real_init in liblibgpg_error_sys-c00edeb6dc3d402f.rlib(libgpg_error_la-init.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: Could not compile `gpgme`.
Caused by:
process didn't exit successfully: `rustc --crate-name keylist examples/keylist.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg feature="default" --cfg feature="gpgme-sys" --cfg feature="v1_3_0" --cfg feature="v1_3_1" --cfg feature="v1_4_0" --cfg feature="v1_4_2" --cfg feature="v1_4_3" --cfg feature="v1_5_0" --cfg feature="v1_5_1" --cfg feature="v1_6_0" --cfg feature="v1_7_0" --cfg feature="v1_7_1" --cfg feature="v1_8_0" --cfg feature="v1_9_0" -C metadata=4d32da24c0c09a9d -C extra-filename=-4d32da24c0c09a9d --out-dir /Users/sobolev/Desktop/rust-gpgme-master/target/debug/examples -L dependency=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps --extern getopts=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgetopts-fd455720cba98519.rlib --extern tempdir=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libtempdir-355c78ded3c7c233.rlib --extern conv=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libconv-f45ddf999f1cb111.rlib --extern libc=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblibc-57f54566e96d170a.rlib --extern gpgme_sys=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme_sys-97b9f6262d819db0.rlib --extern cfg_if=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libcfg_if-76d1547ec6ace83c.rlib --extern bitflags=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libbitflags-3028607acc680b0b.rlib --extern gpg_error=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpg_error-9eac4f45e1ddeb41.rlib --extern lazy_static=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/liblazy_static-0ae5c0bc89e40f9c.rlib --extern gpgme=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/deps/libgpgme-bf667998cb8c949a.rlib -L native=/Users/sobolev/Desktop/rust-gpgme-master/target/debug/build/libgpg-error-sys-52baa3959d9cdaf2/out/lib -L native=/usr/local/opt/gpgme/lib -L native=/usr/local/opt/libassuan/lib -L native=/usr/local/opt/libgpg-error/lib` (exit code: 101)
@sobolevn the problem is that on linux among others the gettext api is implemented directly in glibc while on macOS you have to install it. I did a fix for this locally by modifying the rust gettext crate to statically link gettext on macOS and make rust-gpg-error depend on that crate but I haven't published any of it anywhere.
@griff Could you please publish it is as a gist (for now at least)?
When I run
cargo run -vv --example keylist --
on macOS High Sierra I just end up getting a link error: