Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build from source #558

Open
alimulap opened this issue Mar 13, 2024 · 3 comments
Open

Can't build from source #558

alimulap opened this issue Mar 13, 2024 · 3 comments
Labels
status: need info Information is needed from the reporter to progress the issue.

Comments

@alimulap
Copy link

alimulap commented Mar 13, 2024

I tried to build from souce and got this errors:

Errors
❯ RUST_BACKTRACE=full; cargo build --release
   Compiling llvm-sys v140.1.3
error: failed to run custom build command for `llvm-sys v140.1.3`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/alimulap/packages/mun/target/release/build/llvm-sys-f3712a7800f20de1/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LLVM_SYS_140_PREFIX
  cargo:rerun-if-env-changed=LLVM_SYS_140_IGNORE_BLOCKLIST
  cargo:rerun-if-env-changed=LLVM_SYS_140_STRICT_VERSIONING
  cargo:rerun-if-env-changed=LLVM_SYS_140_NO_CLEAN_CFLAGS
  cargo:rerun-if-env-changed=LLVM_SYS_140_USE_DEBUG_MSVCRT
  cargo:rerun-if-env-changed=LLVM_SYS_140_FFI_WORKAROUND
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some("-I/usr/include  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS ")
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rustc-link-lib=static=targetwrappers
  cargo:rustc-link-search=native=/home/alimulap/packages/mun/target/release/build/llvm-sys-d8565b9913fe0409/out
  cargo:config_path=llvm-config
  cargo:libdir=/usr/lib

  cargo:rustc-link-search=native=/usr/lib


  --- stderr
  thread 'main' panicked at /home/alimulap/.cargo/registry/src/index.crates.io-6f17d22bba15001f/llvm-sys-140.1.3/build.rs:462:5:
  failed to get link libraries from llvm-config: [("static", Custom { kind: Other, error: "llvm-config failed with error code Some(1)" })]
  stack backtrace:
     0:     0x56be01d82c5c - std::backtrace_rs::backtrace::libunwind::trace::ha69d38c49f1bf263
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x56be01d82c5c - std::backtrace_rs::backtrace::trace_unsynchronized::h93125d0b85fd543c
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x56be01d82c5c - std::sys_common::backtrace::_print_fmt::h8d65f438e8343444
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x56be01d82c5c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h41751d2af6c8033a
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
     4:     0x56be01da958c - core::fmt::rt::Argument::fmt::h5db2f552d8a28f63
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
     5:     0x56be01da958c - core::fmt::write::h99465148a27e4883
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
     6:     0x56be01d7f71e - std::io::Write::write_fmt::hee8dfd57bd179ab2
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
     7:     0x56be01d82a44 - std::sys_common::backtrace::_print::h019a3cee3e814da4
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
     8:     0x56be01d82a44 - std::sys_common::backtrace::print::h55694121c2ddf918
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
     9:     0x56be01d84853 - std::panicking::default_hook::{{closure}}::h29cbe3da3891b0b0
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
    10:     0x56be01d84574 - std::panicking::default_hook::h881e76b2b8c74280
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
    11:     0x56be01d84dd5 - std::panicking::rust_panic_with_hook::hcc36e25b6e33969c
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:731:13
    12:     0x56be01d84cd1 - std::panicking::begin_panic_handler::{{closure}}::ha415efb0f69f41f9
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:609:13
    13:     0x56be01d83186 - std::sys_common::backtrace::__rust_end_short_backtrace::h395fe90f99451e4e
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:170:18
    14:     0x56be01d84a22 - rust_begin_unwind
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
    15:     0x56be01abbe15 - core::panicking::panic_fmt::h452a83e54ecd764e
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
    16:     0x56be01ac32ea - build_script_build::get_link_libraries::hca11bf3e9438192a
    17:     0x56be01ac4989 - build_script_build::main::h6e757a5581aafbce
    18:     0x56be01aca773 - core::ops::function::FnOnce::call_once::h39c52a9fee8ef8d7
    19:     0x56be01ac5ed6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc141ed6f1170c7ff
    20:     0x56be01abd4e9 - std::rt::lang_start::{{closure}}::hc3d4543d6f29995b
    21:     0x56be01d7b6eb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h14c5f6d1cd70a60f
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:284:13
    22:     0x56be01d7b6eb - std::panicking::try::do_call::h2d02374ca451446a
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
    23:     0x56be01d7b6eb - std::panicking::try::h9f7922394bf57392
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
    24:     0x56be01d7b6eb - std::panic::catch_unwind::ha1600f9dd4ee7270
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
    25:     0x56be01d7b6eb - std::rt::lang_start_internal::{{closure}}::hfbd80e7d681b21a1
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:48
    26:     0x56be01d7b6eb - std::panicking::try::do_call::heacaa33dbdaa16e0
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
    27:     0x56be01d7b6eb - std::panicking::try::h637875f7c9db85ea
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
    28:     0x56be01d7b6eb - std::panic::catch_unwind::h4caa9c0c78cb4c19
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
    29:     0x56be01d7b6eb - std::rt::lang_start_internal::h2d6a60ec944b523d
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:20
    30:     0x56be01abd4c7 - std::rt::lang_start::h236b4988b0587322
    31:     0x56be01ac5285 - main
    32:     0x75dcf3aefcd0 - <unknown>
    33:     0x75dcf3aefd8a - __libc_start_main
    34:     0x56be01abc5b5 - _start
    35:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `llvm-sys v140.1.3`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/alimulap/packages/mun/target/release/build/llvm-sys-f3712a7800f20de1/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LLVM_SYS_140_PREFIX
  cargo:rerun-if-env-changed=LLVM_SYS_140_IGNORE_BLOCKLIST
  cargo:rerun-if-env-changed=LLVM_SYS_140_STRICT_VERSIONING
  cargo:rerun-if-env-changed=LLVM_SYS_140_NO_CLEAN_CFLAGS
  cargo:rerun-if-env-changed=LLVM_SYS_140_USE_DEBUG_MSVCRT
  cargo:rerun-if-env-changed=LLVM_SYS_140_FFI_WORKAROUND
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = Some("-I/usr/include  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS ")
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  cargo:rustc-link-lib=static=targetwrappers
  cargo:rustc-link-search=native=/home/alimulap/packages/mun/target/release/build/llvm-sys-1dc6164864be348e/out
  cargo:config_path=llvm-config
  cargo:libdir=/usr/lib

  cargo:rustc-link-search=native=/usr/lib


  --- stderr
  thread 'main' panicked at /home/alimulap/.cargo/registry/src/index.crates.io-6f17d22bba15001f/llvm-sys-140.1.3/build.rs:462:5:
  failed to get link libraries from llvm-config: [("static", Custom { kind: Other, error: "llvm-config failed with error code Some(1)" })]
  stack backtrace:
     0:     0x59829fa88c5c - std::backtrace_rs::backtrace::libunwind::trace::ha69d38c49f1bf263
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x59829fa88c5c - std::backtrace_rs::backtrace::trace_unsynchronized::h93125d0b85fd543c
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x59829fa88c5c - std::sys_common::backtrace::_print_fmt::h8d65f438e8343444
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:67:5
     3:     0x59829fa88c5c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h41751d2af6c8033a
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:44:22
     4:     0x59829faaf58c - core::fmt::rt::Argument::fmt::h5db2f552d8a28f63
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/rt.rs:138:9
     5:     0x59829faaf58c - core::fmt::write::h99465148a27e4883
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/fmt/mod.rs:1114:21
     6:     0x59829fa8571e - std::io::Write::write_fmt::hee8dfd57bd179ab2
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/io/mod.rs:1763:15
     7:     0x59829fa88a44 - std::sys_common::backtrace::_print::h019a3cee3e814da4
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:47:5
     8:     0x59829fa88a44 - std::sys_common::backtrace::print::h55694121c2ddf918
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:34:9
     9:     0x59829fa8a853 - std::panicking::default_hook::{{closure}}::h29cbe3da3891b0b0
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:272:22
    10:     0x59829fa8a574 - std::panicking::default_hook::h881e76b2b8c74280
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:292:9
    11:     0x59829fa8add5 - std::panicking::rust_panic_with_hook::hcc36e25b6e33969c
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:731:13
    12:     0x59829fa8acd1 - std::panicking::begin_panic_handler::{{closure}}::ha415efb0f69f41f9
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:609:13
    13:     0x59829fa89186 - std::sys_common::backtrace::__rust_end_short_backtrace::h395fe90f99451e4e
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/sys_common/backtrace.rs:170:18
    14:     0x59829fa8aa22 - rust_begin_unwind
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:597:5
    15:     0x59829f7c1e15 - core::panicking::panic_fmt::h452a83e54ecd764e
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/panicking.rs:72:14
    16:     0x59829f7c92ea - build_script_build::get_link_libraries::hca11bf3e9438192a
    17:     0x59829f7ca989 - build_script_build::main::h6e757a5581aafbce
    18:     0x59829f7d0773 - core::ops::function::FnOnce::call_once::h39c52a9fee8ef8d7
    19:     0x59829f7cbed6 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc141ed6f1170c7ff
    20:     0x59829f7c34e9 - std::rt::lang_start::{{closure}}::hc3d4543d6f29995b
    21:     0x59829fa816eb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h14c5f6d1cd70a60f
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/ops/function.rs:284:13
    22:     0x59829fa816eb - std::panicking::try::do_call::h2d02374ca451446a
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
    23:     0x59829fa816eb - std::panicking::try::h9f7922394bf57392
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
    24:     0x59829fa816eb - std::panic::catch_unwind::ha1600f9dd4ee7270
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
    25:     0x59829fa816eb - std::rt::lang_start_internal::{{closure}}::hfbd80e7d681b21a1
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:48
    26:     0x59829fa816eb - std::panicking::try::do_call::heacaa33dbdaa16e0
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:504:40
    27:     0x59829fa816eb - std::panicking::try::h637875f7c9db85ea
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panicking.rs:468:19
    28:     0x59829fa816eb - std::panic::catch_unwind::h4caa9c0c78cb4c19
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/panic.rs:142:14
    29:     0x59829fa816eb - std::rt::lang_start_internal::h2d6a60ec944b523d
                                 at /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/std/src/rt.rs:148:20
    30:     0x59829f7c34c7 - std::rt::lang_start::h236b4988b0587322
    31:     0x59829f7cb285 - main
    32:     0x7a4adfe77cd0 - <unknown>
    33:     0x7a4adfe77d8a - __libc_start_main
    34:     0x59829f7c25b5 - _start
    35:                0x0 - <unknown>

