Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH luajit] cmake: fix build for non-bash shells
@ 2022-12-21 14:33 Maxim Kokryashkin via Tarantool-patches
  2023-01-09 15:28 ` [Tarantool-patches] [PATCH] cmake: introduce CheckUnwindTables helper Igor Munkin via Tarantool-patches
  2023-01-09 15:32 ` [Tarantool-patches] [PATCH luajit] cmake: fix build for non-bash shells Igor Munkin via Tarantool-patches
  0 siblings, 2 replies; 8+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2022-12-21 14:33 UTC (permalink / raw)
  To: tarantool-patches, imun

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-01-12 15:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 14:33 [Tarantool-patches] [PATCH luajit] cmake: fix build for non-bash shells Maxim Kokryashkin via Tarantool-patches
2023-01-09 15:28 ` [Tarantool-patches] [PATCH] cmake: introduce CheckUnwindTables helper Igor Munkin via Tarantool-patches
2023-01-10 10:05   ` Sergey Kaplun via Tarantool-patches
2023-01-10 11:12     ` Igor Munkin via Tarantool-patches
2023-01-10 17:36       ` Maxim Kokryashkin via Tarantool-patches
2023-01-10 19:18         ` Igor Munkin via Tarantool-patches
2023-01-12 14:55   ` Igor Munkin via Tarantool-patches
2023-01-09 15:32 ` [Tarantool-patches] [PATCH luajit] cmake: fix build for non-bash shells Igor Munkin via Tarantool-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox