CyAxe / lotus

:zap: Fast Web Security Scanner written in Rust based on Lua Scripts :waning_gibbous_moon: :crab:
https://lotus.knas.me
GNU General Public License v2.0
79 stars 12 forks source link

Compiling error #144

Open r3k2 opened 1 year ago

r3k2 commented 1 year ago

Running Arch GNU/Linux I git clone and then run cargo build --release and get:

 Compiling tealr_derive v0.9.0-alpha4
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/rek2/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/rek2/.local/bin" VSLANG="1033" "cc" "-Wl,--version-script=/tmp/rustcqbkyn9/list" "-Wl,--no-undefined-version" "-m64" "/tmp/rustcqbkyn9/symbols.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.0.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.1.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.10.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.11.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.12.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.13.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.14.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.15.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.2.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.3.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.4.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.5.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.6.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.7.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.8.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.tealr_derive.b3ebdc25-cgu.9.rcgu.o" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.5c4pjbcsi4q4efej.rcgu.rmeta" "/home/rek2/Herramientas/lotus/target/release/deps/tealr_derive-2f03b3aa3834c060.1viipsd6fcu139fk.rcgu.o" "-Wl,--as-needed" "-L" "/home/rek2/Herramientas/lotus/target/release/deps" "-L" "/home/rek2/Herramientas/lotus/target/release/build/ring-8439255bfccd7275/out" "-L" "/usr/lib" "-L" "/home/rek2/Herramientas/lotus/target/release/build/zstd-sys-0e26f65b05a90704/out" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/rek2/Herramientas/lotus/target/release/deps/libtempfile-752b45634f0b5b61.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libfastrand-e17e040348ec7aaa.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/librustix-fb3f39d13f66baff.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libio_lifetimes-dc17ec7b7a962b8b.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbitflags-5fbc87c5beff0b5e.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/liblinux_raw_sys-e011538e10468e03.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libvenial-d606de61d3670cea.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libsyn-8e6977c31658e654.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libzip-eb28857e07d09918.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libpbkdf2-16ff8bab9493f13a.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libsha2-5ec84c905b08166c.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libpassword_hash-440dd00bf92727ee.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbase64ct-a967514216dc21b5.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/librand_core-f8661d0b8872c6b1.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libgetrandom-32bfd9b70a598b7b.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libtime-8cd52f4120afcfdc.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libtime_core-eebf41a5f77497e2.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libzstd-7ca96534f27db9ff.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libzstd_safe-291c3f46cdf346fe.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libzstd_sys-65cf117d444b0843.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbzip2-728f2679b8d994fe.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbzip2_sys-be6f0874355b74f2.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbyteorder-6e9237e01b5396ff.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libaes-4547fd2b3234f805.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libcipher-eea36e04a1ee2cd5.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libinout-5741a00213bde2a2.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libsha1-af81700a921acb22.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libcpufeatures-cd0046d9e5bc2952.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libhmac-2469fcd412b2efc1.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libdigest-dd7077b27a7d669e.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libsubtle-27f8f903b15b4ff7.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libblock_buffer-a80ae9352085c271.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libcrypto_common-47a83555161d23a4.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libgeneric_array-f2d286a74100a818.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libtypenum-6f095f7561ab9e01.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libconstant_time_eq-591b8ebcf354c7d7.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libureq-a21aa321fda9cb01.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libwebpki_roots-7d72a35de9eb4969.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/librustls-71f0e61fcdfdb2c9.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libsct-c3e62a50909b957c.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libwebpki-6eff6e27b1d4832e.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libring-2b6b2a6267a98304.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libspin-a37ffe100d48de2c.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libuntrusted-91adf7ecb234a8de.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/liblibc-205a7894fd38821a.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libonce_cell-be60f6abce60cf70.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libflate2-e8daa3d72faa05e9.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libminiz_oxide-908fb6a226c3e295.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libadler-a2202741b7c6af74.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libcrc32fast-6dfb60ecb3fb75ee.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libcfg_if-2c575f7588db76d3.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libbase64-85031f0620ba4f32.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/liblog-2bf2712168f7ebc9.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/liburl-55af8d2235fe0636.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libidna-add94e2dccbbacd6.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libunicode_normalization-ff3b33afb808da5d.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libtinyvec-1b7707c74e39e607.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libtinyvec_macros-5f54943c44c03353.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libunicode_bidi-2bea025a95f6df3c.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libform_urlencoded-09ced1742b32cf9f.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libpercent_encoding-40b716a1e9d9ab5d.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libquote-3e7efb344331ffc9.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libproc_macro2-08a5baa6d34e1316.rlib" "/home/rek2/Herramientas/lotus/target/release/deps/libunicode_ident-21d453db6e608adf.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-5c08a96c37ea147d.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-d45356ee37b3fa26.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-854a8baf62cd1abc.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-e729b223e4b6bbde.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-26ca6b7827875199.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-32061b4b0a0b88b4.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-0b35d4b5e664d48b.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-b1cf9a5a5a1b4772.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-21731e1e659a0b45.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-6ac47ec14c97d98d.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-bd0715c0554cd65f.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-b3dd4aaad9bb6e2a.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-fbdfe06791b9308e.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-13a3e866f9dcb5ff.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-608155a29f930efd.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-015f1b253d84e5fc.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-43b08d7ad75e727a.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-a631be824d42f015.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-d5867a68750f1fec.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ae3a35d29261b98a.rlib" "-Wl,-Bdynamic" "-lbz2" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/rek2/Herramientas/lotus/target/release/deps/libtealr_derive-2f03b3aa3834c060.so" "-Wl,--gc-sections" "-shared" "-Wl,-z,relro,-z,now" "-Wl,--strip-all" "-nodefaultlibs"
  = note: /usr/bin/ld: bz_internal_error: undefined version: 
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status
MindPatch commented 1 year ago

