khyperia / weechat-discord

Unmaintained! And also apparently this is against their TOS so DON'T USE THIS -- Weechat plugin for Discord support - https://weechat.org/ https://discordapp.com/
MIT License
51 stars 24 forks source link

Build failed: thread 'main' panicked at 'explicit panic' #23

Closed wkaandorp closed 7 years ago

wkaandorp commented 7 years ago

I'm trying to install on WSL on windows 10.

root@FSXVC8:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial

root@FSXVC8:/mnt/c/Users/Woeste/Desktop/weechat-discord# RUST_BACKTRACE=1 cargo build --release Compiling weecord v0.1.0 (file:///mnt/c/Users/Woeste/Desktop/weechat-discord) Compiling openssl v0.7.14 Build failed, waiting for other jobs to finish... error: failed to run custom build command for weecord v0.1.0 (file:///mnt/c/Users/Woeste/Desktop/weechat-discord) process didn't exit successfully: /mnt/c/Users/Woeste/Desktop/weechat-discord/target/release/build/weecord-65df80a1d94a2456/build-script-build (exit code: 101) --- stdout TARGET = Some("x86_64-unknown-linux-gnu") OPT_LEVEL = Some("3") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") CC_x86_64-unknown-linux-gnu = None CC_x86_64_unknown_linux_gnu = None HOST_CC = None CC = None HOST = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") CFLAGS_x86_64-unknown-linux-gnu = None CFLAGS_x86_64_unknown_linux_gnu = None HOST_CFLAGS = None CFLAGS = None PROFILE = Some("release") running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/usr/include/weechat" "-Wall" "-Wextra" "-Werror" "-o" "/mnt/c/Users/Woeste/Desktop/weechat-discord/target/release/build/weecord-78f661dbbb0d58b7/out/src/weecord.o" "-c" "src/weecord.c" cargo:warning=src/weecord.c: In function ‘wdc_hook_command’: cargo:warning=src/weecord.c:60:35: error: macro "weechat_hook_command" passed 8 arguments, but takes just 7 cargo:warning= NULL); cargo:warning= ^ cargo:warning=src/weecord.c:53:10: error: ‘weechat_hook_command’ undeclared (first use in this function) cargo:warning= return weechat_hook_command(command, cargo:warning= ^ cargo:warning=src/weecord.c:53:10: note: each undeclared identifier is reported only once for each function it appears in cargo:warning=src/weecord.c:40:30: error: unused parameter ‘command’ [-Werror=unused-parameter] cargo:warning= wdc_hook_command(const char command, cargo:warning= ^ cargo:warning=src/weecord.c:41:30: error: unused parameter ‘description’ [-Werror=unused-parameter] cargo:warning= const char description, cargo:warning= ^ cargo:warning=src/weecord.c:42:30: error: unused parameter ‘args’ [-Werror=unused-parameter] cargo:warning= const char args, cargo:warning= ^ cargo:warning=src/weecord.c:43:30: error: unused parameter ‘args_description’ [-Werror=unused-parameter] cargo:warning= const char args_description, cargo:warning= ^ cargo:warning=src/weecord.c:44:30: error: unused parameter ‘completion’ [-Werror=unused-parameter] cargo:warning= const char completion, cargo:warning= ^ cargo:warning=src/weecord.c:45:30: error: unused parameter ‘pointer’ [-Werror=unused-parameter] cargo:warning= const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c:46:24: error: unused parameter ‘callback’ [-Werror=unused-parameter] cargo:warning= int (callback)(const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_buffer_new’: cargo:warning=src/weecord.c:117:71: error: macro "weechat_buffer_new" passed 7 arguments, but takes just 5 cargo:warning= name, input_callback, pointer, NULL, close_callback, pointer, NULL); cargo:warning= ^ cargo:warning=src/weecord.c:116:10: error: ‘weechat_buffer_new’ undeclared (first use in this function) cargo:warning= return weechat_buffer_new( cargo:warning= ^ cargo:warning=src/weecord.c:106:28: error: unused parameter ‘name’ [-Werror=unused-parameter] cargo:warning= wdc_buffer_new(const char name, cargo:warning= ^ cargo:warning=src/weecord.c:107:28: error: unused parameter ‘pointer’ [-Werror=unused-parameter] cargo:warning= const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c:108:22: error: unused parameter ‘input_callback’ [-Werror=unused-parameter] cargo:warning= int (input_callback)(const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c:112:22: error: unused parameter ‘close_callback’ [-Werror=unused-parameter] cargo:warning= int (close_callback)(const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_hook_fd’: cargo:warning=src/weecord.c:147:62: error: macro "weechat_hook_fd" passed 7 arguments, but takes just 6 cargo:warning= return weechat_hook_fd(fd, 1, 0, 0, callback, pointer, NULL); cargo:warning= ^ cargo:warning=src/weecord.c:147:10: error: ‘weechat_hook_fd’ undeclared (first use in this function) cargo:warning= return weechat_hook_fd(fd, 1, 0, 0, callback, pointer, NULL); cargo:warning= ^ cargo:warning=src/weecord.c:143:17: error: unused parameter ‘fd’ [-Werror=unused-parameter] cargo:warning= wdc_hook_fd(int fd, cargo:warning= ^ cargo:warning=src/weecord.c:144:25: error: unused parameter ‘pointer’ [-Werror=unused-parameter] cargo:warning= const void pointer, cargo:warning= ^ cargo:warning=src/weecord.c:145:19: error: unused parameter ‘callback’ [-Werror=unused-parameter] cargo:warning= int (callback)(const void pointer, void data, int fd)) cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_hook_completion’: cargo:warning=src/weecord.c:231:67: error: macro "weechat_hook_completion" passed 5 arguments, but takes just 4 cargo:warning= completion_item, description, callback, callback_pointer, NULL); cargo:warning= ^ cargo:warning=src/weecord.c:230:10: error: ‘weechat_hook_completion’ undeclared (first use in this function) cargo:warning= return weechat_hook_completion( cargo:warning= ^ cargo:warning=src/weecord.c:221:33: error: unused parameter ‘completion_item’ [-Werror=unused-parameter] cargo:warning= wdc_hook_completion(const char completion_item, cargo:warning= ^ cargo:warning=src/weecord.c:222:33: error: unused parameter ‘description’ [-Werror=unused-parameter] cargo:warning= const char description, cargo:warning= ^ cargo:warning=src/weecord.c:223:33: error: unused parameter ‘callback_pointer’ [-Werror=unused-parameter] cargo:warning= const void callback_pointer, cargo:warning= ^ cargo:warning=src/weecord.c:224:27: error: unused parameter ‘callback’ [-Werror=unused-parameter] cargo:warning= int (callback)(const void*, cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_hook_command’: cargo:warning=src/weecord.c:61:1: error: control reaches end of non-void function [-Werror=return-type] cargo:warning= } cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_buffer_new’: cargo:warning=src/weecord.c:118:1: error: control reaches end of non-void function [-Werror=return-type] cargo:warning= } cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_hook_fd’: cargo:warning=src/weecord.c:148:1: error: control reaches end of non-void function [-Werror=return-type] cargo:warning= } cargo:warning= ^ cargo:warning=src/weecord.c: In function ‘wdc_hook_completion’: cargo:warning=src/weecord.c:232:1: error: control reaches end of non-void function [-Werror=return-type] cargo:warning= } cargo:warning= ^ cargo:warning=cc1: all warnings being treated as errors exit code: 1