I asked in the llvm-sys repo here and the solution i got there lead me to another problem. So i think it's better to ask here too, since I'm building mun and not directly use llvm-sys.

rustc & cargo:

❯ rustc --version
rustc 1.74.1 (a28077b28 2023-12-04)

❯ cargo --version
cargo 1.74.1 (ecb9851af 2023-10-18)

os:

❯ uname -a
Linux phoenix 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +0000 x86_64 GNU/Linux

❯ lsb_release -a
LSB Version:	n/a
Distributor ID:	Arch
Description:	Arch Linux
Release:	rolling
Codename:	n/a

llvm-config:

❯ llvm-config --version
17.0.6

i think that's the source of the problem. Even though I already installed llvm14

❯ pacman -Ss llvm14
extra/llvm14 14.0.6-3 [installed]
    Compiler infrastructure (LLVM 14)
extra/llvm14-libs 14.0.6-3 [installed]
    LLVM 14 runtime libraries
@baszalmstra
Copy link
Collaborator

You could try to using the LLVM_SYS_140_PREFIX environment variable.

@alimulap
Copy link
Author

Sorry for abandoning this issue. I thought this language doesn't suits my need, but turns out it is but it just in a slow development so probably if I get more interest in this, I will try to contribute.

Anyway, with the prefix, the problem still occurs.

