lifting-bits / remill

Library for lifting machine code to LLVM bitcode
Apache License 2.0
1.22k stars 141 forks source link

ARM64 compilation error in tests #580

Closed ekilmer closed 2 years ago

ekilmer commented 2 years ago

I am getting the following compilation error on an ARM machine with latest master (1aa13386d65e6a95717f047e8b79e9440a5d0abc). The logs start here https://github.com/lifting-bits/cxx-common/runs/5361976201?check_suite_focus=true#step:16:389

And below is a snippet:

FAILED: tests/AArch64/CMakeFiles/run-aarch64-tests.dir/Run.cpp.o 
/usr/local/bin/ccache /usr/bin/clang++-10 -DGFLAGS_DLL_DECLARE_FLAG="" -DGFLAGS_DLL_DEFINE_FLAG="" -DGFLAGS_IS_A_DLL=0 -DGOOGLE_GLOG_DLL_DECL="" -DNDEBUG -DREMILL_BUILD_SEMANTICS_DIR_AARCH32=\"/__w/cxx-common/cxx-common/remill/build/lib/Arch/AArch32/Runtime\" -DREMILL_BUILD_SEMANTICS_DIR_AARCH64=\"/__w/cxx-common/cxx-common/remill/build/lib/Arch/AArch64/Runtime\" -DREMILL_BUILD_SEMANTICS_DIR_SPARC32=\"/__w/cxx-common/cxx-common/remill/build/lib/Arch/SPARC32/Runtime\" -DREMILL_BUILD_SEMANTICS_DIR_SPARC64=\"/__w/cxx-common/cxx-common/remill/build/lib/Arch/SPARC64/Runtime\" -DREMILL_BUILD_SEMANTICS_DIR_X86=\"/__w/cxx-common/cxx-common/remill/build/lib/Arch/X86/Runtime\" -DREMILL_INSTALL_SEMANTICS_DIR=\"/__w/cxx-common/cxx-common/remill/build/install/share/remill/13/semantics\" -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Drun_aarch64_tests_EXPORTS -I/__w/cxx-common/cxx-common/remill -I/__w/cxx-common/cxx-common/remill/include -isystem /__w/cxx-common/cxx-common/vcpkg/installed/arm64-linux-rel/include -O2 -g -DNDEBUG -fPIE -fPIC -pie -DADDRESS_SIZE_BITS=64 -DGTEST_HAS_RTTI=0 -DGTEST_HAS_TR1_TUPLE=0 -Wall -Wextra -Wno-unused-parameter -Wno-c++98-compat -Wno-unreachable-code-return -Wno-nested-anon-types -Wno-extended-offsetof -Wno-variadic-macros -Wno-return-type-c-linkage -Wno-c99-extensions -Wno-ignored-attributes -Wno-unused-local-typedef -Wno-unknown-pragmas -Wno-unknown-warning-option -fPIC -fno-omit-frame-pointer -fvisibility-inlines-hidden -fno-asynchronous-unwind-tables -Wgnu-alignof-expression -Wno-gnu-anonymous-struct -Wno-gnu-designator -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-statement-expression -fno-aligned-allocation -gdwarf-2 -g3 -O2 -std=c++17 -MD -MT tests/AArch64/CMakeFiles/run-aarch64-tests.dir/Run.cpp.o -MF tests/AArch64/CMakeFiles/run-aarch64-tests.dir/Run.cpp.o.d -o tests/AArch64/CMakeFiles/run-aarch64-tests.dir/Run.cpp.o -c /__w/cxx-common/cxx-common/remill/tests/AArch64/Run.cpp
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
Error: /__w/cxx-common/cxx-common/remill/tests/AArch64/Run.cpp:144:1: error: functions that differ only in their return type cannot be overloaded
MAKE_RW_FP_MEMORY(80)
^~~~~~~~~~~~~~~~~~~~~
/__w/cxx-common/cxx-common/remill/tests/AArch64/Run.cpp:127:32: note: expanded from macro 'MAKE_RW_FP_MEMORY'
  NEVER_INLINE float##size##_t __remill_read_memory_f##size(Memory *, \
               ~~~~~~~~~~~~~~~ ^
<scratch space>:311:1: note: expanded from here
__remill_read_memory_f80
^
/__w/cxx-common/cxx-common/remill/include/remill/Arch/Runtime/Intrinsics.h:56:30: note: previous declaration is here
[[gnu::used]] extern Memory *__remill_read_memory_f80(Memory *, addr_t,
                     ~~~~~~~~^
Error: /__w/cxx-common/cxx-common/remill/tests/AArch64/Run.cpp:144:1: error: conflicting types for '__remill_write_memory_f80'
MAKE_RW_FP_MEMORY(80)
^
/__w/cxx-common/cxx-common/remill/tests/AArch64/Run.cpp:131:24: note: expanded from macro 'MAKE_RW_FP_MEMORY'
  NEVER_INLINE Memory *__remill_write_memory_f##size(Memory *, addr_t addr, \
                       ^
<scratch space>:314:1: note: expanded from here
__remill_write_memory_f80
^
/__w/cxx-common/cxx-common/remill/include/remill/Arch/Runtime/Intrinsics.h:68:1: note: previous declaration is here
__remill_write_memory_f80(Memory *, addr_t, const native_float80_t &);
^
ekilmer commented 2 years ago

closed by #582