command did not execute successfully, got: exit code: 1

--- stderr thread 'main' panicked at 'explicit panic', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.50/src/lib.rs:1210 stack backtrace: 1: 0x7fad9982703a - std::sys::imp::backtrace::tracing::imp::write::hd9cb4c1797101742 at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42 2: 0x7fad9982d69f - std::panicking::default_hook::{{closure}}::h154dea97b11a961f at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/panicking.rs:349 3: 0x7fad9982d2a4 - std::panicking::default_hook::h7b2373844128ce08 at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/panicking.rs:365 4: 0x7fad9982dae7 - std::panicking::rust_panic_with_hook::h8d52d23c1df454da at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/panicking.rs:553 5: 0x7fad9980ed8f - std::panicking::begin_panic::h2b5d2fe46dd8c732 6: 0x7fad9981aac6 - gcc::fail::he78b9b54a8b12edf 7: 0x7fad99819f35 - gcc::run::h894e2a74a7d7b33b 8: 0x7fad998131d8 - gcc::Config::compile::h4ea84059880c8ce2 9: 0x7fad99807ec0 - build_script_build::main::hb091cf0dbb9ae65f 10: 0x7fad99837d7a - __rust_maybe_catch_panic at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libpanic_unwind/lib.rs:98 11: 0x7fad9982e226 - std::rt::lang_start::h654cbbacaf320c39 at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/panicking.rs:434 at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/panic.rs:351 at /build/rustc-SnYB1V/rustc-1.15.1+dfsg0/src/libstd/rt.rs:57 12: 0x7fad98a0082f - __libc_start_main 13: 0x7fad99807438 - _start 14: 0x0 -

root@FSXVC8:/mnt/c/Users/Woeste/Desktop/weechat-discord#

khyperia commented 7 years ago

It looks like you have an old version of Weechat installed. In particular, the error:

cargo:warning=src/weecord.c:60:35: error: macro "weechat_hook_command" passed 8 arguments, but takes just 7

makes me suspect you have at most weechat 1.4, likely earlier. Version 1.4 to Version 1.5 added an extra parameter. Please update to the most recent weechat (currently 1.9) and try building again. You may have to build weechat from source, I'm not sure how up-to-date WSL's weechat is.

wkaandorp commented 7 years ago

Your assumption seems spot on:

root@FSXVC8:~# dpkg -s weechat
Package: weechat
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 60
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Version: 1.4-2ubuntu0.1
Depends: weechat-curses (>= 1.4-2ubuntu0.1)
Suggests: weechat-doc (= 1.4-2ubuntu0.1)
Description: Fast, light and extensible chat client

Thank you a lot! I will try building a later version.

wkaandorp commented 7 years ago

I updated to version 1.9, and now this specific issue is gone.