Errors
➜ LLVM_SYS_140_PREFIX=/lib/llvm14/ cargo build --release
   Compiling llvm-sys v140.1.3
   Compiling inkwell v0.2.0
   Compiling lld_rs v140.0.0
The following warnings were emitted during compilation:

warning: wrapper/lld-c.cpp: In function ‘auto getLinkerForFlavor(LldFlavor)’:
warning: wrapper/lld-c.cpp:46:25: error: ‘lld::wasm’ has not been declared
warning:    46 |             return lld::wasm::link;
warning:       |                         ^~~~
warning: wrapper/lld-c.cpp:48:25: error: ‘lld::macho’ has not been declared
warning:    48 |             return lld::macho::link;
warning:       |                         ^~~~~
warning: wrapper/lld-c.cpp:50:25: error: ‘lld::coff’ has not been declared
warning:    50 |             return lld::coff::link;
warning:       |                         ^~~~
warning: wrapper/lld-c.cpp:53:25: error: ‘lld::elf’ has not been declared
warning:    53 |             return lld::elf::link;
warning:       |                         ^~~

error: failed to run custom build command for `lld_rs v140.0.0`

Caused by:
  process didn't exit successfully: `/home/alimulap/packages/mun/target/release/build/lld_rs-
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = Some("-I/usr/lib/llvm14/include -std=c++14   -fno-exceptions -D_GNU_SOURCE -D__S
  cargo:warning=wrapper/lld-c.cpp: In function ‘auto getLinkerForFlavor(LldFlavor)’:
  cargo:warning=wrapper/lld-c.cpp:46:25: error: ‘lld::wasm’ has not been declared
  cargo:warning=   46 |             return lld::wasm::link;
  cargo:warning=      |                         ^~~~
  cargo:warning=wrapper/lld-c.cpp:48:25: error: ‘lld::macho’ has not been declared
  cargo:warning=   48 |             return lld::macho::link;
  cargo:warning=      |                         ^~~~~
  cargo:warning=wrapper/lld-c.cpp:50:25: error: ‘lld::coff’ has not been declared
  cargo:warning=   50 |             return lld::coff::link;
  cargo:warning=      |                         ^~~~
  cargo:warning=wrapper/lld-c.cpp:53:25: error: ‘lld::elf’ has not been declared
  cargo:warning=   53 |             return lld::elf::link;
  cargo:warning=      |                         ^~~

  --- stderr


  error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"


warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:

warning: wrapper/lld-c.cpp: In function ‘auto getLinkerForFlavor(LldFlavor)’:
warning: wrapper/lld-c.cpp:46:25: error: ‘lld::wasm’ has not been declared
warning:    46 |             return lld::wasm::link;
warning:       |                         ^~~~
warning: wrapper/lld-c.cpp:48:25: error: ‘lld::macho’ has not been declared
warning:    48 |             return lld::macho::link;
warning:       |                         ^~~~~
warning: wrapper/lld-c.cpp:50:25: error: ‘lld::coff’ has not been declared
warning:    50 |             return lld::coff::link;
warning:       |                         ^~~~
warning: wrapper/lld-c.cpp:53:25: error: ‘lld::elf’ has not been declared
warning:    53 |             return lld::elf::link;
warning:       |                         ^~~

error: failed to run custom build command for `lld_rs v140.0.0`

Caused by:
  process didn't exit successfully: `/home/alimulap/packages/mun/target/release/build/lld_rs-
  --- stdout
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = Some("-I/usr/lib/llvm14/include -std=c++14   -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS ")
  cargo:warning=wrapper/lld-c.cpp: In function ‘auto getLinkerForFlavor(LldFlavor)’:
  cargo:warning=wrapper/lld-c.cpp:46:25: error: ‘lld::wasm’ has not been declared
  cargo:warning=   46 |             return lld::wasm::link;
  cargo:warning=      |                         ^~~~
  cargo:warning=wrapper/lld-c.cpp:48:25: error: ‘lld::macho’ has not been declared
  cargo:warning=   48 |             return lld::macho::link;
  cargo:warning=      |                         ^~~~~
  cargo:warning=wrapper/lld-c.cpp:50:25: error: ‘lld::coff’ has not been declared
  cargo:warning=   50 |             return lld::coff::link;
  cargo:warning=      |                         ^~~~
  cargo:warning=wrapper/lld-c.cpp:53:25: error: ‘lld::elf’ has not been declared
  cargo:warning=   53 |             return lld::elf::link;
  cargo:warning=      |                         ^~~

  --- stderr


  error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I/usr/lib/llvm14/include" "-std=c++14" "-fno-exceptions" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-std=c++17" "-o" "/home/alimulap/packages/mun/target/release/build/lld_rs-74df16ec58c5d6ce/out/cc74dcc53cfce4eb-lld-c.o" "-c" "wrapper/lld-c.cpp" with args "c++" did not execute successfully (status code exit status: 1).

I'm not sure if i did it right though

@baszalmstra
Copy link
Collaborator

It looks like the program is still including lld headers that are not for lld 14, but its unclear to me why that would be the case.

@Wodann Wodann added the status: need info Information is needed from the reporter to progress the issue. label Jul 30, 2024
@Wodann Wodann assigned alimulap and unassigned alimulap Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: need info Information is needed from the reporter to progress the issue.
Projects
None yet
Development

No branches or pull requests

3 participants