compile ack main branch failed as llvm internal error

52 views
Skip to first unread message

chen bryan

unread,
Feb 20, 2024, 9:31:39 AMFeb 20
to android-llvm
hello, I try to compile ack main branch on ubuntu-18.04 running in wsl2 and it failed.
the compile command is:  tools/bazel run //common:kernel --sandbox_debug
and then i got the error messages like below shows it's and llvm internal error, so any idea on this?  thx in adv.

Computing main repo mapping:
Computing main repo mapping:
Loading:
Loading: 1 packages loaded
Loading: 1 packages loaded
    currently loading: common
Analyzing: target //common:kernel (2 packages loaded)
INFO: Deleting stale sandbox base /home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox
Analyzing: target //common:kernel (2 packages loaded)
Analyzing: target //common:kernel (2 packages loaded, 0 targets configured)
Analyzing: target //common:kernel (2 packages loaded, 0 targets configured)
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
Analyzing: target //common:kernel (7 packages loaded, 32 targets configured)
[1 / 1] checking cached actions
Analyzing: target //common:kernel (40 packages loaded, 206 targets configured)
[1 / 1] checking cached actions
Analyzing: target //common:kernel (53 packages loaded, 3956 targets configured)
[1 / 1] checking cached actions
Analyzing: target //common:kernel (56 packages loaded, 10487 targets configured)
[1 / 1] checking cached actions
INFO: Analyzed target //common:kernel (56 packages loaded, 99561 targets configured).
[260 / 262] [Prepa] Creating kernel config (lto=default;notrim) @//common:kernel_aarch64_config
[260 / 262] Creating kernel config (lto=default;notrim) @//common:kernel_aarch64_config; 0s processwrapper-sandbox
[260 / 262] Creating kernel config (lto=default;notrim) @//common:kernel_aarch64_config; 11s processwrapper-sandbox
[260 / 262] Creating kernel config (lto=default;notrim) @//common:kernel_aarch64_config; 41s processwrapper-sandbox
ERROR: /home/chengang15/android-kernel/common/BUILD.bazel:108:22: Creating kernel config (lto=default;notrim) @//common:kernel_aarch64_config failed: (Exit 2): process-wrapper failed: error executing KernelConfig command
  (cd /home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__ && \
  exec env - \
    TMPDIR=/tmp \
  /home/chengang15/android-kernel/out/bazel/output_user_root/install/14fb027596f626f2526df4873ea20b8b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/stats.out' /bin/bash -c '
         # error on failures
           set -e
           set -o pipefail
   
                export PATH=$(bazel-out/k8-fastbuild/bin/build/kernel/hermetic-tools/readlink -m bazel-out/k8-fastbuild/bin/build/kernel/hermetic-tools)
                # Ensure _setup_env.sh keeps the original items in PATH
                export KLEAF_INTERNAL_BUILDTOOLS_PREBUILT_BIN=bazel-out/k8-fastbuild/bin/build/kernel/hermetic-tools

        source build/kernel/build_utils.sh
        # source the build environment
        source bazel-out/k8-fastbuild/bin/common/kernel_aarch64_env.sh
   
         
        # Pre-defconfig commands
          eval ${PRE_DEFCONFIG_CMDS}
        # Actual defconfig
          make -C ${KERNEL_DIR} ${TOOL_ARGS} O=${OUT_DIR} ${DEFCONFIG}
        # Post-defconfig commands
          eval ${POST_DEFCONFIG_CMDS}
        # Re-config
         
        (
            need_olddefconfig=
            configs_to_apply=$(echo )
            # There could be reconfigurations based on configs which can lead to
            #  an empty `configs_to_apply` even when `configs` is not empty,
            #  for that reason it is better to check it is not empty before using it.
            if [ -n "${configs_to_apply}" ]; then
                ${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config ${configs_to_apply}
                need_olddefconfig=1
            fi

           

            if [[ -n "${need_olddefconfig}" ]]; then
                make -C ${KERNEL_DIR} ${TOOL_ARGS} O=${OUT_DIR} olddefconfig
            fi

           
        )
   
        # HACK: run syncconfig to avoid re-triggerring kernel_build
          make -C ${KERNEL_DIR} ${TOOL_ARGS} O=${OUT_DIR} syncconfig
        # Grab outputs
          rsync -aL ${OUT_DIR}/.config bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/out_dir/.config
          rsync -aL ${OUT_DIR}/include/ bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/out_dir/include/
          rsync -aL bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/localversion bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/out_dir/localversion

        # Ensure reproducibility. The value of the real $ROOT_DIR is replaced in the setup script.
          sed -i'\'''\'' -e '\''s:'\''"${ROOT_DIR}"'\'':${ROOT_DIR}:g'\'' bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/out_dir/include/config/auto.conf.cmd

        # HACK: Ensure we always SYNC auto.conf. This ensures binaries like fixdep are always
        # re-built. See b/263415662
          echo "include/config/auto.conf: FORCE" >> bazel-out/k8-fastbuild/bin/common/kernel_aarch64_config/out_dir/include/config/auto.conf.cmd

         
        ')
Internal error. Please report to androi...@google.com.
compiler_wrapper.go:275: failed to execute &main.command{Path:"/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/prebuilts/clang/host/linux-x86/clang-r510928/bin/clang.real", Args:[]string{"-Wp,-MMD,scripts/basic/.fixdep.d", "-Wall", "-Wmissing-prototypes", "-Wstrict-prototypes", "-O2", "-fomit-frame-pointer", "-std=gnu11", "-iquote", "/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/.", "-iquote", "/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin", "-I/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/prebuilts/kernel-build-tools/_virtual_includes/linux_x86_imported_libs", "--sysroot=/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/build/kernel/build-tools/sysroot", "-I", "./scripts/basic", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibbase.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibc++.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibcrypto-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibcrypto.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibcrypto_Uutils.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibcutils.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibelf.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2_Ublkid-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2_Ucom_Uerr-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2_Ue2p-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2_Uquota-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2_Uuuid-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext2fs-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibext4_Uutils.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibfdt.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibicui18n-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibicuuc-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibinterceptor.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Sliblog.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Sliblp.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibsparse-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibsqlite.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-L/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/bazel-out/k8-opt-exec-ST-cc34b0dd6772/bin/_solib_x86_64/_U_S_Sprebuilts_Skernel-build-tools_Clinux_Ux86_Uimported_Ulibs_Ulinux-x86_Slib64_Slibz-host.so___Uprebuilts_Skernel-build-tools_Slinux-x86_Slib64", "-fuse-ld=lld", "--rtlib=compiler-rt", "--sysroot=/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/build/kernel/build-tools/sysroot", "-o", "scripts/basic/fixdep", "/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/common/scripts/basic/fixdep.c"}, EnvUpdates:[]string(nil)}: go_exec.go:23: exec error: exec format error
make[3]: *** [/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/common/scripts/Makefile.host:116: scripts/basic/fixdep] Error 1
make[2]: *** [/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/common/Makefile:639: scripts_basic] Error 2
make[1]: *** [/home/chengang15/android-kernel/out/bazel/output_user_root/7c2c03c813bb0e583388ece90bc4609d/sandbox/processwrapper-sandbox/1/execroot/__main__/common/Makefile:252: __sub-make] Error 2
make: *** [Makefile:252: __sub-make] Error 2
Target //common:kernel_aarch64 failed to build
Use --verbose_failures to see the command lines of failed build steps.
[261 / 262] checking cached actions
INFO: Elapsed time: 252.076s, Critical Path: 44.97s
INFO: 2 processes: 2 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target


app...@google.com

unread,
Feb 20, 2024, 4:00:46 PMFeb 20
to android-llvm

Do you mind creating an issue here https://github.com/android/ndk/issues  ?

Pirama Arumuga Nainar

unread,
Feb 20, 2024, 4:22:02 PMFeb 20
to app...@google.com, android-llvm
On Tue, Feb 20, 2024 at 1:00 PM 'app...@google.com' via android-llvm <androi...@googlegroups.com> wrote:

Do you mind creating an issue here https://github.com/android/ndk/issues  ?

This is not an NDK issue, so that's not the right place :)
 
On Tuesday, February 20, 2024 at 6:31:39 AM UTC-8 chen bryan wrote:
hello, I try to compile ack main branch on ubuntu-18.04 running in wsl2 and it failed.
the compile command is:  tools/bazel run //common:kernel --sandbox_debug

We don't test on WSL2 - does it reproduce natively on Linux?

> go_exec.go:23: exec error: exec format error

further down below makes it similar to https://groups.google.com/g/android-llvm/c/l0cz8MgvTZI but there was no resolution tin that discussion.
 
--
You received this message because you are subscribed to the Google Groups "android-llvm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-llvm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/c73bee09-0448-4dc3-a6b6-6574e2c39171n%40googlegroups.com.

chen bryan

unread,
Feb 21, 2024, 2:21:52 AMFeb 21
to android-llvm
Thanks for your help. I see it's a WSL bug, and some other elf binaries also meet this error as WSL is not perfect to support the elf specification. Any way, I will try to compile ack on Linux.
Reply all
Reply to author
Forward
0 new messages