From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 385451C6CC1; Wed, 21 Dec 2022 17:33:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 385451C6CC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1671633205; bh=Fj2s3LPUooQAQfgRBkTwBkE4FP0jRlNmdaFtf/Mi4ic=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Swi6h9XXN/se0naikg7KuXHaAbkzhHz8ibzUaSu2P7SxkOVrOgeGKz6wOQuXafLac X//effkwejq1JMR0c482fM4CBN7tC4PifOy23+ue4JeXR4qcs4DxpYKsfDdIcezF1b GXUckFmcAIUuDmf1IEDZTi+w7SB1h98E8F7pKKQ4= Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 85E2D350B8 for ; Wed, 21 Dec 2022 17:33:23 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 85E2D350B8 Received: by mail-lf1-f46.google.com with SMTP id b3so23820417lfv.2 for ; Wed, 21 Dec 2022 06:33:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+zVLacMwNAn0V4EwLfsc1nufPZsClLd4kchltf3qvcU=; b=iSK6w2w+wmVaHV7yvJUXHtj1E9/X4qBBJh9LovhXqadKqbmKzv8NZ8SkwLR5qjs8He CyP4/53kDgHSLL8/Dgu3dyXPZv5vU9J6ZifRtwnLQVwft6X1mbtPWl9jMZ1yhCoxAiyn Ca3X9YQkc+fyCUUvnWs/Yc5syiahlzNbWRPlmuzTgmJ4KK8FOQQiQKQvSazzwqS3+cws vf4wCZKzGjaYeVJ+3OQLFmFxbYZCMzuOw4rlK3rzEvYSqxdCCYxDiZrA/9SRVOI974DR 19//wVSGoJ8qRitKLSv3crLRlFuRpqY1QhPJDgSnuFCC1/E0AgCUXj8Apc4BYdNihv7y S65w== X-Gm-Message-State: AFqh2kqWotC07sLQwAL391yfiyrK95yTd1909KvtJhO50wfztbjGliWb bXH1mCF2gw74WJkfRQN9MmMsQvD4+3E= X-Google-Smtp-Source: AMrXdXtgjPEGVRlkQAyy+SvNQOSZAgc2x9CxXO9PYgcwisVgReyHN3S77NvRAeiXfIzlq+dcWBLPwg== X-Received: by 2002:ac2:4bd3:0:b0:4a4:68b7:d638 with SMTP id o19-20020ac24bd3000000b004a468b7d638mr625843lfq.31.1671633202313; Wed, 21 Dec 2022 06:33:22 -0800 (PST) Received: from fckxorg.mail.msk ([2a00:1148:b0ba:18:2949:a6e7:99e8:81c5]) by smtp.gmail.com with ESMTPSA id z11-20020a056512370b00b004b4f1ea713csm1852868lfr.73.2022.12.21.06.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 06:33:21 -0800 (PST) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org Date: Wed, 21 Dec 2022 17:33:17 +0300 Message-Id: <20221221143317.477323-1-m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit] cmake: fix build for non-bash shells X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Before the patch, the external unwinding probe command could fail on systems that don't have Bash installed. This patch changes the command invocation, so it now uses the `sh` symlink. --- Branch: https://github.com/tarantool/luajit/tree/fckxorg/gh-noticket-fix-build-for-non-bash PR: https://github.com/tarantool/tarantool/pull/8087 First noticed on Alpine. Here is the build log after the patch: /luajit/build # cat /etc/issue Welcome to Alpine Linux 3.15 Kernel \r on an \m (\l) /luajit/build # cmake .. -DCMAKE_BUILD_TYPE=Debug -DLUAJIT_DISABLE_SYSPROF=ON -- The C compiler identification is GNU 10.3.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- [SetVersion] Reading version from VCS: v2.1.0-beta3-272-g9c4048dc -- [SetBuildParallelLevel] CMAKE_BUILD_PARALLEL_LEVEL is 12 -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc -- LuaJIT system profiler support is disabled CMake Warning at test/lua-Harness-tests/CMakeLists.txt:9 (message): `prove' is not found, so lua-Harness-tests target is not generated CMake Warning at test/tarantool-tests/CMakeLists.txt:9 (message): `prove' is not found, so tarantool-tests target is not generated -- Configuring done -- Generating done -- Build files have been written to: /luajit/build /luajit/build # make -j [ 1%] Building C object src/host/CMakeFiles/minilua.dir/minilua.c.o [ 1%] Linking C executable minilua [ 1%] Built target minilua [ 2%] Generating buildvm_arch.h [ 3%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_fold.c.o [ 3%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm.c.o [ 3%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_asm.c.o [ 4%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_lib.c.o [ 5%] Building C object src/host/CMakeFiles/buildvm.dir/buildvm_peobj.c.o [ 5%] Linking C executable buildvm [ 5%] Built target buildvm [ 6%] Generating lj_vm.S [ 7%] Generating lj_vm.S [ 7%] Generating lj_bcdef.h [ 8%] Generating lj_recdef.h [ 9%] Generating lj_ffdef.h [ 10%] Generating lj_libdef.h [ 11%] Generating jit/vmdef.lua [ 11%] Generating lj_folddef.h Scanning dependencies of target vm_shared Scanning dependencies of target vm_static [ 11%] Building ASM object src/CMakeFiles/vm_shared.dir/lj_vm.S.o [ 12%] Building ASM object src/CMakeFiles/vm_static.dir/lj_vm.S.o [ 12%] Built target vm_shared [ 12%] Built target vm_static [ 12%] Built target buildvm_output [ 12%] Building C object src/CMakeFiles/core_static.dir/lj_buf.c.o [ 13%] Building C object src/CMakeFiles/core_static.dir/lj_bc.c.o [ 13%] Building C object src/CMakeFiles/core_shared.dir/lj_api.c.o [ 14%] Building C object src/CMakeFiles/core_static.dir/lj_api.c.o [ 15%] Building C object src/CMakeFiles/core_static.dir/lj_debug.c.o [ 16%] Building C object src/CMakeFiles/core_shared.dir/lj_debug.c.o [ 17%] Building C object src/CMakeFiles/core_shared.dir/lj_bc.c.o [ 17%] Building C object src/CMakeFiles/core_shared.dir/lj_dispatch.c.o [ 18%] Building C object src/CMakeFiles/core_static.dir/lj_err.c.o [ 18%] Building C object src/CMakeFiles/core_static.dir/lj_dispatch.c.o [ 18%] Building C object src/CMakeFiles/core_static.dir/lj_func.c.o [ 20%] Building C object src/CMakeFiles/core_shared.dir/lj_err.c.o [ 20%] Building C object src/CMakeFiles/core_shared.dir/lj_buf.c.o [ 21%] Building C object src/CMakeFiles/core_shared.dir/lj_func.c.o [ 22%] Building C object src/CMakeFiles/core_static.dir/lj_gc.c.o [ 22%] Building C object src/CMakeFiles/core_shared.dir/lj_gc.c.o [ 23%] Building C object src/CMakeFiles/core_shared.dir/lj_lib.c.o [ 23%] Building C object src/CMakeFiles/core_shared.dir/lj_load.c.o [ 24%] Building C object src/CMakeFiles/core_static.dir/lj_lib.c.o [ 25%] Building C object src/CMakeFiles/core_shared.dir/lj_mapi.c.o [ 25%] Building C object src/CMakeFiles/core_shared.dir/lj_meta.c.o [ 25%] Building C object src/CMakeFiles/core_static.dir/lj_load.c.o [ 26%] Building C object src/CMakeFiles/core_shared.dir/lj_obj.c.o [ 27%] Building C object src/CMakeFiles/core_static.dir/lj_mapi.c.o [ 27%] Building C object src/CMakeFiles/core_static.dir/lj_meta.c.o [ 28%] Building C object src/CMakeFiles/core_static.dir/lj_obj.c.o [ 29%] Building C object src/CMakeFiles/core_shared.dir/lj_state.c.o [ 29%] Building C object src/CMakeFiles/core_static.dir/lj_state.c.o [ 29%] Building C object src/CMakeFiles/core_shared.dir/lj_str.c.o [ 30%] Building C object src/CMakeFiles/core_shared.dir/lj_strfmt.c.o [ 31%] Building C object src/CMakeFiles/core_static.dir/lj_str.c.o [ 31%] Building C object src/CMakeFiles/core_static.dir/lj_strfmt_num.c.o [ 31%] Building C object src/CMakeFiles/core_shared.dir/lj_strfmt_num.c.o [ 32%] Building C object src/CMakeFiles/core_static.dir/lj_strfmt.c.o [ 33%] Building C object src/CMakeFiles/core_static.dir/lj_strscan.c.o [ 34%] Building C object src/CMakeFiles/core_shared.dir/lj_strscan.c.o [ 34%] Building C object src/CMakeFiles/core_shared.dir/lj_tab.c.o [ 36%] Building C object src/CMakeFiles/core_static.dir/lj_udata.c.o [ 36%] Building C object src/CMakeFiles/core_shared.dir/lj_udata.c.o [ 36%] Building C object src/CMakeFiles/core_static.dir/lj_vmevent.c.o [ 36%] Building C object src/CMakeFiles/core_static.dir/lj_tab.c.o [ 37%] Building C object src/CMakeFiles/core_static.dir/lib_aux.c.o [ 38%] Building C object src/CMakeFiles/core_shared.dir/lj_vmevent.c.o [ 40%] Building C object src/CMakeFiles/core_static.dir/lib_init.c.o [ 40%] Building C object src/CMakeFiles/core_static.dir/lib_base.c.o [ 41%] Building C object src/CMakeFiles/core_static.dir/lib_math.c.o [ 41%] Building C object src/CMakeFiles/core_shared.dir/lib_aux.c.o [ 42%] Building C object src/CMakeFiles/core_shared.dir/lib_init.c.o [ 42%] Building C object src/CMakeFiles/core_shared.dir/lib_base.c.o [ 43%] Building C object src/CMakeFiles/core_shared.dir/lib_math.c.o [ 43%] Building C object src/CMakeFiles/core_static.dir/lib_bit.c.o [ 43%] Building C object src/CMakeFiles/core_shared.dir/lib_bit.c.o [ 44%] Building C object src/CMakeFiles/core_static.dir/lib_string.c.o [ 44%] Building C object src/CMakeFiles/core_static.dir/lib_table.c.o [ 45%] Building C object src/CMakeFiles/core_static.dir/lib_io.c.o [ 46%] Building C object src/CMakeFiles/core_shared.dir/lib_string.c.o [ 47%] Building C object src/CMakeFiles/core_shared.dir/lib_table.c.o [ 47%] Building C object src/CMakeFiles/core_shared.dir/lib_io.c.o [ 48%] Building C object src/CMakeFiles/core_static.dir/lib_os.c.o [ 48%] Building C object src/CMakeFiles/core_static.dir/lib_jit.c.o [ 49%] Building C object src/CMakeFiles/core_static.dir/lib_debug.c.o [ 49%] Building C object src/CMakeFiles/core_static.dir/lib_package.c.o [ 49%] Building C object src/CMakeFiles/core_static.dir/lib_misc.c.o [ 50%] Building C object src/CMakeFiles/core_static.dir/lib_ffi.c.o [ 51%] Building C object src/CMakeFiles/core_shared.dir/lib_os.c.o [ 52%] Building C object src/CMakeFiles/core_static.dir/lj_bcread.c.o [ 52%] Building C object src/CMakeFiles/core_shared.dir/lib_package.c.o [ 53%] Building C object src/CMakeFiles/core_shared.dir/lib_debug.c.o [ 54%] Building C object src/CMakeFiles/core_static.dir/lj_bcwrite.c.o [ 54%] Building C object src/CMakeFiles/core_static.dir/lj_lex.c.o [ 55%] Building C object src/CMakeFiles/core_shared.dir/lib_jit.c.o [ 55%] Building C object src/CMakeFiles/core_shared.dir/lib_ffi.c.o [ 55%] Building C object src/CMakeFiles/core_shared.dir/lj_bcread.c.o [ 56%] Building C object src/CMakeFiles/core_static.dir/lj_parse.c.o [ 57%] Building C object src/CMakeFiles/core_shared.dir/lj_bcwrite.c.o [ 57%] Building C object src/CMakeFiles/core_static.dir/lj_memprof.c.o [ 58%] Building C object src/CMakeFiles/core_shared.dir/lib_misc.c.o [ 60%] Building C object src/CMakeFiles/core_static.dir/lj_profile.c.o [ 60%] Building C object src/CMakeFiles/core_shared.dir/lj_lex.c.o [ 61%] Building C object src/CMakeFiles/core_shared.dir/lj_parse.c.o [ 62%] Building C object src/CMakeFiles/core_static.dir/lj_sysprof.c.o [ 61%] Building C object src/CMakeFiles/core_static.dir/lj_profile_timer.c.o [ 63%] Building C object src/CMakeFiles/core_static.dir/lj_symtab.c.o [ 63%] Building C object src/CMakeFiles/core_static.dir/lj_alloc.c.o [ 64%] Building C object src/CMakeFiles/core_shared.dir/lj_memprof.c.o [ 64%] Building C object src/CMakeFiles/core_shared.dir/lj_profile.c.o [ 65%] Building C object src/CMakeFiles/core_static.dir/lj_char.c.o [ 65%] Building C object src/CMakeFiles/core_static.dir/lj_utils_leb128.c.o [ 66%] Building C object src/CMakeFiles/core_shared.dir/lj_profile_timer.c.o [ 66%] Building C object src/CMakeFiles/core_shared.dir/lj_symtab.c.o [ 67%] Building C object src/CMakeFiles/core_static.dir/lj_vmmath.c.o [ 68%] Building C object src/CMakeFiles/core_static.dir/lj_wbuf.c.o [ 69%] Building C object src/CMakeFiles/core_shared.dir/lj_sysprof.c.o [ 69%] Building C object src/CMakeFiles/core_static.dir/lj_asm.c.o [ 69%] Building C object src/CMakeFiles/core_static.dir/lj_ir.c.o [ 69%] Building C object src/CMakeFiles/core_shared.dir/lj_alloc.c.o [ 70%] Building C object src/CMakeFiles/core_shared.dir/lj_utils_leb128.c.o [ 71%] Building C object src/CMakeFiles/core_shared.dir/lj_char.c.o [ 72%] Building C object src/CMakeFiles/core_static.dir/lj_ffrecord.c.o [ 73%] Building C object src/CMakeFiles/core_static.dir/lj_mcode.c.o [ 73%] Building C object src/CMakeFiles/core_shared.dir/lj_vmmath.c.o [ 73%] Building C object src/CMakeFiles/core_static.dir/lj_record.c.o [ 74%] Building C object src/CMakeFiles/core_shared.dir/lj_wbuf.c.o [ 75%] Building C object src/CMakeFiles/core_static.dir/lj_snap.c.o [ 75%] Building C object src/CMakeFiles/core_shared.dir/lj_asm.c.o [ 76%] Building C object src/CMakeFiles/core_static.dir/lj_trace.c.o [ 77%] Building C object src/CMakeFiles/core_shared.dir/lj_ffrecord.c.o [ 78%] Building C object src/CMakeFiles/core_static.dir/lj_opt_fold.c.o [ 78%] Building C object src/CMakeFiles/core_static.dir/lj_opt_loop.c.o [ 78%] Building C object src/CMakeFiles/core_static.dir/lj_opt_dce.c.o [ 78%] Building C object src/CMakeFiles/core_shared.dir/lj_ir.c.o [ 80%] Building C object src/CMakeFiles/core_static.dir/lj_opt_mem.c.o [ 81%] Building C object src/CMakeFiles/core_shared.dir/lj_mcode.c.o [ 82%] Building C object src/CMakeFiles/core_static.dir/lj_carith.c.o [ 82%] Building C object src/CMakeFiles/core_static.dir/lj_opt_narrow.c.o [ 82%] Building C object src/CMakeFiles/core_shared.dir/lj_snap.c.o [ 83%] Building C object src/CMakeFiles/core_static.dir/lj_opt_sink.c.o [ 85%] Building C object src/CMakeFiles/core_shared.dir/lj_record.c.o [ 85%] Building C object src/CMakeFiles/core_static.dir/lj_ccallback.c.o [ 84%] Building C object src/CMakeFiles/core_static.dir/lj_ccall.c.o [ 85%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_dce.c.o [ 86%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_fold.c.o [ 88%] Building C object src/CMakeFiles/core_static.dir/lj_cconv.c.o [ 87%] Building C object src/CMakeFiles/core_shared.dir/lj_trace.c.o [ 88%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_mem.c.o [ 88%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_loop.c.o [ 89%] Building C object src/CMakeFiles/core_static.dir/lj_cdata.c.o [ 89%] Building C object src/CMakeFiles/core_static.dir/lj_clib.c.o [ 90%] Building C object src/CMakeFiles/core_static.dir/lj_cparse.c.o [ 91%] Building C object src/CMakeFiles/core_static.dir/lj_crecord.c.o [ 91%] Building C object src/CMakeFiles/core_static.dir/lj_ctype.c.o [ 92%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_narrow.c.o [ 92%] Building C object src/CMakeFiles/core_shared.dir/lj_opt_sink.c.o [ 93%] Building C object src/CMakeFiles/core_shared.dir/lj_carith.c.o [ 93%] Building C object src/CMakeFiles/core_shared.dir/lj_ccallback.c.o [ 94%] Building C object src/CMakeFiles/core_shared.dir/lj_ccall.c.o [ 94%] Building C object src/CMakeFiles/core_shared.dir/lj_cconv.c.o [ 95%] Building C object src/CMakeFiles/core_shared.dir/lj_cdata.c.o [ 95%] Building C object src/CMakeFiles/core_shared.dir/lj_cparse.c.o [ 96%] Building C object src/CMakeFiles/core_shared.dir/lj_clib.c.o [ 97%] Building C object src/CMakeFiles/core_shared.dir/lj_crecord.c.o [ 97%] Building C object src/CMakeFiles/core_shared.dir/lj_ctype.c.o [ 97%] Built target core_shared [ 97%] Linking C shared library libluajit.so [ 97%] Built target core_static [ 98%] Linking C static library libluajit.a [ 98%] Built target libluajit_shared [ 98%] Built target libluajit_static [ 98%] Built target libluajit [ 98%] Building C object src/CMakeFiles/luajit_static.dir/luajit.c.o [100%] Linking C executable luajit [100%] Built target luajit_static [100%] Built target luajit-main cmake/SetTargetFlags.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake index 1ca438f1..0303a2c6 100644 --- a/cmake/SetTargetFlags.cmake +++ b/cmake/SetTargetFlags.cmake @@ -23,7 +23,7 @@ else() # Find out whether the target toolchain always generates # unwindtables. execute_process( - COMMAND bash -c "exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | ${CMAKE_C_COMPILER} -c -x c - -o tmpunwind.o && { grep -qa -e eh_frame -e __unwind_info tmpunwind.o || grep -qU -e eh_frame -e __unwind_info tmpunwind.o; } && echo E; rm -f tmpunwind.o" + COMMAND sh -c "exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | ${CMAKE_C_COMPILER} -c -x c - -o tmpunwind.o && { grep -qa -e eh_frame -e __unwind_info tmpunwind.o || grep -qU -e eh_frame -e __unwind_info tmpunwind.o; } && echo E; rm -f tmpunwind.o" WORKING_DIRECTORY ${LUAJIT_SOURCE_DIR} OUTPUT_VARIABLE TESTUNWIND RESULT_VARIABLE TESTUNWIND_RC -- 2.38.1