Hey @r3k2, have you installed Lua development Libraries before building?

r3k2 commented 1 year ago

Hello @knassar702 hmmm I have the main LUA package, https://archlinux.org/packages/extra/x86_64/lua/ dont remember seen a libs one, let me check what is this on Arch GNU/Linux

r3k2 commented 1 year ago

@knassar702 I been looking 2 days and I see no lua libs on arch for lua is all together in 1 package https://wiki.archlinux.org/title/Lua can you please check into this error and see the real cause?

  = note: /usr/bin/ld: bz_internal_error: undefined version: 
          /usr/bin/ld: failed to set dynamic section sizes: bad value
          collect2: error: ld returned 1 exit status

error: could not compile `tealr_derive` (lib) due to previous error

I have tried to look for a precompiled binary of your last beta release but there is only source code.

MindPatch commented 1 year ago

Hello @r3k2,

Thank you for showing interest in the project, I really appreciate it. I looked into the Arch Linux repository, but unfortunately, I couldn't find the development libraries for Lua, I'm not sure why they're not available there.

However, I have set up a new pipeline to compile the source code, I want to mention that compiling Rust code is not as straightforward as with other languages due to the security checks performed by the compiler So, compiling the code might not be the best option for newcomers to the project.

Instead, you can download the binary file directly from this link: https://github.com/BugBlocker/lotus/releases/tag/v0.5-beta-weekly-7-7-2023

If you have any questions about the project, feel free to reach out to me anytime:)

Best regards, @knassar702

r3k2 commented 1 year ago

Hello @r3k2,

Thank you for showing interest in the project, I really appreciate it. I looked into the Arch Linux repository, but unfortunately, I couldn't find the development libraries for Lua, I'm not sure why they're not available there.

However, I have set up a new pipeline to compile the source code, I want to mention that compiling Rust code is not as straightforward as with other languages due to the security checks performed by the compiler So, compiling the code might not be the best option for newcomers to the project.

Instead, you can download the binary file directly from this link: https://github.com/BugBlocker/lotus/releases/tag/v0.5-beta-weekly-7-7-2023

If you have any questions about the project, feel free to reach out to me anytime:)

Best regards, @knassar702

Thank you, Yeah I was puzzle when I check first that I was not able to find that. Thanks for setting up the pipeline I really appreciate it.

I code in C/GO and Rust, so I have no issues using cargo/rustup etc, but was trying to not have to download LUA from sources and do that piece myself as I like to keep my system clean as much as possible from git source code unles I am trying it or developing for it.

I am in and out for work so will try this ASAP, I am testing it because I was going to write something like this myself for my Offsec work, so I can add my own plugins/modules etc with my own tests so cant wait to test this.

Happy Hacking