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

compile 1.3.1 with rustc 1.28.0 #1821

Closed
sietedosfede opened this Issue Aug 12, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@sietedosfede

sietedosfede commented Aug 12, 2018

while compiling diesel v1.3.1 with rustc 1.28.0 (9634041f0 2018-07-30) throws

Compiling diesel_cli v1.3.1                                                                                                                         
  Running `rustc --crate-name diesel src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="diesel"' --cfg 'feature="infer
_schema_internals"' --cfg 'feature="postgres"' --cfg 'feature="url"' -C metadata=0cc2de82d69fbe9c -C extra-filename=-0cc2de82d69fbe9c --out-dir /tmp/ca
rgo-installdNlheq/release/deps -L dependency=/tmp/cargo-installdNlheq/release/deps --extern chrono=/tmp/cargo-installdNlheq/release/deps/libchrono-572c
0914d1497755.rlib --extern clap=/tmp/cargo-installdNlheq/release/deps/libclap-faadc703237b74a6.rlib --extern diesel=/tmp/cargo-installdNlheq/release/de
ps/libdiesel-a630f6b1a0a12992.rlib --extern dotenv=/tmp/cargo-installdNlheq/release/deps/libdotenv-ecd18fc51fee410f.rlib --extern infer_schema_internals=/tmp/cargo-installdNlheq/release/deps/libinfer_schema_internals-9e4dd7fbeeb8a15f.rlib --extern migrations_internals=/tmp/cargo-installdNlheq/release/deps/libmigrations_internals-db84fa069b54ea05.rlib --extern serde=/tmp/cargo-installdNlheq/release/deps/libserde-02f0c2782bc4dc96.rlib --extern tempfile=/tmp/cargo-installdNlheq/release/deps/libtempfile-bf43862d842ac0b6.rlib --extern toml=/tmp/cargo-installdNlheq/release/deps/libtoml-2cb807aca62df4ff.rlib --extern url=/tmp/cargo-installdNlheq/release/deps/liburl-4d87a64a37ea97ed.rlib --cap-lints allow -L native=/tmp/cargo-installdNlheq/release/build/backtrace-sys-421f69dfa3fc58cc/out`                                                                                                                   error: linking with `cc` failed: exit code: 1                                                                                                            |                                                                                                                                                      = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unkn
own-linux-gnu/lib" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel0-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-install
dNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel1-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69own-linux-gnu/lib" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel0-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/carg[35/1544]dNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel1-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel10-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel11-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel12-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel13-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel14-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel15-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel2-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel3-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel4-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel5-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel6-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel7-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel8-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c.diesel9-fae96a36b9085a133633de93aba5e4.rs.rcgu.o" "-o" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9c" "/tmp/cargo-installdNlheq/release/deps/diesel-0cc2de82d69fbe9
c.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-installdNlheq/release/deps" "-L"
 "/tmp/cargo-installdNlheq/release/build/backtrace-sys-421f69dfa3fc58cc/out" "-L" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rus
tlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-installdNlheq/release/deps/liburl-4d87a64a37ea97ed.rlib" "/tmp/cargo-installdNlheq/releas
e/deps/libpercent_encoding-50fbe7728ff51527.rlib" "/tmp/cargo-installdNlheq/release/deps/libidna-97a9259435cc70a4.rlib" "/tmp/cargo-installdNlheq/relea
se/deps/libunicode_normalization-3bfaf82cce691484.rlib" "/tmp/cargo-installdNlheq/release/deps/libunicode_bidi-7dae8595a7811011.rlib" "/tmp/cargo-insta
lldNlheq/release/deps/libmatches-8507a13154d15892.rlib" "/tmp/cargo-installdNlheq/release/deps/libtoml-2cb807aca62df4ff.rlib" "/tmp/cargo-installdNlheq
/release/deps/libtempfile-bf43862d842ac0b6.rlib" "/tmp/cargo-installdNlheq/release/deps/libremove_dir_all-be896cbd84ef5017.rlib" "/tmp/cargo-installdNl
heq/release/deps/librand-88126ea31e4f296b.rlib" "/tmp/cargo-installdNlheq/release/deps/librand_core-fb36b2e94c9f9794.rlib" "/tmp/cargo-installdNlheq/re
lease/deps/libmigrations_internals-db84fa069b54ea05.rlib" "/tmp/cargo-installdNlheq/release/deps/libinfer_schema_internals-9e4dd7fbeeb8a15f.rlib" "/tmp
/cargo-installdNlheq/release/deps/libserde-02f0c2782bc4dc96.rlib" "/tmp/cargo-installdNlheq/release/deps/libdotenv-ecd18fc51fee410f.rlib" "/tmp/cargo-i
nstalldNlheq/release/deps/libregex-93eb6a96d91db25d.rlib" "/tmp/cargo-installdNlheq/release/deps/libutf8_ranges-7b4e8573c661902f.rlib" "/tmp/cargo-inst
alldNlheq/release/deps/libregex_syntax-8eabda254edd0c9e.rlib" "/tmp/cargo-installdNlheq/release/deps/libucd_util-8659dcfa4d96621c.rlib" "/tmp/cargo-ins
talldNlheq/release/deps/libthread_local-217f03c276d2696c.rlib" "/tmp/cargo-installdNlheq/release/deps/liblazy_static-0733736c8f3756b9.rlib" "/tmp/cargo
-installdNlheq/release/deps/libunreachable-67e686944e678e11.rlib" "/tmp/cargo-installdNlheq/release/deps/libvoid-9b6684705abad601.rlib" "/tmp/cargo-installdNlheq/release/deps/libaho_corasick-e91ede1a34155cd7.rlib" "/tmp/cargo-installdNlheq/release/deps/libmemchr-56c1d2a5b42b96a8.rlib" "/tmp/cargo-installdNlheq/release/deps/liberror_chain-c48bd8d19973d1a6.rlib" "/tmp/cargo-installdNlheq/release/deps/libbacktrace-57b35f9f404e765a.rlib" "/tmp/cargo-installdNlheq/release/deps/libbacktrace_sys-3f1829d24035dc68.rlib" "/tmp/cargo-installdNlheq/release/deps/librustc_demangle-446346a40b1cc6cd.rlib" "/tmp/cargo-installdNlheq/release/deps/libcfg_if-7e77a7e292f7f318.rlib" "/tmp/cargo-installdNlheq/release/deps/libdiesel-a630f6b1a0a12992.rlib" "/tmp/cargo-installdNlheq/release/deps/libpq_sys-191597590f66b0ea.rlib" "/tmp/cargo-installdNlheq/release/deps/libbyteorder-b7b4b49852966a9e.rlib" "/tmp/cargo-installdNlheq/release/deps/libclap-faadc703237b74a6.rlib" "/tmp/cargo-installdNlheq/release/deps/libvec_map-61d7d9d601778039.rlib" "/tmp/cargo-installdNlheq/release/deps/libtextwrap-54a7b490e5349a6a.rlib" "/tmp/cargo-installdNlheq/release/deps/libunicode_width-d98228f4661cd620.rlib" "/tmp/cargo-installdNlheq/release/deps/libstrsim-c416263ac42bc98a.rlib" "/tmp/cargo-installdNlheq/release/deps/libbitflags-01dc19b18dd68016.rlib" "/tmp/cargo-installdNlheq/rel
ease/deps/libatty-fd050134a966e96d.rlib" "/tmp/cargo-installdNlheq/release/deps/libansi_term-0d32170aef8aaffa.rlib" "/tmp/cargo-installdNlheq/release/d
eps/libchrono-572c0914d1497755.rlib" "/tmp/cargo-installdNlheq/release/deps/libnum_integer-1097ea47fa09e7dc.rlib" "/tmp/cargo-installdNlheq/release/depease/deps/libatty-fd050134a966e96d.rlib" "/tmp/cargo-installdNlheq/release/deps/libansi_term-0d32170aef8aaffa.rlib" "/tmp/cargo-installdNlheq/release/deps/libchrono-572c0914d1497755.rlib" "/tmp/cargo-installdNlheq/release/deps/libnum_integer-1097ea47fa09e7dc.rlib" "/tmp/cargo-installdNlheq/release/deps/libnum_traits-d00fc22b7f4e0baa.rlib" "/tmp/cargo-installdNlheq/release/deps/libtime-b58c88de9fde23e4.rlib" "/tmp/cargo-installdNlheq/release/deps/liblibc-8e729355d8a80ac9.rlib" "-Wl,--start-group" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-0cce0e0e34e933aa.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-7bed87070cafeede.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-e76963fdf0c94daa.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-8cd3b0417a81fb26.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-387bd949d1b36a91.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-453d825a151d7dec.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-5235bf36189564a3.rlib" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5725e7f9b84bd931.rlib" "-Wl,--end-group" "/home/fch/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-874d313336916306.rlib" "-Wl,-Bdynamic" "-l" "pq" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
  = note: /usr/bin/ld: cannot find -lpq
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: failed to compile `diesel_cli v1.3.1`, intermediate artifacts can be found at `/tmp/cargo-installdNlheq`

Caused by:
  Could not compile `diesel_cli`.

Caused by:
  process didn't exit successfully: `rustc --crate-name diesel src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg feature="diesel" --cfg feature="infer_schema_internals" --cfg feature="postgres" --cfg feature="url" -C metadata=0cc2de82d69fbe9c -C extra-filename=-0cc2de82d69fbe9c --out-dir /tmp/cargo-installdNlheq/release/deps -L dependency=/tmp/cargo-installdNlheq/release/deps --extern chrono=/tmp/cargo-installdNlheq/release/deps/libchrono-572c0914d1497755.rlib --extern clap=/tmp/cargo-installdNlheq/release/deps/libclap-faadc703237b74a6.rlib --extern diesel=/tmp/cargo-installdNlheq/release/deps/libdiesel-a630f6b1a0a12992.rlib --extern dotenv=/tmp/cargo-installdNlheq/release/deps/libdotenv-ecd18fc51fee410f.rlib --extern infer_schema_internals=/tmp/cargo-installdNlheq/release/deps/libinfer_schema_internals-9e4dd7fbeeb8a15f.rlib --extern migrations_internals=/tmp/cargo-installdNlheq/release/deps/libmigrations_internals-db84fa069b54ea05.rlib --extern serde=/tmp/cargo-installdNlheq/release/deps/libserde-02f0c2782bc4dc96.rlib --extern tempfile=/tmp/cargo-installdNlheq/release/deps/libtempfile-bf43862d842ac0b6.rlib --extern toml=/tmp/cargo-installdNlheq/release/deps/libtoml-2cb807aca62df4ff.rlib --extern url=/tmp/cargo-installdNlheq/release/deps/liburl-4d87a64a37ea97ed.rlib --cap-lints allow -L native=/tmp/cargo-installdNlheq/release/build/backtrace-sys-421f69dfa3fc58cc/out` (exit code: 101)
  cargo install diesel_cli --no-default-features --features postgres --verbose  1441.28s user 19.90s system 356% cpu 6:49.51 total
@weiznich

This comment has been minimized.

Contributor

weiznich commented Aug 12, 2018

This meas that libpq is missing on your system (or that the linker cannot find it)
There is currently nothing that diesel can do about this, therefore I close this issue. Feel free to join our gitter channel for faster support.

@weiznich weiznich closed this Aug 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment