bombardier icon indicating copy to clipboard operation
bombardier copied to clipboard

compiling failled on Linux

Open corentinway opened this issue 3 years ago • 2 comments

Hello,

I cloned the branch develop and run cargo test. It is failing. Here is my output :

➜  bombardier git:(develop) cargo test
    Blocking waiting for file lock on build directory
   Compiling cfg-if v1.0.0
   Compiling cfg-if v0.1.10
   Compiling lazy_static v1.4.0
   Compiling itoa v0.4.6
   Compiling scopeguard v1.1.0
   Compiling bytes v1.0.1
   Compiling pin-project-lite v0.2.7
   Compiling instant v0.1.6
   Compiling smallvec v1.6.1
   Compiling fnv v1.0.7
   Compiling futures-sink v0.3.16
   Compiling bytes v0.5.6
   Compiling matches v0.1.8
   Compiling once_cell v1.8.0
   Compiling percent-encoding v2.1.0
   Compiling slab v0.4.2
   Compiling ppv-lite86 v0.2.8
   Compiling tinyvec v0.3.3
   Compiling futures-io v0.3.16
   Compiling pin-utils v0.1.0
   Compiling cpufeatures v0.1.5
   Compiling opaque-debug v0.3.0
   Compiling base64 v0.13.0
   Compiling foreign-types-shared v0.1.1
   Compiling hashbrown v0.11.2
   Compiling regex-syntax v0.6.25
   Compiling try-lock v0.2.3
   Compiling mime v0.3.16
   Compiling utf-8 v0.7.5
   Compiling openssl-probe v0.1.2
   Compiling remove_dir_all v0.5.3
   Compiling httpdate v0.3.2
   Compiling tower-service v0.3.0
   Compiling unicode-width v0.1.8
   Compiling safemem v0.3.3
   Compiling linked-hash-map v0.5.4
   Compiling quick-error v1.2.3
   Compiling either v1.5.3
   Compiling scoped-tls v1.0.0
   Compiling ansi_term v0.11.0
   Compiling vec_map v0.8.2
   Compiling yansi v0.5.0
   Compiling dtoa v0.4.8
   Compiling ipnet v2.3.0
   Compiling glob v0.3.0
   Compiling encode_unicode v0.3.6
   Compiling strsim v0.8.0
   Compiling rustc-hash v1.1.0
   Compiling gjson v0.8.0
   Compiling tracing-core v0.1.18
   Compiling lock_api v0.4.1
   Compiling unicode-bidi v0.3.4
   Compiling form_urlencoded v1.0.1
   Compiling input_buffer v0.4.0
   Compiling http v0.2.1
   Compiling unicode-normalization v0.1.13
   Compiling foreign-types v0.3.2
   Compiling textwrap v0.11.0
   Compiling yaml-rust v0.4.5
   Compiling libc v0.2.98
   Compiling memchr v2.4.0
   Compiling log v0.4.14
   Compiling futures-core v0.3.16
   Compiling futures-task v0.3.16
   Compiling libxml v0.3.0
error: failed to run custom build command for `libxml v0.3.0`

Caused by:
  process didn't exit successfully: `/home/john/coding/review/bombardier/target/debug/build/libxml-c84daca3937aeda0/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/john/.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

corentinway avatar Feb 21 '22 23:02 corentinway

It is working if I set the environment variable LIBXML2. For example :

➜  bombardier git:(develop) LIBXML2=/usr/lib/x86_64-linux-gnu/libxml2.so.2 cargo build

but now cc is missing for linking

corentinway avatar Feb 22 '22 00:02 corentinway

@corentinway generally linux comes with all required libs. If not, you may have to install the required libs as needed. Bombardier uses an XML parser which relies on libxml2

Have you installed pkgconfig? If you do , you do not need to set the env variable you have set

coding-yogi avatar Feb 22 '22 00:02 coding-yogi