Reply 40 of 252, by LSS10999
Tried building but not successful. I'm using the commands you mentioned in the "Build" section of README.md instead of the run.sh which I suppose is more for running compiled targets...
My host is Arch Linux based. Currently I'm using rustup and bazelisk packages from pacman.
Here's the build output with "--verbose_failures" added to bazelisk arguments regarding the error.
INFO: Analyzed target //:image (90 packages loaded, 5933 targets configured).ERROR: /data/RetroOS/kernel/BUILD.bazel:171:12: Compiling Rust bin retroos-host (1 file) [for tool] failed: (Exit 1): process_wrapper failed: error executing Rustc command (from target //kernel:retroos-host)(cd /home/user/.cache/bazel/_bazel_user/a7f4c046dc473b410a4dd4e0a0b103ef/sandbox/linux-sandbox/515/execroot/_main && \exec env - \CARGO_CFG_TARGET_ARCH=x86_64 \CARGO_CFG_TARGET_OS=linux \CARGO_CRATE_NAME=retroos_host \CARGO_MANIFEST_DIR='${pwd}/kernel' \CARGO_PKG_AUTHORS='' \CARGO_PKG_DESCRIPTION='' \CARGO_PKG_HOMEPAGE='' \CARGO_PKG_NAME=retroos-host \CARGO_PKG_VERSION=0.0.0 \CARGO_PKG_VERSION_MAJOR=0 \CARGO_PKG_VERSION_MINOR=0 \CARGO_PKG_VERSION_PATCH=0 \CARGO_PKG_VERSION_PRE='' \LD_LIBRARY_PATH='' \PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \REPOSITORY_NAME='' \ZERO_AR_DATE=1 \bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~/util/process_wrapper/process_wrapper --arg-file bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__libc-0.2.186/_bs.linksearchpaths --subst 'pwd=${pwd}' --subst 'exec_root=${exec_root}' --subst 'output_base=${output_base}' -- bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools/rust_toolchain/bin/rustc kernel/src/main.rs '--crate-name=retroos_host' '--crate-type=bin' '--error-format=human' '--out-dir=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel' '--codegen=opt-level=3' '--codegen=debuginfo=0' '--codegen=strip=debuginfo' '--remap-path-prefix=${pwd}=.' '--remap-path-prefix=${exec_root}=.' '--remap-path-prefix=${output_base}=.' '--emit=link=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/retroos-host' '--emit=dep-info' '--color=always' '--target=x86_64-unknown-linux-gnu' -L bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools/rust_toolchain/lib/rustlib/x86_64-unknown-linux-gnu/lib '--edition=2024' '-Cembed-bitcode=no' '--codegen=linker=/usr/sbin/gcc' '--codegen=link-arg=-fuse-ld=lld' '--codegen=link-arg=-B/usr/sbin' '--codegen=link-arg=-Wl,-no-as-needed' '--codegen=link-arg=-Wl,-z,relro,-z,now' '--codegen=link-arg=-pass-exit-codes' '--codegen=link-arg=-Wl,--gc-sections' '--codegen=link-arg=-Wl,--push-state,-as-needed' '--codegen=link-arg=-lstdc++' '--codegen=link-arg=-Wl,--pop-state' '--codegen=link-arg=-Wl,--push-state,-as-needed' '--codegen=link-arg=-lm' '--codegen=link-arg=-Wl,--pop-state' '-Lnative=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/unicorn/unicorn/lib' '-Lnative=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~lwext4' '-lstatic=unicorn' '-Clink-arg=-lunicorn' '-lstatic=lwext4_host' '-Clink-arg=-llwext4_host' '--extern=kernel=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/libkernel-345816794.rlib' '--extern=retroos_arch_interp=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/arch-interp/libretroos_arch_interp-391651502.rlib' '--extern=lib=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib/liblib-386233736.rlib' '--extern=vga=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib/libvga-505772366.rlib' '--extern=sound=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib/libsound-542287918.rlib' '--extern=lwext4=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/lwext4/liblwext4-861921465.rlib' '--extern=lwext4_sys=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/lwext4/liblwext4_sys-731513127.rlib' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/klog' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~nuked_opl3' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/lwext4' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__bytemuck_derive-1.12.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__bytemuck-1.25.2' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__cfg-if-1.0.4' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__embedded-io-0.7.1' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__zerocopy-derive-0.8.56' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-fixed-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-io-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-path-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__noalloc-0.0.1' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__zerocopy-0.8.56' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__endian-num-0.2.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-macros-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__scopeguard-1.2.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__lock_api-0.4.14' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__bitflags-2.13.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-common-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-part-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__spin-0.12.2' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~bitflags' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~log' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/arch-abi' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/voodoo' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-iso-2.0.0' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~fatfs' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__rustc-demangle-0.1.27' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__unicorn-engine-sys-2.1.5' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__libc-0.2.186' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__unicorn-engine-2.1.5' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel' '-Ldependency=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/arch-interp' '--sysroot=bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~rust~rust_linux_x86_64__x86_64-unknown-linux-gnu__nightly_tools/rust_toolchain' '-Cpanic=abort' '-Crelocation-model=static')# Configuration: 9750c3709d99419e4c56edd72750e9f13bcc9895c954ae6e73a969df2f902206# Execution platform: @@platforms//host:hostUse --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debuggingerror: linking with `/usr/sbin/gcc` failed: exit status: 1|= note: "/usr/sbin/gcc" "-m64" "/home/user/.cache/bazel/_bazel_user/a7f4c046dc473b410a4dd4e0a0b103ef/sandbox/linux-sandbox/515/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/rustcrQE2HF/symbols.o" "<17 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "-lunicorn" "-llwext4_host" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_abort-*.rlib" "/home/user/.cache/bazel/_bazel_user/a7f4c046dc473b410a4dd4e0a0b103ef/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/libkernel-345816794.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~fatfs/libfatfs-1269675949.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~bitflags/libbitflags-2296606973.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~log/liblog-192684875.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/lwext4/liblwext4-861921465.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/voodoo/libvoodoo-409010663.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/lwext4/liblwext4_sys-731513127.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-iso-2.0.0/libhadris_iso-1173291256.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__bitflags-2.13.0/libbitflags-426805593.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-io-2.0.0/libhadris_io-3428972955.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__embedded-io-0.7.1/libembedded_io-400402238.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-common-2.0.0/libhadris_common-1965804352.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-path-2.0.0/libhadris_path-1453752966.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__zerocopy-0.8.56/libzerocopy-239233032.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__noalloc-0.0.1/libnoalloc-1333964645.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__hadris-fixed-2.0.0/libhadris_fixed-778759671.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__bytemuck-1.25.2/libbytemuck-3676478283.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib/libsound-542287918.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~nuked_opl3/libnuked_opl3-1202259879.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__spin-0.12.2/libspin-16997579.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__lock_api-0.4.14/liblock_api-1800404391.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__scopeguard-1.2.0/libscopeguard-2096412608.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/lib/{libvga-505772366,liblib-386233736}.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/klog/libklog-1506101342.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__rustc-demangle-0.1.27/librustc_demangle-1873733380.rlib" "/home/user/.cache/bazel/_bazel_user/a7f4c046dc473b410a4dd4e0a0b103ef/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/arch-interp/libretroos_arch_interp-391651502.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__libc-0.2.186/liblibc-4078536105.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__unicorn-engine-2.1.5/libunicorn_engine-323025378.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/rules_rust~~crate~crates__unicorn-engine-sys-2.1.5/libunicorn_engine_sys-616523268.rlib" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/arch-abi/libarch_abi-79344026.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/home/user/.cache/bazel/_bazel_user/a7f4c046dc473b410a4dd4e0a0b103ef/sandbox/linux-sandbox/515/execroot/_main/bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/rustcrQE2HF/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/unicorn/unicorn/lib" "-L" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/_main~_repo_rules~lwext4" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "bazel-out/k8-opt-exec-ST-d57f47055a04/bin/kernel/retroos-host" "-Wl,--gc-sections" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-debug" "-nodefaultlibs" "-fuse-ld=lld" "-B/usr/sbin" "-Wl,-no-as-needed" "-Wl,-z,relro,-z,now" "-pass-exit-codes" "-Wl,--gc-sections" "-Wl,--push-state,-as-needed" "-lstdc++" "-Wl,--pop-state" "-Wl,--push-state,-as-needed" "-lm" "-Wl,--pop-state" "-lunicorn" "-llwext4_host"= note: some arguments are omitted. use `--verbose` to show all linker arguments= note: ld.lld: error: undefined symbol: __atomic_compare_exchange_16>>> referenced by cputlb.c>>> cputlb.c.o:(helper_atomic_cmpxchgo_le_mmu_x86_64) in archive bazel-out/k8-opt-exec-ST-d57f47055a04/bin/third_party/unicorn/unicorn/lib/libunicorn.acollect2: error: ld returned 1 exit statuserror: aborting due to 1 previous errorTarget //:image failed to buildINFO: Elapsed time: 2.741s, Critical Path: 1.13sINFO: 2 processes: 2 internal.ERROR: Build did NOT complete successfully
BTW: Before this error I had another set of errors including this following one, which went away after adding "--repo_env=BAZEL_CONLYOPTS="-std=gnu17"" into bazelisk args according to this comment. Perhaps toolchains from Arch Linux is too new for the purpose requiring some additional efforts to make workflows compatible.
goption.c:169:14: error: two or more data types in declaration specifiers169 | gboolean bool;| ^~~~goption.c:169:18: warning: declaration does not declare anything169 | gboolean bool;| ^goption.c: In function 'free_changes_list':goption.c:1603:60: error: expected identifier before 'bool'1603 | *(gboolean *)change->arg_data = change->prev.bool;