Skip to content
This repository was archived by the owner on Oct 29, 2026. It is now read-only.
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Try mustang on real-world programs! #22

Closed

Description

@sunfishcode

Mustang is now complete enough to support the current directory, command-line arguments, environment variables, std::fs, std::net, std::thread, std::time,std::alloc, and everything in the standard library that doesn't involve I/O too. It can now run some real-world programs! To try it:

  • Identify a program to try. Ideally avoid the known limitations, however reports confirming the known limitations are still useful.

  • Follow the usage instructions in the README.

  • Post a comment here about whatever happens—success, failure of any kind, or something was unclear.

Activity

  1. jplatte commented on Oct 8, 2021

    @jplatte
    Contributor

    I tried to run an async web app using tokio, it failed in tokio initialization because sched_getaffinity (used by num_cpus) is not implemented 🙁

    What the error looks like
    thread 'main' panicked at 'not implemented: sched_getaffinity', /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/c-scape-0.0.0/src/lib.rs:2289:5
    stack backtrace:
       0: rust_begin_unwind
                 at /home/jplatte/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:517:5
       1: core::panicking::panic_fmt
                 at /home/jplatte/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:100:14
       2: sched_getaffinity
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/c-scape-0.0.0/src/lib.rs:2289:5
       3: num_cpus::linux::logical_cpus
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-1.13.0/src/linux.rs:41:17
       4: num_cpus::linux::get_num_cpus
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-1.13.0/src/linux.rs:35:17
       5: num_cpus::get
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/num_cpus-1.13.0/src/lib.rs:73:5
       6: tokio::loom::std::sys::num_cpus
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.11.0/src/loom/std/mod.rs:87:23
       7: core::ops::function::FnOnce::call_once
                 at /home/jplatte/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
       8: core::option::Option<T>::unwrap_or_else
                 at /home/jplatte/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:784:21
       9: tokio::runtime::builder::Builder::build_threaded_runtime
                 at /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.11.0/src/runtime/builder.rs:545:32
       [...]
    

    When using the current_thread runtime instead, it doesn't fail to initialize but still doesn't work (worker threads panic and new ones are started constantly when trying to connect to the app AFAICT), due to unimplemented condvar stuff mentioned in the readme.

    Also, nm -u does return some output for the binary:

                     U epoll_create1@GLIBC_2.9
                     U epoll_ctl@GLIBC_2.3.2
                     U epoll_wait@GLIBC_2.3.2
                     U eventfd@GLIBC_2.7
    
  2. jplatte commented on Oct 8, 2021

    @jplatte
    Contributor

    I found an application I wrote that works with mustang: https://github.com/jplatte/i3-workspace-scroll

    It's < 50 LOC but it uses command line arguments and some IPC through a socket file.

    One thing I was curious about was file sizes. Here's a comparison:

    Debug Release Mustang+Debug Mustang+Release
    Original 7.1M 3.7M 25.3M 2.0M
    Stripped 691K 447K 4.6M 1.4M

    The sizes of the .so files the application links against w/o mustang (libc, libdl, libgcc_s, libm, ld-linux-x86-64) add up to about 4.1M.

  3. sunfishcode commented on Oct 8, 2021

    @sunfishcode
    OwnerAuthor

    Thanks for trying it out! I believe you're the first person to have tried anything with async 😄 . Fortunately, I expect sched_getaffinity, epoll_* and eventfd will be pretty straightforward.

    Concerning code size, mustang currently forces its entire libc to be statically linked in, in order to prevent the linker from satisfying any symbol references with the platform libc. I'm hoping to find a better approach there.

  4. sunfishcode commented on Oct 14, 2021

    @sunfishcode
    OwnerAuthor

    With #45, mustang no longer forces its entire libc to be statically linked in, and file sizes are much smaller. For example, unstripped release hello world on x86_64 went from 1.8M to 640K.

  5. tshepang commented on Oct 26, 2021

    @tshepang

    Using latest (main) of mustang and rsix, here's what I get when running ripgrep:

    ...
         Running `target/x86_64-mustang-linux-gnu/debug/rg foo`
    thread '<unnamed>' panicked at 'assertion failed: page_size != 0', /home/tshepang/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:465:9
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread '<unnamed>' panicked at 'attempt to create unaligned or null slice', /home/tshepang/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/raw.rs:89:5
    stack backtrace:
    thread panicked while processing panic. aborting.
    
  6. sunfishcode commented on Oct 27, 2021

    @sunfishcode
    OwnerAuthor

    @tshepang Ooh, good idea trying ripgrip :-). It looks like one thing ripgrep needs is sched_getaffinity, which should help tokio too. I've now filed #56 to track that.

  7. sunfishcode commented on Nov 10, 2021

    @sunfishcode
    OwnerAuthor

    Thanks to @nivkner implementing sched_getaffinity, ripgrip kind of runs now!

    When ripgrep runs on a single file, instead of on a directory, it uses mmap via the memmap2 crate, which calls libc::fstat, which isn't implemented yet (#71).

    When ripgrip runs on directories, it appears to run successfully, but it also prints out several messages about unimplemented pthread_cond* functions:

    unimplemented: pthread_condattr_init
    unimplemented: pthread_condattr_setclock
    unimplemented: pthread_cond_init
    unimplemented: pthread_condattr_destroy
    unimplemented: pthread_cond_broadcast
    unimplemented: pthread_cond_destroy
    

    This is #40.

  8. antonok-edm commented on Nov 30, 2021

    @antonok-edm

    I tried running bat with mustang. Following the README, I installed rust-src, set RUST_TARGET_PATH, added mustang = "0.3.0" to bat's dependencies, added mustang::can_run_this!(); to src/bin/bat/main.rs, and built with cargo build --release -Z build-std --target=x86_64-mustang-linux-gnu.

    indexmap appears multiple times in bat's dependency tree, and has #[cfg(has_std)] attributes that don't work correctly with mustang. This issue has more info on how it works. I was able to fix it by adding this to [dependencies]:

    indexmap = { version = "*", features = ["std"] }

    I also ran into an an unrelated regression on Nightly which was easy enough to work around.

    After the above modifications, it successfully passed the compilation step, but failed during linking. The traceback is ~1200 lines long; I'm happy to post it if it's helpful, but it looks generally like this:

    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "-nostartfiles" "-Wl,--undefined=_Unwind_Backtrace" <...extremely long list of .o files, -L, .rlib files, etc.>
      = note: /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/debug/deps/liblibgit2_sys-e0d42202f97337e4.rlib(attr.o): in function `git_attr_get_many_with_session':
              /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.12.21+1.1.0/libgit2/src/attr.c:183: undefined reference to `__stack_chk_fail'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/debug/deps/liblibgit2_sys-e0d42202f97337e4.rlib(attr.o): in function `preload_attr_file':
              /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/libgit2-sys-0.12.21+1.1.0/libgit2/src/attr.c:274: undefined reference to `__stack_chk_fail'
              <...many more undefined references to __stack_chk_fail, strcmp, strcasecmp, strrchr, strncmp, vsnprintf, etc.>
              collect2: error: ld returned 1 exit status
    
      = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
      = note: use the `-l` flag to specify native libraries to link
      = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
    

    It seems like I must have configured something incorrectly, but I can't tell from the README.

  9. sunfishcode commented on Nov 30, 2021

    @sunfishcode
    OwnerAuthor

    Cool, thanks for trying bat, that's a fun idea! It looks like you've configured everything correctly; the errors you're seeing there are bugs in mustang.

    Specifically, mustang so far has focused on running Rust code, and bat uses libgit2 written in C. Mustang's libc support so far only covers things used by Rust, so it doesn't yet have all the things that are common to use in C programs. #69 is a PR to add a note about this to the README.md.

    A possible workaround might be to disable the git feature when building bat. I don't know if there is other C code in bat's dependency tree though.

  10. antonok-edm commented on Nov 30, 2021

    @antonok-edm

    Neat! That makes sense, I see liblibgit2 in the errors above now. Disabling the git feature helped, then it turns out regex-onig uses C code so I had to swap it out for the pure-Rust regex-fancy feature instead.

    That narrowed the errors down to just this one:

      = note: /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/debug/deps/libstd-e475f264d98f5821.rlib(std-e475f264d98f5821.std.a79cc641-cgu.2.rcgu.o): in function `std::sys::unix::os::glibc_version':
              /home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/os.rs:644: undefined reference to `gnu_get_libc_version'
    

    That's in the standard library, so I went ahead and manually modified that sys/unix/os.rs in my toolchain directory:

     #[cfg(all(target_os = "linux", target_env = "gnu"))]
     pub fn glibc_version() -> Option<(usize, usize)> {
    +    None
    -    extern "C" {
    -        fn gnu_get_libc_version() -> *const libc::c_char;
    -    }
    -    let version_cstr = unsafe { CStr::from_ptr(gnu_get_libc_version()) };
    -    if let Ok(version_str) = version_cstr.to_str() {
    -        parse_glibc_version(version_str)
    -    } else {
    -        None
    -    }
    }

    After a clean rebuild, it successfully compiled!

    It panics when running, which I guess is the point of this issue 😄

    RUST_BACKTRACE=1 cargo run -Z build-std --target=x86_64-mustang-linux-gnu -- LICENSE-APACHE
        Finished dev [unoptimized + debuginfo] target(s) in 0.08s
         Running `target/x86_64-mustang-linux-gnu/debug/bat LICENSE-APACHE`
    thread 'main' panicked at 'unrecognized ioctl(21523)', /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/c-scape-0.3.0/src/lib.rs:1512:14
    stack backtrace:
       0: rust_begin_unwind
                 at /home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:498:5
       1: core::panicking::panic_fmt
                 at /home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panicking.rs:107:14
       2: ioctl
                 at /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/c-scape-0.3.0/src/lib.rs:1512:14
       3: terminal_size::unix::terminal_size_using_fd
                 at /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/terminal_size-0.1.16/src/unix.rs:31:17
       4: console::unix_term::terminal_size
                 at /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/console-0.15.0/src/unix_term.rs:47:5
       5: console::term::Term::size_checked
                 at /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/console-0.15.0/src/term.rs:392:9
       6: console::term::Term::size
                 at /home/antonok/.config/cargo/registry/src/github.com-1ecc6299db9ec823/console-0.15.0/src/term.rs:384:9
       7: bat::app::App::config
                 at ./src/bin/bat/app.rs:182:52
       8: bat::run
                 at ./src/bin/bat/main.rs:303:26
       9: bat::main
                 at ./src/bin/bat/main.rs:337:18
      10: core::ops::function::FnOnce::call_once
                 at /home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    

    So that's coming from https://github.com/eminence/terminal-size/blob/master/src/unix.rs#L31:

    ioctl(fd, TIOCGWINSZ.into(), &mut winsize)

    On the other hand, if I prevent that code from getting run with a small patch:

    diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs
    index 842eec6..b60276f 100644
    --- a/src/bin/bat/app.rs
    +++ b/src/bin/bat/app.rs
    @@ -179,7 +179,7 @@ impl App {
                         _ => unreachable!("other values for --color are not allowed"),
                     },
                 paging_mode,
    -            term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),
    +            term_width: maybe_term_width.unwrap_or_else(|| Term::stdout().size().1 as usize),
                 loop_through: !(self.interactive_output
                     || self.matches.value_of("color") == Some("always")
                     || self.matches.value_of("decorations") == Some("always")

    ...and pass the --terminal-width argument manually on the command line, I can actually view all sorts of files with correct syntax highlighting and paging interactions!

    It's very slow though, and I still can't get it to link in Release mode. I get ~250 lines of undefined reference errors, which appear to all be originating from c-scape. Some random examples, happy to post a full log if that's helpful as well:

      = note: /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-2f6985a442db2685.rlib(c_scape-2f6985a442db2685.c_scape.e6de75ef-cgu.0.rcgu.o): in function `<&T as core::fmt::Debug>::fmt':
              c_scape.e6de75ef-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h184ef3cd73ec6070E+0xf): undefined reference to `core::fmt::Formatter::debug_lower_hex'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h184ef3cd73ec6070E+0x26): undefined reference to `core::fmt::num::<impl core::fmt::LowerHex for usize>::fmt'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h184ef3cd73ec6070E+0x2f): undefined reference to `core::fmt::Formatter::debug_upper_hex'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h184ef3cd73ec6070E+0x46): undefined reference to `core::fmt::num::<impl core::fmt::UpperHex for usize>::fmt'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h184ef3cd73ec6070E+0x4f): undefined reference to `core::fmt::num::imp::<impl core::fmt::Display for usize>::fmt'
              ...
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17hbd196bcaed0b3fbcE+0xca): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-2f6985a442db2685.rlib(c_scape-2f6985a442db2685.c_scape.e6de75ef-cgu.0.rcgu.o): in function `origin::program::exit_immediately':
              c_scape.e6de75ef-cgu.0:(.text._ZN6origin7program16exit_immediately17h8677a8b25e83e50cE+0xa): undefined reference to `log::MAX_LOG_LEVEL_FILTER'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text._ZN6origin7program16exit_immediately17h8677a8b25e83e50cE+0x5a): undefined reference to `log::__private_api_log'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-2f6985a442db2685.rlib(c_scape-2f6985a442db2685.c_scape.e6de75ef-cgu.0.rcgu.o): in function `__xpg_strerror_r':
              c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x19): undefined reference to `rustix::imp::linux_raw::io::error::Error::from_errno'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x4df): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x556): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x5f5): undefined reference to `core::fmt::num::imp::<impl core::fmt::Display for i32>::fmt'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x63b): undefined reference to `alloc::fmt::format'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x66f): undefined reference to `core::slice::<impl [T]>::copy_from_slice::len_mismatch_fail'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x683): undefined reference to `core::panicking::panic_bounds_check'
              /usr/bin/ld: c_scape.e6de75ef-cgu.0:(.text.__xpg_strerror_r+0x693): undefined reference to `alloc::alloc::handle_alloc_error'
              ...
    
  11. sunfishcode commented on Dec 1, 2021

    @sunfishcode
    OwnerAuthor

    Cool! #68 adds gnu_get_libc_version and #70 adds the TIOCGWINSZ ioctl.

    I don't know what's going on with those release mode link errors yet though. Could you post the full log? You can use <details> and </details> tags to hide the log behind a click in a github comment. Also, would you be able to try running mustang's hello example in --release mode?

  12. antonok-edm commented on Dec 1, 2021

    @antonok-edm

    Those two PRs work great! I was able to remove the workarounds for them.

    Full log from bat in release mode:
    error: linking with `cc` failed: exit status: 1
      |
      = note: "cc" "-m64" "-nostartfiles" "-Wl,--undefined=_Unwind_Backtrace" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/bat-ec8e91af3f6a95ff.bat.f3711392-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/deps" "-L" "/tmp/bat/target/release/deps" "-L" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/build/ansi_colours-86c9cbf794f4a08c/out" "-L" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/build/sys-info-edf9d90becd4c67b/out" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.config/cargo/git/checkouts/mustang-602e93abf7520381/1cf3702/mustang/empty/x86_64" "-L" "/home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-mustang-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustcQBFN4e/libmustang-9647933cd048a944.rlib" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib" "/tmp/rustcQBFN4e/libsys_info-1cdbc8a9cf094753.rlib" "/tmp/rustcQBFN4e/libansi_colours-e2941a831c6a06c0.rlib" "-Wl,--start-group" "-Wl,--end-group" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libcompiler_builtins-5ef97cc642839815.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/antonok/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-mustang-linux-gnu/lib" "-o" "/tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/bat-ec8e91af3f6a95ff" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
      = note: /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `<&T as core::fmt::Debug>::fmt':
              c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h1a443e9d9e31f818E+0xf): undefined reference to `core::fmt::Formatter::debug_lower_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h1a443e9d9e31f818E+0x26): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h1a443e9d9e31f818E+0x2f): undefined reference to `core::fmt::Formatter::debug_upper_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h1a443e9d9e31f818E+0x46): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h1a443e9d9e31f818E+0x4f): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `<&T as core::fmt::Debug>::fmt':
              c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h219aa351b5c63e90E+0xf): undefined reference to `core::fmt::Formatter::debug_lower_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h219aa351b5c63e90E+0x26): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h219aa351b5c63e90E+0x2f): undefined reference to `core::fmt::Formatter::debug_upper_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h219aa351b5c63e90E+0x46): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h219aa351b5c63e90E+0x4f): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::fmt::num::::fmt':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i64$GT$3fmt17h353cf0d4376ab5b3E+0xf): undefined reference to `core::fmt::Formatter::debug_lower_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i64$GT$3fmt17h353cf0d4376ab5b3E+0x26): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i64$GT$3fmt17h353cf0d4376ab5b3E+0x2f): undefined reference to `core::fmt::Formatter::debug_upper_hex'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i64$GT$3fmt17h353cf0d4376ab5b3E+0x46): undefined reference to `core::fmt::num::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i64$GT$3fmt17h353cf0d4376ab5b3E+0x4f): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr39drop_in_place$LT$std..path..PathBuf$GT$17h6e8e105559fed4c0E+0x18): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr42drop_in_place$LT$alloc..string..String$GT$17h181be0a18533c207E+0x18): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr42drop_in_place$LT$core..ffi..VaListImpl$GT$17h5d1b38e5d25d9ccaE+0x2): undefined reference to `::drop'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr45drop_in_place$LT$std..ffi..c_str..CString$GT$17h2c2542beed811823E+0x19): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place>':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr46drop_in_place$LT$alloc..vec..Vec$LT$u8$GT$$GT$17h8aa4b43e5931e992E+0x18): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr62drop_in_place$LT$rustix..imp..linux_raw..fs..dir..DirEntry$GT$17h872639da79e9d8d3E+0x1b): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place>':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr68drop_in_place$LT$alloc..borrow..Cow$LT$std..ffi..c_str..CStr$GT$$GT$17hed8706970577ba7dE+0x21): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::ptr::drop_in_place>':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$$RF$std..ffi..c_str..CStr$GT$$GT$17h7fc93c40775febc4E+0x1e): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o):c_scape.77e7b1bb-cgu.0:(.text._ZN4core3ptr91drop_in_place$LT$alloc..vec..Vec$LT$alloc..borrow..Cow$LT$std..ffi..c_str..CStr$GT$$GT$$GT$17h56257609118788cfE+0x25): more undefined references to `__rust_dealloc' follow
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::iter::traits::iterator::Iterator::collect':
              c_scape.77e7b1bb-cgu.0:(.text._ZN4core4iter6traits8iterator8Iterator7collect17hb1c4adfe983e4e74E+0x33): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN4core4iter6traits8iterator8Iterator7collect17hb1c4adfe983e4e74E+0x146): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::panicking::assert_failed':
              c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN4core9panicking13assert_failed17h5a4e33f9d95cfe1dE+0x49): undefined reference to `core::panicking::assert_failed_inner'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `core::panicking::assert_failed':
              c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN4core9panicking13assert_failed17hd78d1757a85ee1faE+0x49): undefined reference to `core::panicking::assert_failed_inner'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `alloc::raw_vec::finish_grow':
              c_scape.77e7b1bb-cgu.0:(.text._ZN5alloc7raw_vec11finish_grow17h3fe6418fcfbc6480E+0x2c): undefined reference to `__rust_realloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN5alloc7raw_vec11finish_grow17h3fe6418fcfbc6480E+0x50): undefined reference to `__rust_alloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `alloc::raw_vec::RawVec::reserve::do_reserve_and_handle':
              c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h256209b50c6fc8b8E+0xaf): undefined reference to `alloc::raw_vec::capacity_overflow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h256209b50c6fc8b8E+0xbc): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `alloc::raw_vec::RawVec::reserve::do_reserve_and_handle':
              c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h58c0cd5be1a66009E+0x84): undefined reference to `alloc::raw_vec::capacity_overflow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h58c0cd5be1a66009E+0x91): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `alloc::raw_vec::RawVec::reserve::do_reserve_and_handle':
              c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h8c996eb38519f8d7E+0xbd): undefined reference to `alloc::raw_vec::capacity_overflow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.unlikely._ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$7reserve21do_reserve_and_handle17h8c996eb38519f8d7E+0xca): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `origin::program::exit_immediately':
              c_scape.77e7b1bb-cgu.0:(.text._ZN6origin7program16exit_immediately17h0ecd7018bc817c7eE+0xa): undefined reference to `log::MAX_LOG_LEVEL_FILTER'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN6origin7program16exit_immediately17h0ecd7018bc817c7eE+0x5a): undefined reference to `log::__private_api_log'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `__xpg_strerror_r':
              c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x19): undefined reference to `rustix::imp::linux_raw::io::error::Error::from_errno'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x4df): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x556): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x5f5): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x63b): undefined reference to `alloc::fmt::format'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x66f): undefined reference to `core::slice::::copy_from_slice::len_mismatch_fail'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x683): undefined reference to `core::panicking::panic_bounds_check'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__xpg_strerror_r+0x693): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `open64':
              c_scape.77e7b1bb-cgu.0:(.text.open64+0x3d): undefined reference to `rustix::imp::linux_raw::conv::oflags_bits'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.open64+0xa4): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `open':
              c_scape.77e7b1bb-cgu.0:(.text.open+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.open+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `readlink':
              c_scape.77e7b1bb-cgu.0:(.text.readlink+0x57): undefined reference to `rustix::fs::at::_readlinkat'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.readlink+0xce): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.readlink+0xf2): undefined reference to `core::slice::::copy_from_slice::len_mismatch_fail'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `statx':
              c_scape.77e7b1bb-cgu.0:(.text.statx+0x204): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `realpath':
              c_scape.77e7b1bb-cgu.0:(.text.realpath+0x3f): undefined reference to `realpath_ext::util::zeroed_vec'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x5e): undefined reference to `realpath_ext::realpath_raw'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x82): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0xdb): undefined reference to `::from_vec'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x132): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x19e): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x1c1): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.realpath+0x225): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `fcntl':
              c_scape.77e7b1bb-cgu.0:(.text.fcntl+0x1a4): undefined reference to `::drop'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.fcntl+0x1c4): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.fcntl+0x20c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.fcntl+0x227): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `mkdir':
              c_scape.77e7b1bb-cgu.0:(.text.mkdir+0x76): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `lseek64':
              c_scape.77e7b1bb-cgu.0:(.text.lseek64+0x6c): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.lseek64+0xb4): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `opendir':
              c_scape.77e7b1bb-cgu.0:(.text.opendir+0x20): undefined reference to `rustix::imp::linux_raw::conv::oflags_bits'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.opendir+0x51): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.opendir+0x98): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `readdir64_r':
              c_scape.77e7b1bb-cgu.0:(.text.readdir64_r+0x21): undefined reference to `rustix::imp::linux_raw::fs::dir::Dir::read'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.readdir64_r+0x1fd): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.readdir64_r+0x236): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.readdir64_r+0x24b): undefined reference to `core::slice::::copy_from_slice::len_mismatch_fail'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `closedir':
              c_scape.77e7b1bb-cgu.0:(.text.closedir+0x26): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.closedir+0x39): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `readv':
              c_scape.77e7b1bb-cgu.0:(.text.readv+0xc): undefined reference to `rustix::imp::linux_raw::syscalls::readv'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `poll':
              c_scape.77e7b1bb-cgu.0:(.text.poll+0x67): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `ioctl':
              c_scape.77e7b1bb-cgu.0:(.text.ioctl+0x38c): undefined reference to `::drop'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.ioctl+0x3ab): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.ioctl+0x3f3): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pipe2':
              c_scape.77e7b1bb-cgu.0:(.text.pipe2+0x83): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `free':
              c_scape.77e7b1bb-cgu.0:(.text.free+0x59): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `memchr':
              c_scape.77e7b1bb-cgu.0:(.text.memchr+0xc): undefined reference to `memchr::memchr::x86::memchr::FN'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `memrchr':
              c_scape.77e7b1bb-cgu.0:(.text.memrchr+0xc): undefined reference to `memchr::memchr::x86::memrchr::FN'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `mmap':
              c_scape.77e7b1bb-cgu.0:(.text.mmap+0xb3): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `mremap':
              c_scape.77e7b1bb-cgu.0:(.text.mremap+0x128): undefined reference to `::drop'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.mremap+0x150): undefined reference to `core::panicking::panic'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.mremap+0x16b): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `mprotect':
              c_scape.77e7b1bb-cgu.0:(.text.mprotect+0x4e): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `getrandom':
              c_scape.77e7b1bb-cgu.0:(.text.getrandom+0x5b): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `sysconf':
              c_scape.77e7b1bb-cgu.0:(.text.sysconf+0x3d): undefined reference to `rustix::imp::linux_raw::process::auxv::AUXV'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.sysconf+0x60): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.sysconf+0xa8): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `getcwd':
              c_scape.77e7b1bb-cgu.0:(.text.getcwd+0x31): undefined reference to `rustix::process::chdir::_getcwd'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.getcwd+0xc5): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `dl_iterate_phdr':
              c_scape.77e7b1bb-cgu.0:(.text.dl_iterate_phdr+0xa): undefined reference to `rustix::imp::linux_raw::process::auxv::AUXV'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.dl_iterate_phdr+0x7b): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.dl_iterate_phdr+0x96): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `__tls_get_addr':
              c_scape.77e7b1bb-cgu.0:(.text.__tls_get_addr+0x21): undefined reference to `origin::threads::STARTUP_TLS_INFO'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `setgid':
              c_scape.77e7b1bb-cgu.0:(.text.setgid+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.setgid+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `setgroups':
              c_scape.77e7b1bb-cgu.0:(.text.setgroups+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.setgroups+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `setuid':
              c_scape.77e7b1bb-cgu.0:(.text.setuid+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.setuid+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `getpwuid_r':
              c_scape.77e7b1bb-cgu.0:(.text.getpwuid_r+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.getpwuid_r+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `abort':
              c_scape.77e7b1bb-cgu.0:(.text.abort+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.abort+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `syscall':
              c_scape.77e7b1bb-cgu.0:(.text.syscall+0x461): undefined reference to `::drop'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x4c8): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x522): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x540): undefined reference to `core::panicking::panic'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x556): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x59d): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.syscall+0x5f7): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `posix_spawnp':
              c_scape.77e7b1bb-cgu.0:(.text.posix_spawnp+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.posix_spawnp+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `posix_spawnattr_setflags':
              c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setflags+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setflags+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `posix_spawnattr_setsigdefault':
              c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setsigdefault+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setsigdefault+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `posix_spawnattr_setsigmask':
              c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setsigmask+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.posix_spawnattr_setsigmask+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `posix_spawn_file_actions_adddup2':
              c_scape.77e7b1bb-cgu.0:(.text.posix_spawn_file_actions_adddup2+0x44): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.posix_spawn_file_actions_adddup2+0x8c): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `clock_gettime':
              c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0x1c): undefined reference to `rustix::imp::linux_raw::vdso_wrappers::CLOCK_GETTIME'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0x2a): undefined reference to `rustix::imp::linux_raw::vdso_wrappers::init_clock_gettime'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0x40): undefined reference to `rustix::imp::linux_raw::vdso_wrappers::CLOCK_GETTIME'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0x4e): undefined reference to `rustix::imp::linux_raw::vdso_wrappers::init_clock_gettime'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0xb4): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.clock_gettime+0xfc): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `c_scape::null_terminated_array':
              c_scape.77e7b1bb-cgu.0:(.text._ZN7c_scape21null_terminated_array17h936ca5d9dcb302c6E+0x61): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN7c_scape21null_terminated_array17h936ca5d9dcb302c6E+0x116): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text._ZN7c_scape21null_terminated_array17h936ca5d9dcb302c6E+0x11e): undefined reference to `alloc::raw_vec::capacity_overflow'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `execvp':
              c_scape.77e7b1bb-cgu.0:(.text.execvp+0xce): undefined reference to `core::slice::memchr::memchr_general_case'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x21b): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x31a): undefined reference to `std::ffi::c_str::CString::_new'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x348): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x389): undefined reference to `rustix::imp::linux_raw::fs::syscalls::accessat'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x3ac): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x49f): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x55e): undefined reference to `rustix::runtime::_execve'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x58a): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x5a4): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x607): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x638): undefined reference to `__rust_dealloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.execvp+0x665): undefined reference to `__rust_dealloc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o):c_scape.77e7b1bb-cgu.0:(.text.execvp+0x680): more undefined references to `__rust_dealloc' follow
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `execvp':
              c_scape.77e7b1bb-cgu.0:(.text.execvp+0x789): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `fork':
              c_scape.77e7b1bb-cgu.0:(.text.fork+0x3): undefined reference to `origin::program::fork'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `waitpid':
              c_scape.77e7b1bb-cgu.0:(.text.waitpid+0x166): undefined reference to `core::panicking::panic'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `floor':
              c_scape.77e7b1bb-cgu.0:(.text.floor+0x2): undefined reference to `libm::math::floor::floor'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `ldexp':
              c_scape.77e7b1bb-cgu.0:(.text.ldexp+0x2): undefined reference to `libm::math::ldexp::ldexp'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `trunc':
              c_scape.77e7b1bb-cgu.0:(.text.trunc+0x2): undefined reference to `libm::math::trunc::trunc'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_mutex_destroy':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_destroy+0x65): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_destroy+0xbc): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_destroy+0x103): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_destroy+0x14e): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_mutex_init':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_init+0x86): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_init+0xdd): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_init+0x124): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_init+0x16f): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_mutex_lock':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x70): undefined reference to `parking_lot::raw_mutex::RawMutex::lock_slow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0xae): undefined reference to `parking_lot::raw_mutex::RawMutex::lock_slow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0xfd): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x164): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x17b): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x1c2): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x20d): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_lock+0x228): undefined reference to `core::option::expect_failed'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_mutex_trylock':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0xec): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0x153): undefined reference to `core::result::unwrap_failed'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0x16a): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0x1b1): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0x1fc): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_trylock+0x217): undefined reference to `core::option::expect_failed'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_mutex_unlock':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_unlock+0x4f): undefined reference to `parking_lot::raw_mutex::RawMutex::unlock_slow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_unlock+0xa6): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_unlock+0xfd): undefined reference to `core::fmt::num::imp::::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_unlock+0x144): undefined reference to `::fmt'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_mutex_unlock+0x18f): undefined reference to `core::panicking::panic_fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_rwlock_rdlock':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_rwlock_rdlock+0x41): undefined reference to `parking_lot::raw_rwlock::RawRwLock::lock_shared_slow'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `pthread_rwlock_unlock':
              c_scape.77e7b1bb-cgu.0:(.text.pthread_rwlock_unlock+0x32): undefined reference to `parking_lot::raw_rwlock::RawRwLock::unlock_shared_slow'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.pthread_rwlock_unlock+0x3e): undefined reference to `parking_lot::raw_rwlock::RawRwLock::unlock_exclusive_slow'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `__cxa_thread_atexit_impl':
              c_scape.77e7b1bb-cgu.0:(.text.__cxa_thread_atexit_impl+0x16): undefined reference to `__rust_alloc'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__cxa_thread_atexit_impl+0x32): undefined reference to `origin::threads::at_thread_exit'
              /usr/bin/ld: c_scape.77e7b1bb-cgu.0:(.text.__cxa_thread_atexit_impl+0x4c): undefined reference to `alloc::alloc::handle_alloc_error'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o): in function `exit':
              c_scape.77e7b1bb-cgu.0:(.text.exit+0x3): undefined reference to `origin::program::exit'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o):(.data.rel.ro..Lanon.ff71a27d96c0edfd7325dd87b4ef374e.9+0x18): undefined reference to `::fmt'
              /usr/bin/ld: /tmp/bat/target/x86_64-mustang-linux-gnu/release/deps/libc_scape-258bf832e1d66db5.rlib(c_scape-258bf832e1d66db5.c_scape.77e7b1bb-cgu.0.rcgu.o):(.data.rel.ro..Lanon.ff71a27d96c0edfd7325dd87b4ef374e.11+0x18): undefined reference to `::fmt'
              collect2: error: ld returned 1 exit status
    

    = help: some extern functions couldn't be found; some native libraries may need to be installed or have their path specified
    = note: use the -l flag to specify native libraries to link
    = note: use the cargo:rustc-link-lib directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

    error: could not compile bat due to previous error

    The hello example works fine in debug and release mode.

  13. sunfishcode commented on Dec 1, 2021

    @sunfishcode
    OwnerAuthor

    Could you try commenting out the lto = true in bat's Cargo.toml? It looks like mustang may not work with lto yet.

  14. antonok-edm commented on Dec 1, 2021

    @antonok-edm

    That did the trick!

  15. 13 remaining items

  16. sunfishcode commented on Apr 20, 2023

    @sunfishcode
    OwnerAuthor

    @Gaelan My coreutils branch at https://github.com/sunfishcode/coreutils/ now passes all the tests in the default feature set under mustang, except test_tmp_files_deleted_on_sigint because that needs a custom signal handler, which isn't supported yet.

  17. sunfishcode commented on Apr 26, 2023

    @sunfishcode
    OwnerAuthor

    Custom signal handlers are now implemented and coreutils' test_tmp_files_deleted_on_sigint now passes. Also, more functions are now implemented, and everything in coreutils' default and "unix" feature sets now work.

  18. sunfishcode commented on Apr 26, 2023

    @sunfishcode
    OwnerAuthor

    panic = "abort" now works in mustang. To use it, you need to also change the -Z build-std to -Z build-std=panic_abort,std.

    Unless I've missed something, everything reported here so far except lto and auto-display is now working: panic = "abort", bat (including git2 support), ripgrep, coreutils (including the "unix" feature set), cargo-watch, tokio, async-std.

  19. estk commented on Jun 7, 2023

    @estk

    I'm interested in building a shared library with mustang.
    I'm sure there are many reasons why this would not work currently but just to verify it does not work out of the box i've built my lib with mustang, extracted the archive then re-linked with lld as a -shared lib. This resulted in the following error on load:

    libmustang_test.so: undefined symbol: main
    

    It then occurred to me that I had not seen any examples of using mustang to build a library, perhaps there is some fundamental issue there that I'm missing. (Like maybe the lack of a crt means we need to hook into the main function somehow?)

    Also, obviously in the readme you've explicitly stated that mustang does not support dynamic linkage. Thats something I'd be interested in helping out with but would need mentoring.

  20. sunfishcode commented on Jun 8, 2023

    @sunfishcode
    OwnerAuthor

    @estk Unfortunately, this activity is not among my own personal interests at this time, so I won't be able to be of much help. If you'd like though, you're welcome to file new issues in the issue tracker in this repo and describe what you're doing (ideally in as much detail as you can, eg: how are you expecting to load this library, is there another libc in the process, are there any threads anywhere, etc.) and what problems you're finding and ask questions, and perhaps there will be others interested in helping.

  21. estk commented on Jun 8, 2023

    @estk

    @sunfishcode thank you so much for the super quick response on this!
    Sorry to hear it's not something you'll be spending time on, I would have loved to collab on this. Also, I really appreciate the invitation to file some issues here and explain what we are trying to accomplish.

    I've explained our situation a bit in the rust-lang issue but I'll file the relevant issues here and explain the situation in great (hopefully not painful) detail. 😄

    Finally just an observation, I find it very surprising that the rustc team has not immediately co-opted this and run with it. (I was similarly surprised with the lukewarm reception of watt) I wonder if you can shed any light on the, from an outsider's perspective, lack of interest.

  22. lnicola commented on Jun 8, 2023

    @lnicola

    I guess it's not much, but I was able to run rust-analyzer on mustang, after patching out a mallinfo call and disabling perf_event_open using an environment variable. I had some trouble with the build instructions, though.

    It's about 23% slower, though, probably because of the allocator performance. I also tried jemalloc, but requires some unimplemented functions.

  23. sunfishcode commented on Jun 9, 2023

    @sunfishcode
    OwnerAuthor

    @estk I expect it's just that for most users, Mustang doesn't have any practical advantages. It's less complete and less real-world tested than existing libc implementations.

  24. sunfishcode commented on Jun 9, 2023

    @sunfishcode
    OwnerAuthor

    @lnicola Very cool! Could you say which unimplemented functions jemalloc needs?

  25. lnicola commented on Jun 9, 2023

    @lnicola

    Could you say which unimplemented functions jemalloc needs?

  26. carbotaniuman commented on Jun 9, 2023

    @carbotaniuman
    Contributor

    I can grind some of those out later today once I'm done with work. Not sure about the popcount one though, feels like we'd need another library off that...

  27. lnicola commented on Jun 9, 2023

    @lnicola

    It's not very clear to me, but isn't count_ones available in libcore?

    I was surprised that sbrk isn't implemented 😄.

  28. carbotaniuman commented on Jun 9, 2023

    @carbotaniuman
    Contributor
  29. sunfishcode commented on Nov 13, 2023

    @sunfishcode
    OwnerAuthor

    All the functions needed for jemalloc here are now implemented, except __popcountdi2. I was able to port jemalloc to Eyra, and all the tests pass.

    When I tried Mustang, I saw the undefined references to __popcountdi2. So there appears to be some problem arising from the way Mustang works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions