CMake 3.18.0 build of master is broken (Ubuntu 16.04/18.04)
Created by: SweetVishnya
commit 12496fe8
sudo docker run --rm -it ubuntu:16.04 /bin/bash
apt update && apt upgrade -y && apt install -y git build-essential wget
wget https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0-Linux-x86_64.sh
sh cmake-3.18.0-Linux-x86_64.sh --prefix=/ --exclude-subdir --skip-license
git clone https://github.com/DynamoRIO/dynamorio.git
cd dynamorio
mkdir build
cd build
cmake ..
make
I get the following compilation error.
Scanning dependencies of target dynamorio_static
[ 4%] Building C object core/CMakeFiles/dynamorio_static.dir/options.c.o
[ 4%] Building C object core/CMakeFiles/dynamorio_static.dir/dynamo.c.o
[ 4%] Building C object core/CMakeFiles/dynamorio_static.dir/fragment.c.o
[ 4%] Building C object core/CMakeFiles/dynamorio_static.dir/fcache.c.o
[ 5%] Building C object core/CMakeFiles/dynamorio_static.dir/link.c.o
[ 5%] Building C object core/CMakeFiles/dynamorio_static.dir/dispatch.c.o
[ 5%] Building C object core/CMakeFiles/dynamorio_static.dir/emit.c.o
[ 5%] Building C object core/CMakeFiles/dynamorio_static.dir/utils.c.o
[ 5%] Building C object core/CMakeFiles/dynamorio_static.dir/config.c.o
[ 6%] Building C object core/CMakeFiles/dynamorio_static.dir/stats.c.o
[ 6%] Building C object core/CMakeFiles/dynamorio_static.dir/heap.c.o
[ 6%] Building C object core/CMakeFiles/dynamorio_static.dir/monitor.c.o
[ 6%] Building C object core/CMakeFiles/dynamorio_static.dir/perfctr.c.o
[ 7%] Building C object core/CMakeFiles/dynamorio_static.dir/vmareas.c.o
[ 7%] Building C object core/CMakeFiles/dynamorio_static.dir/rct.c.o
[ 7%] Building C object core/CMakeFiles/dynamorio_static.dir/hotpatch.c.o
[ 7%] Building C object core/CMakeFiles/dynamorio_static.dir/hashtable.c.o
[ 7%] Building C object core/CMakeFiles/dynamorio_static.dir/module_list.c.o
[ 8%] Building C object core/CMakeFiles/dynamorio_static.dir/moduledb.c.o
[ 8%] Building C object core/CMakeFiles/dynamorio_static.dir/perscache.c.o
[ 8%] Building C object core/CMakeFiles/dynamorio_static.dir/nudge.c.o
[ 8%] Building C object core/CMakeFiles/dynamorio_static.dir/synch.c.o
[ 8%] Building C object core/CMakeFiles/dynamorio_static.dir/buildmark.c.o
[ 9%] Building C object core/CMakeFiles/dynamorio_static.dir/loader_shared.c.o
[ 9%] Building C object core/CMakeFiles/dynamorio_static.dir/io.c.o
[ 9%] Building C object core/CMakeFiles/dynamorio_static.dir/native_exec.c.o
[ 9%] Building C object core/CMakeFiles/dynamorio_static.dir/lib/instrument.c.o
[ 10%] Building C object core/CMakeFiles/dynamorio_static.dir/translate.c.o
[ 10%] Building C object core/CMakeFiles/dynamorio_static.dir/annotations.c.o
[ 10%] Building C object core/CMakeFiles/dynamorio_static.dir/jit_opt.c.o
[ 10%] Building C object core/CMakeFiles/dynamorio_static.dir/string.c.o
[ 10%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/arch.c.o
[ 11%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/emit_utils_shared.c.o
[ 11%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/x86/emit_utils.c.o
[ 11%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/opnd_shared.c.o
[ 11%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/opnd.c.o
[ 12%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/instr_shared.c.o
[ 12%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/instr.c.o
[ 12%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/instrlist.c.o
[ 12%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/decode_shared.c.o
[ 12%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/decode.c.o
[ 13%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/encode_shared.c.o
[ 13%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/encode.c.o
[ 13%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/disassemble_shared.c.o
[ 13%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/disassemble.c.o
[ 13%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/ir_utils_shared.c.o
[ 14%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/ir_utils.c.o
[ 14%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/decode_table.c.o
[ 14%] Building C object core/CMakeFiles/dynamorio_static.dir/ir/x86/decode_fast.c.o
[ 14%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/interp.c.o
[ 15%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/proc_shared.c.o
[ 15%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/x86/proc.c.o
[ 15%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/mangle_shared.c.o
[ 15%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/x86/mangle.c.o
[ 15%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/clean_call_opt_shared.c.o
[ 16%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/x86/clean_call_opt.c.o
[ 16%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/steal_reg.c.o
[ 16%] Building C object core/CMakeFiles/dynamorio_static.dir/arch/x86_code.c.o
[ 16%] Building ASM object core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o
cpp: error: STATIC_LIBRARY: No such file or directory
cpp: warning: '-x c' after last input file has no effect
cpp: error: unrecognized command line option '--defsym'
cpp: fatal error: no input files
compilation terminated.
core/CMakeFiles/dynamorio_static.dir/build.make:838: recipe for target 'core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o' failed
make[2]: *** [core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o] Error 1
CMakeFiles/Makefile2:751: recipe for target 'core/CMakeFiles/dynamorio_static.dir/all' failed
make[1]: *** [core/CMakeFiles/dynamorio_static.dir/all] Error 2
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2
VERBOSE=1 make
[ 4%] Building ASM object core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o
cd /dynamorio/build/core && /usr/bin/cpp -O2 -g -DNDEBUG -fPIC -I/dynamorio/core/drlibc -I/dynamorio/core/ir/x86 -I/dynamorio/core/arch/x86 -I/dynamorio/core/unix -I/dynamorio/core/ir -I/dynamorio/core/arch -I/dynamorio/core/lib -I/dynamorio/build -I/dynamorio/build/include/annotations --defsym STATIC_LIBRARY -DCPP2ASM -E /dynamorio/core/arch/x86/x86.asm -o CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o.s
cpp: error: STATIC_LIBRARY: No such file or directory
cpp: warning: '-x c' after last input file has no effect
cpp: error: unrecognized command line option '--defsym'
cpp: fatal error: no input files
compilation terminated.
core/CMakeFiles/dynamorio_static.dir/build.make:838: recipe for target 'core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o' failed
make[2]: *** [core/CMakeFiles/dynamorio_static.dir/arch/x86/x86.asm.o] Error 1
make[2]: Leaving directory '/dynamorio/build'
CMakeFiles/Makefile2:751: recipe for target 'core/CMakeFiles/dynamorio_static.dir/all' failed
make[1]: *** [core/CMakeFiles/dynamorio_static.dir/all] Error 2
make[1]: Leaving directory '/dynamorio/build'
Makefile:170: recipe for target 'all' failed
make: *** [all] Error 2