KWARC/llamapun

installation fails on Windows Subsystem for Linux

zeinramadan opened this issue · 3 comments

I am trying to install llamapun on WSL, after cloning the repo and doing cargo build I get the error message above. I also added the full error log:

(base) zein@LAPTOP-C8QC3POK:/mnt/c/Users/ASUS/PycharmProjects/pythonProject1/llamapun_preproc/llamapun$ cargo build
   Compiling autocfg v1.0.1
   Compiling libc v0.2.97
   Compiling lazy_static v1.4.0
   Compiling cfg-if v1.0.0
   Compiling crossbeam-utils v0.8.5
   Compiling maybe-uninit v2.0.0
   Compiling scopeguard v1.1.0
   Compiling cfg-if v0.1.10
   Compiling crossbeam-epoch v0.9.5
   Compiling rayon-core v1.9.1
   Compiling memchr v2.4.0
   Compiling pkg-config v0.3.19
   Compiling gcc v0.3.55
   Compiling version_check v0.9.3
   Compiling either v1.6.1
   Compiling ahash v0.3.8
   Compiling rustmorpha v0.1.0 (https://github.com/jfschaefer/rust-morpha.git#47b5a3e5)
   Compiling rust-senna v0.0.1 (https://github.com/jfschaefer/rust-senna.git#ff14b50b)
   Compiling libc v0.1.12
   Compiling same-file v1.0.6
   Compiling rustc-serialize v0.3.24
   Compiling regex-syntax v0.6.25
   Compiling byteorder v1.4.3
   Compiling unidecode v0.3.0
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.6.4
   Compiling memoffset v0.5.6
   Compiling crossbeam-epoch v0.8.2
   Compiling rayon v1.5.1
   Compiling hashbrown v0.7.2
   Compiling circular-queue v0.2.6
   Compiling walkdir v2.3.2
   Compiling libxml v0.3.0
   Compiling gnuplot v0.0.37
   Compiling rust-crypto v0.2.36
   Compiling crossbeam-channel v0.5.1
   Compiling aho-corasick v0.7.18
   Compiling num_cpus v1.13.0
   Compiling rand v0.4.6
   Compiling time v0.1.44
   Compiling filetime v0.2.14
   Compiling xattr v0.2.2
   Compiling tar v0.4.35
   Compiling rand v0.3.23
error: failed to run custom build command for 'libxml v0.3.0'

Caused by:
  process didn't exit successfully: '/mnt/c/Users/ASUS/PycharmProjects/pythonProject1/llamapun_preproc/llamapun/target/debug/build/libxml-d9f90abb8e4126f0/build-script-build' (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBXML_2.0_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=LIBXML_2.0_STATIC
  cargo:rerun-if-env-changed=LIBXML_2.0_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'Could not find libxml2.', /home/zein/.cargo/registry/src/github.com-1ecc6299db9ec823/libxml-0.3.0/build.rs:25:5
  note: run with 'RUST_BACKTRACE=1' environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Hi @zeinramadan , you may be the first one trying llamapun on windows, even if on WSL, so expect you'll need to debug further than this.

On a regular linux machine you need the libxml2 headers to build the rust wrapper for libxml, which llamapun uses to process HTML sources. Usually for Ubuntu that's:

sudo apt install libxml2-dev

You can see if that gets the installation further, and let me know what else comes up.

hi @dginev! thanks for the quick reply. Running that command fixed it for me, the build now passes succesfully, thank you!

I hope you can find some usable bits in the library @zeinramadan ! But as a cautionary note, I have been transitioning the useful preprocessing bits of it into a new crate, which is still a private repository. In particular all work related to #59 resides in a separate repository. So depending on what you're looking for, your mileage may vary.

I should really make the other crate public and post it to crates.io, but it's hard to schedule adding the last pieces needed to do so...