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

Dependencies for usage? #1

Open
ttay24 opened this issue Mar 26, 2022 · 3 comments
Open

Dependencies for usage? #1

ttay24 opened this issue Mar 26, 2022 · 3 comments
Assignees

Comments

@ttay24
Copy link

ttay24 commented Mar 26, 2022

Hi, I’m trying to pull this package into just a basic binary to test it out. I am getting an error when it’s compiling libperl-sys. I was wondering if you knew if there were certain dependencies that I need installed in order for the package to build.

I believe the error was with regard to linking Perl (-lperl missing or something to that extent).

I tried to use windows, and then moved onto WSL running ubuntu. Thank you!

@hkoba
Copy link
Owner

hkoba commented Mar 26, 2022

Hi! Thank you for reporting the lack of documentation for dependencies. Yes, I should write it in README!

In ubuntu, I use below to build it. (Same is used in runtest-docker.zsh)

sudo apt install -y llvm-dev libclang-dev clang

I hope this helps.

Thank you!

@hkoba hkoba self-assigned this Mar 26, 2022
@ttay24
Copy link
Author

ttay24 commented Mar 26, 2022

Thanks for the quick response!

I just tried this, and it looks like I already have them installed. I want to say I copied it out of that file earlier :)

Reading package lists... Done
Building dependency tree       
Reading state information... Done
clang is already the newest version (1:10.0-50~exp1).
libclang-dev is already the newest version (1:10.0-50~exp1).
llvm-dev is already the newest version (1:10.0-50~exp1).
0 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.

Edit:
now it seems like I'm getting a different error than the one in that other issue.

   Compiling libperl-sys v0.2.0
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-Wl,--version-script=/tmp/rustcnpE923/list" "-m64" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.0.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.1.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.10.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.11.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.12.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.13.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.14.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.15.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.2.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.3.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.4.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.5.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.6.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.7.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.8.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.libperl_sys.6de8a175-cgu.9.rcgu.o" "/home/ttay24/development/tss/test-perl/target/debug/deps/libperl_sys-415add4f6d7186ff.378hnq0eq6nm0g2d.rcgu.o" "-Wl,--as-needed" "-L" "/home/ttay24/development/tss/test-perl/target/debug/deps" "-L" "/usr/local/lib" "-L" "/usr/lib/x86_64-linux-gnu/perl/5.30/CORE" "-L" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lperl" "-ldl" "-lm" "-lpthread" "-lc" "-lcrypt" "-Wl,--start-group" "-Wl,-Bstatic" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a46a068050a12a4b.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1df56095db9453cb.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-9062de483386e50b.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-b988ab269ff13602.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1bc822d886d4f7bd.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-963eca8df4c224a6.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d805b480c9102e58.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-06dfdbc22b935051.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-d7523a4d118e6572.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-5d7898c7fac3a07d.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-8c2bdbab4845bf3d.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-d578639df0547b30.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-58bbb7b1efa3a5e2.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-4c9b082d197c16f8.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-70f9ed6d8e7a5ce6.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-8c0a241d0360fa53.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-bad7ed93fdd31371.rlib" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-98b4d121af2b7335.rlib" "-Wl,--end-group" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-1d9f7e5920635d15.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/ttay24/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/ttay24/development/tss/test-perl/target/debug/deps/liblibperl_sys-415add4f6d7186ff.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs" "-Wl,-rpath,/usr/lib/x86_64-linux-gnu/perl/5.30/CORE"
  = note: /usr/bin/ld: cannot find -lperl
          collect2: error: ld returned 1 exit status
          

error: could not compile `libperl-sys` due to previous error

@hkoba
Copy link
Owner

hkoba commented Mar 27, 2022

Hi!

For -lperl issue, see this comment: #2 (comment)

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