Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Can't be included in a dylib type crate #145

Open
JakeBecker opened this issue Aug 10, 2018 · 1 comment
Open

Can't be included in a dylib type crate #145

JakeBecker opened this issue Aug 10, 2018 · 1 comment
Labels

Comments

@JakeBecker
Copy link

JakeBecker commented Aug 10, 2018

Tested on Mac OS Sierra. Including parquet as a dependency in a crate with

[lib]
crate-type = ["dylib"]

Causes the linker to fail:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/jakebecker/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" [really long command omitted]

  = note: duplicate symbol _XXH64_digest in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_digest in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_reset in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_reset in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH_versionNumber in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_hashFromCanonical in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_hashFromCanonical in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_canonicalFromHash in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_canonicalFromHash in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_copyState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_copyState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_createState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_createState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_freeState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_freeState in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64_update in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32_update in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH64 in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          duplicate symbol _XXH32 in:
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/libzstd_sys-7acf92beb8282696.rlib(xxhash.o)
              /var/folders/ff/stmyfx1s5yqg_0pl1fq6cft80000gn/T/rustcfOjx4t/liblz4_sys-e1d5bb1cebde788e.rlib(xxhash.o)
          ld: 19 duplicate symbols for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

It appears that both libzstd and liblz4 include the C library xxhash, and this causes the duplicate symbol error.

@sunchao
Copy link
Owner

sunchao commented Aug 10, 2018

Thanks for reporting this @JakeBecker . Not very familiar with dylib myself but will take a look at the duplicated symbol error.

@sunchao sunchao added the bug label Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants