BugBlocker/lotus

compile error + E0061, E0308

reevesy1 opened this issue · 3 comments

Hi, im on Kali, and bit of a noob, especially with rust / lua. This 1st error i get when installing lotus is likely as easy as it sounds and i just dont know how to enable lua53 lol.

INSTALL ERROR**

error: You must enable one of the features: lua54, lua53, lua52, lua51, luajit, luajit52, luau
--> /home/kraykray/.cargo/registry/src/github.com-1ecc6299db9ec823/mlua-0.8.10/build/main.rs:52:5
|
52 | / compile_error!(
53 | | "You must enable one of the features: lua54, lua53, lua52, lua51, luajit, luajit52, luau"
54 | | );
| |_____^

error: could not compile mlua due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile lotus v0.5.0-beta (https://github.com/BugBlocker/lotus/#fd453990), intermediate artifacts can be found at /tmp/cargo-installmqD92b


Could you tell me best way to go about it as that might fix these following errors that come up when using test

TEST ERROR******

Compiling tealr_derive v0.9.0-alpha4
Compiling tealr v0.9.0-alpha4
Compiling lotus v0.5.0-beta (/home/kraykray/tools/lotus-0.5-beta)
error[E0061]: this function takes 5 arguments but 4 arguments were supplied
--> tests/http.rs:11:10
|
11 | .send(
| ^^^^
...
15 | sender.clone(),
| -------------- an argument of type Option<HashMap<String, MultiPart>> is missing
|
note: associated function defined here
--> /home/kraykray/tools/lotus-0.5-beta/src/lua/network/http.rs:134:18
|
134 | pub async fn send(
| ^^^^
help: provide the argument
|
11 | .send("GET", "https://httpbin.org/get".to_string(), None, /* Option<HashMap<String, MultiPart>> */, sender.clone())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try rustc --explain E0061.
error: could not compile lotus due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0308]: mismatched types
--> tests/url.rs:8:34
|
8 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
8 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

error[E0308]: mismatched types
--> tests/url.rs:27:34
|
27 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
27 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> tests/url.rs:32:27
|
32 | let result = http_msg.set_urlvalue(param, payload);
| ^^^^^^^^^^^^---------------- an argument of type bool is missing
|
note: associated function defined here
--> /home/kraykray/tools/lotus-0.5-beta/src/lua/parsing/url.rs:71:12
|
71 | pub fn set_urlvalue(&self, param: &str, payload: &str, remove_content: bool) -> String {
| ^^^^^^^^^^^^
help: provide the argument
|
32 | let result = http_msg.set_urlvalue(param, payload, /* bool */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> tests/url.rs:39:34
|
39 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
39 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

Some errors have detailed explanations: E0061, E0308.
For more information about an error, try rustc --explain E0061.
error: could not compile lotus due to 4 previous errors


Any help appreciated, as i said im sure its as simple as enabling lua53 but i dont want to mess with it too much doing the wrong things and make it un-salvageable hahaha..

cargo check
Checking libc v0.2.148
Checking cfg-if v1.0.0
Checking once_cell v1.18.0
Checking smallvec v1.11.1
Checking pin-project-lite v0.2.13
Checking memchr v2.6.3
Checking scopeguard v1.2.0
Checking futures-core v0.3.28
Checking futures-sink v0.3.28
Checking serde v1.0.188
Checking lock_api v0.4.10
Checking siphasher v0.3.11
Checking futures-channel v0.3.28
Checking slab v0.4.9
Checking futures-task v0.3.28
Checking log v0.4.20
Checking pin-utils v0.1.0
Checking itoa v1.0.9
Checking futures-io v0.3.28
Checking bytes v1.5.0
Checking unicode-width v0.1.11
Checking tracing-core v0.1.31
Checking foreign-types-shared v0.1.1
Checking fnv v1.0.7
Checking new_debug_unreachable v1.0.4
Checking foreign-types v0.3.2
Checking phf_shared v0.10.0
Checking hashbrown v0.12.3
Checking tinyvec_macros v0.1.1
Checking mac v0.1.1
Checking bitflags v2.4.0
Checking precomputed-hash v0.1.1
Checking futures-util v0.3.28
Checking futf v0.1.5
Checking tinyvec v1.6.0
Checking phf_shared v0.8.0
Checking http v0.2.9
Checking tracing v0.1.37
Checking utf-8 v0.7.6
Checking dtoa v1.0.9
Checking bitflags v1.3.2
Checking parking_lot_core v0.9.8
Checking socket2 v0.5.4
Checking mio v0.8.8
Checking signal-hook-registry v1.4.1
Checking parking_lot v0.12.1
Checking num_cpus v1.16.0
Checking openssl-sys v0.9.93
Checking indexmap v1.9.3
Checking percent-encoding v2.3.0
Checking ryu v1.0.15
Checking tokio v1.32.0
Checking openssl-probe v0.1.5
Checking try-lock v0.2.4
Checking unicode-normalization v0.1.22
Checking want v0.3.1
Checking form_urlencoded v1.2.0
Checking http-body v0.4.5
Checking dtoa-short v0.3.4
Checking socket2 v0.4.9
Checking tendril v0.4.3
Checking phf v0.8.0
Checking num-traits v0.2.16
Checking httparse v1.8.0
Checking phf v0.10.1
Checking unicode-bidi v0.3.13
Checking stable_deref_trait v1.2.0
Checking itoa v0.4.8
Checking lazy_static v1.4.0
Checking matches v0.1.10
Checking httpdate v1.0.3
Checking tower-service v0.3.2
Checking openssl v0.10.57
Checking byteorder v1.4.3
Checking nodrop v0.1.14
Checking servo_arc v0.1.1
Checking idna v0.4.0
Checking cssparser v0.27.2
Checking fxhash v0.2.1
Compiling mlua v0.8.10
Checking atty v0.2.14
Checking bstr v0.2.17
Checking aho-corasick v1.1.1
Checking textwrap v0.11.0
Checking unicase v2.7.0
Checking rustc-hash v1.1.0
Checking ansi_term v0.12.1
Checking either v1.9.0
Checking regex-syntax v0.7.5
Checking string_cache v0.8.7
Checking erased-serde v0.3.31
Checking strsim v0.8.0
Checking markup5ever v0.11.0
Checking thin-slice v0.1.1
Checking mime v0.3.17
Checking vec_map v0.8.2
Checking mime_guess v2.0.4
Checking clap v2.34.0
Checking futures-executor v0.3.28
Checking selectors v0.22.0
Checking itertools v0.10.5
Checking html5ever v0.26.0
Checking serde_urlencoded v0.7.1
Checking serde_json v1.0.107
Checking url v2.4.1
Checking regex-automata v0.3.8
Checking tokio-util v0.7.9
Checking portable-atomic v1.4.3
Checking console v0.15.7
Checking native-tls v0.2.11
Checking getopts v0.2.21
Checking encoding_rs v0.8.33
Checking tokio-native-tls v0.3.1
Checking number_prefix v0.4.0
Checking h2 v0.3.21
Checking iana-time-zone v0.1.57
Checking ipnet v2.8.0
Checking ego-tree v0.6.2
Checking base64 v0.21.4
Checking indicatif v0.17.7
Checking chrono v0.4.31
Checking scraper v0.13.0
Checking thiserror v1.0.48
Checking tealr v0.9.0-alpha4
Checking structopt v0.3.26
Checking futures v0.3.28
Checking fern v0.6.2
Checking base64 v0.13.1
Checking glob v0.3.1
Checking regex v1.9.5
Checking hyper v0.14.27
Checking hyper-tls v0.5.0
Checking reqwest v0.11.20
Checking lotus v0.5.0-beta (/home/kraykray/tools/lotus-0.5-beta)
Finished dev [unoptimized + debuginfo] target(s) in 28.91s
~/tools/lotus-0.5-beta 29s 09:38:26 PM
cargo update
Updating crates.io index
~/tools/lotus-0.5-beta 09:38:47 PM
cargo test
zsh: correct 'test' to 'tests' [nyae]? n
Compiling mlua v0.8.10
Compiling tealr v0.9.0-alpha4
Compiling lotus v0.5.0-beta (/home/kraykray/tools/lotus-0.5-beta)
error[E0061]: this function takes 5 arguments but 4 arguments were supplied
--> tests/http.rs:11:10
|
11 | .send(
| ^^^^
...
15 | sender.clone(),
| -------------- an argument of type Option<HashMap<String, MultiPart>> is missing
|
note: associated function defined here
--> /home/kraykray/tools/lotus-0.5-beta/src/lua/network/http.rs:134:18
|
134 | pub async fn send(
| ^^^^
help: provide the argument
|
11 | .send("GET", "https://httpbin.org/get".to_string(), None, /* Option<HashMap<String, MultiPart>> */, sender.clone())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try rustc --explain E0061.
error: could not compile lotus due to previous error
warning: build failed, waiting for other jobs to finish...
error[E0308]: mismatched types
--> tests/url.rs:8:34
|
8 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
8 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

error[E0308]: mismatched types
--> tests/url.rs:27:34
|
27 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
27 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

error[E0061]: this function takes 3 arguments but 2 arguments were supplied
--> tests/url.rs:32:27
|
32 | let result = http_msg.set_urlvalue(param, payload);
| ^^^^^^^^^^^^---------------- an argument of type bool is missing
|
note: associated function defined here
--> /home/kraykray/tools/lotus-0.5-beta/src/lua/parsing/url.rs:71:12
|
71 | pub fn set_urlvalue(&self, param: &str, payload: &str, remove_content: bool) -> String {
| ^^^^^^^^^^^^
help: provide the argument
|
32 | let result = http_msg.set_urlvalue(param, payload, /* bool */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> tests/url.rs:39:34
|
39 | let http_msg = HttpMessage { url };
| ^^^ expected enum Option, found struct Url
|
= note: expected enum Option<Url>
found struct Url
help: try wrapping the expression in Some
|
39 | let http_msg = HttpMessage { url: Some(url) };
| ++++++++++ +

Some errors have detailed explanations: E0061, E0308.
For more information about an error, try rustc --explain E0061.
error: could not compile lotus due to 4 previous errors

OK some of the issue probably was I didnt have most recent. Doing check on most recent tho comes up with other issues.

error: failed to run custom build command for mlua v0.8.10

Caused by:
process didn't exit successfully: /home/kraykray/tools/lotus-0.5-beta-weekly-5-8-2023/target/debug/build/mlua-ac4d3577b01022bd/build-script-main (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=LUA_INC
cargo:rerun-if-env-changed=LUA_LIB
cargo:rerun-if-env-changed=LUA_LIB_NAME
cargo:rerun-if-env-changed=LUA_LINK
cargo:rerun-if-env-changed=LUA_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=LUA_STATIC
cargo:rerun-if-env-changed=LUA_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
cargo:rerun-if-env-changed=LUA5.4_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=LUA5.4_STATIC
cargo:rerun-if-env-changed=LUA5.4_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 'cannot find Lua 5.4 using pkg-config', /home/kraykray/.cargo/registry/src/github.com-1ecc6299db9ec823/mlua-0.8.10/build/find_normal.rs:75:32
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Hey @reevesy1, sorry for the late response but I want to inform you the compiling error has been fixed

Thank you