zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.46k stars 613 forks source link

Can't compile latest `main` branch on Arch Linux #3470

Open aschleifer opened 4 days ago

aschleifer commented 4 days ago

Hi, I'm running Arch Linux and I'm trying to build zellij from the latest main branch via the AUR zellij-git package.

I get the following warnings and error when doing so:

   Compiling zellij-client v0.41.0 (/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/zellij-client)
warning: field `0` is never read
  --> zellij-client/src/lib.rs:46:19
   |
46 |     ActiveClients(Vec<ClientId>),
   |     ------------- ^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |
   = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
46 |     ActiveClients(()),
   |                   ~~

warning: field `0` is never read
  --> zellij-client/src/lib.rs:53:25
   |
53 |     UnblockCliPipeInput(String),   // String -> pipe name
   |     ------------------- ^^^^^^
   |     |
   |     field in this variant
   |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
53 |     UnblockCliPipeInput(()),   // String -> pipe name
   |                         ~~

warning: fields `0` and `1` are never read
  --> zellij-client/src/lib.rs:54:19
   |
54 |     CliPipeOutput(String, String), // String -> pipe name, String -> output
   |     ------------- ^^^^^^  ^^^^^^
   |     |
   |     fields in this variant
   |
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
   |
54 |     CliPipeOutput((), ()), // String -> pipe name, String -> output
   |                   ~~  ~~

   Compiling zellij-server v0.41.0 (/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/zellij-server)
warning: field `plugin_config` is never read
  --> zellij-server/src/plugins/plugin_worker.rs:15:9
   |
12 | pub struct RunningWorker {
   |            ------------- field in this struct
...
15 |     pub plugin_config: PluginConfig,
   |         ^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: field `0` is never read
  --> zellij-server/src/terminal_bytes.rs:20:9
   |
20 |     Err(std::io::Error),
   |     --- ^^^^^^^^^^^^^^
   |     |
   |     field in this variant
   |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
20 |     Err(()),
   |         ~~

warning: `zellij-client` (lib) generated 3 warnings
warning: `zellij-server` (lib) generated 2 warnings
   Compiling zellij v0.41.0 (/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij)
error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/lib64/rustlib/x86_64-unknown-linux-gnu/bin:/home/aschleifer/develop/gitlab.com/segaja/arch-repro-tools:/home/aschleifer/.local/bin:/opt/insomnia:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "cc" "-m64" "/tmp/rustc4mbzIt/symbols.o" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/deps/zellij-b51b6ea62eb5064b.zellij.b1922903e5d8e231-cgu.00.rcgu.o" "-Wl,--as-needed" "-L" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/deps" "-L" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/build/openssl-sys-53105461a7b16fc3/out/openssl-build/install/lib" "-L" "/usr/lib" "-L" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/build/libnghttp2-sys-aa8d1bc74545b2ff/out/i/lib" "-L" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/build/wasmtime-03994e6eca4a065a/out" "-L" "/home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/build/zstd-sys-6152de379b77ace6/out" "-L" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustc4mbzIt/libwasmtime-aff64547020382bb.rlib" "/tmp/rustc4mbzIt/libzstd_sys-5d435055a22afd2d.rlib" "/usr/lib64/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-46939b2cf47f5496.rlib" "-Wl,-Bdynamic" "-lcurl" "-lc" "-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/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/deps/zellij-b51b6ea62eb5064b" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/aschleifer/.cache/paru/clone/zellij-git/src/zellij/target/release/deps/zellij-b51b6ea62eb5064b.zellij.b1922903e5d8e231-cgu.00.rcgu.o: undefined reference to symbol 'ZSTD_decompressStream'
          /usr/bin/ld: /usr/lib/libzstd.so.1: error adding symbols: DSO missing from command line
          collect2: error: ld returned 1 exit status

  = note: 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#rustc-link-lib)

error: could not compile `zellij` (bin "zellij") due to 1 previous error
imsnif commented 4 days ago

@h3nill - any clues about the AUR package? We recently switched from wasmer to wasmtime as our webassembly engine - could it require some extra build dependency in this case?

I work on arch and manage to compile zellij from main all the time with cargo x run.

h3nill commented 3 days ago

unfortunately i am no longer on an arch based system so I am not actively maintaining that package.

if someone is willing to send over a patch for the fix would be very happy to merge it. otherwise i will try to setup a VM and test it out when i find time.

aschleifer commented 3 days ago

@h3nill If you add the following to the PKGBUILD then it works:

options=(!lto)