Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ header file not found #663

Open
reverseXiang opened this issue Apr 7, 2023 · 10 comments
Open

C++ header file not found #663

reverseXiang opened this issue Apr 7, 2023 · 10 comments

Comments

@reverseXiang
Copy link

reverseXiang commented Apr 7, 2023

I try to build the source code on mac, and output a lot of warning about c++ header not found. How can I fix it, thx !
like this
[ 42%] Building BC object /Users/xxxxxxxx/Desktop/ollvm/remill-build/lib/Arch/AArch64/Runtime/aarch64_Intrinsics.cpp.bc cd /Users/xxxxxxxx/Desktop/ollvm/remill-build/lib/Arch/AArch64/Runtime && /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/tools/llvm/clang-15 -I/Users/xxxxxxxx/Desktop/ollvm/remill/include -I/Users/xxxxxxxx/Desktop/ollvm/remill -target x86_64-apple-macosx11.0.0 -DADDRESS_SIZE_BITS=64 -DLITTLE_ENDIAN=1 -emit-llvm -Wno-unknown-warning-option -Wall -Wshadow -Wconversion -Wpadded -pedantic -Wshorten-64-to-32 -Wgnu-alignof-expression -Wno-gnu-anonymous-struct -Wno-return-type-c-linkage -Wno-gnu-zero-variadic-macro-arguments -Wno-nested-anon-types -Wno-extended-offsetof -Wno-gnu-statement-expression -Wno-c99-extensions -Wno-ignored-attributes -fno-vectorize -fno-slp-vectorize -Wno-variadic-macros -Wno-c11-extensions -Wno-c++11-extensions -ffreestanding -fno-common -fno-builtin -fno-exceptions -fno-rtti -fno-asynchronous-unwind-tables -Wno-unneeded-internal-declaration -Wno-unused-function -Wgnu-inline-cpp-without-extern -Wno-pass-failed=transform-warning -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -std=c++17 -c /Users/xxxxxxxx/Desktop/ollvm/remill/lib/Arch/Runtime/Intrinsics.cpp -o /Users/xxxxxxxx/Desktop/ollvm/remill-build/lib/Arch/AArch64/Runtime/aarch64_Intrinsics.cpp.bc
/Users/xxxxxxxx/Desktop/ollvm/remill/lib/Arch/AArch32/Runtime/BasicBlock.cpp:17:10: fatal error: 'algorithm' file not found #include <algorithm> ^~~~~~~~~~~ 1 error generated. make[2]: *** [lib/Arch/AArch32/Runtime/thumb2_BasicBlock.cpp.bc] Error 1 make[2]: *** Waiting for unfinished jobs....

@reverseXiang
Copy link
Author

reverseXiang commented Apr 7, 2023

I edit CMakeLists.txt and add cmd set(REMILL_INCLUDE_DIR "/Users/xxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include"), and solved this problem.

@reverseXiang
Copy link
Author

reverseXiang commented Apr 7, 2023

But now it says "Could not find sleigh compiler", and CMake error at lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library): Cannot find source file.

I am confused, need help, pls.

@ekilmer
Copy link
Contributor

ekilmer commented Apr 7, 2023

Please provide more information about how you configured remill.

Ideally, I would like to know each command you executed from a fresh clone of the remill repository. There are many different ways to get to the error line you pasted, so I need something to narrow down what might be the issue. Thank you.

@ekilmer
Copy link
Contributor

ekilmer commented Apr 7, 2023

@reverseXiang Also, what version of macOS are you running? It seems you are trying to use the 10.15 macOS SDK. We don't build for that version (as evidenced in the vcpkg directory name macos-11). This could be the cause of your issues, but the CMake issue seems odd and probably fixable if you could post your configure and build commands.

@reverseXiang
Copy link
Author

reverseXiang commented Apr 10, 2023

Thanks! My MacOS version is 11.7.4.

Found MacOS Big Sur
[-] Library version is vcpkg_macos-11_llvm-15_xcode-13.0_amd64

  • cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=True -DCMAKE_TOOLCHAIN_FILE=/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-osx-rel /Users/xxxxxxxx/Desktop/ollvm/remill
    -- ccache: enabled with '/usr/local/bin/ccache'. The cache folder is located here: '/Users/xxxxxxxx/.ccache'
    -- Install prefix: /usr/local
    -- Compiler ID is AppleClang
    -- LLVM Libraries: LLVMSupport;LLVMCore;LLVMIRReader;LLVMBitReader;LLVMBitWriter;LLVMPasses;LLVMAsmPrinter;LLVMAArch64Info;LLVMAArch64Desc;LLVMAArch64CodeGen;LLVMAArch64AsmParser;LLVMARMCodeGen;LLVMARMAsmParser;LLVMInterpreter;LLVMMCJIT;LLVMNVPTXDesc;LLVMX86Info;LLVMX86CodeGen;LLVMX86AsmParser;LLVMSparcCodeGen;LLVMSparcAsmParser;LLVMWebAssemblyDesc
    -- Found LLVM 15.0.7
    -- Using LLVMConfig.cmake in: /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/share/llvm
    Remill llvm version: 15
    -- The following compiler has been selected to compile the bitcode: /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/tools/llvm/clang-15
    -- The following linker has been selected to link the bitcode: /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/tools/llvm/llvm-link
    -- Using Ghidra version 10.1.5 at git ref Ghidra_10.1.5_build
    -- Populating ghidrasource
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/xxxxxxxx/Desktop/ollvm/remill-build/_deps/ghidrasource-subbuild
    [ 11%] Performing update step for 'ghidrasource-populate'
    From https://github.com/NationalSecurityAgency/ghidra
    75a185aa9..ca9a56b5f master -> origin/master
    Warning: you are leaving 12 commits behind, not connected to
    any of your branches:

    69bd233f4 X86PcRel
    3ce36f36b quicciii
    deef9e1a4 ppc_vle
    8f21f679f ppc_isa
    ... and 8 more.

HEAD is now at 9c724c1ad Merge remote-tracking branch 'origin/GP-2355_AARCH64_thunk_pattern' into patch
[ 22%] Performing patch step for 'ghidrasource-populate'
.git/rebase-apply/patch:13: trailing whitespace.

so the trick here is to define an INST_NEXT_PTR that works in either context

.git/rebase-apply/patch:28: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:4=calculated_size;
.git/rebase-apply/patch:38: trailing whitespace.
; remill_insn_size {
.git/rebase-apply/patch:43: trailing whitespace.

warning: 4 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
Hrd0002: pc is pc & hrd0002=7 & h1=1 ; remill_insn_size {
.git/rebase-apply/patch:20: trailing whitespace.

.git/rebase-apply/patch:25: trailing whitespace.
Hrn0002: pc is pc & hrn0002=7 & h1=1 ; remill_insn_size {
.git/rebase-apply/patch:31: trailing whitespace.

.git/rebase-apply/patch:36: trailing whitespace.
Hrm0305: pc is pc & hrm0305=7 & h2=1 ; remill_insn_size {
warning: squelched 75 whitespace errors
warning: 80 lines add whitespace errors.
.git/rebase-apply/patch:25: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:$(REGISTER_SIZE)=calculated_size;
.git/rebase-apply/patch:35: trailing whitespace.
addressLI: reloc is LI & AA=0 ; remill_insn_size [ reloc = inst_start + LI*4;] {
.git/rebase-apply/patch:40: trailing whitespace.

.git/rebase-apply/patch:43: trailing whitespace.
addressBD: reloc is BD & AA=0 ; remill_insn_size [ reloc = inst_start + BD*4; ] {
.git/rebase-apply/patch:48: trailing whitespace.

warning: 5 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
{
.git/rebase-apply/patch:23: trailing whitespace.

.git/rebase-apply/patch:33: trailing whitespace.
{
.git/rebase-apply/patch:37: trailing whitespace.

.git/rebase-apply/patch:42: trailing whitespace.

warning: squelched 17 whitespace errors
warning: 22 lines add whitespace errors.
.git/rebase-apply/patch:15: trailing whitespace.
{
.git/rebase-apply/patch:19: trailing whitespace.

.git/rebase-apply/patch:24: trailing whitespace.

.git/rebase-apply/patch:28: trailing whitespace.
{
.git/rebase-apply/patch:32: trailing whitespace.

warning: squelched 9 whitespace errors
warning: 14 lines add whitespace errors.
.git/rebase-apply/patch:16: trailing whitespace.
addrBD8: reloc is BD8_VLE ; remill_insn_size [ reloc = inst_start + (BD8_VLE << 1);] {
.git/rebase-apply/patch:21: trailing whitespace.

.git/rebase-apply/patch:22: trailing whitespace.
addrBD15: reloc is BD15_VLE ; remill_insn_size [ reloc = inst_start + (BD15_VLE << 1);] {
.git/rebase-apply/patch:27: trailing whitespace.

.git/rebase-apply/patch:28: trailing whitespace.
addrBD24: reloc is BD24_VLE ; remill_insn_size [ reloc = inst_start + (BD24_VLE << 1);] {
warning: squelched 11 whitespace errors
warning: 16 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
{
.git/rebase-apply/patch:29: trailing whitespace.

warning: 2 lines add whitespace errors.
.git/rebase-apply/patch:27: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:$(SIZE)=calculated_size;
.git/rebase-apply/patch:38: trailing whitespace.
addr32: [riprel] is bit64=1 & mod=0 & r_m=4; index=4 & base=5; simm32 [ riprel=inst_next+simm32; ] {
.git/rebase-apply/patch:43: trailing whitespace.

.git/rebase-apply/patch:46: trailing whitespace.
Addr32_64: [eiprel] is mod=0 & r_m=5; simm32 [ eiprel=inst_next+simm32; ] {
.git/rebase-apply/patch:51: trailing whitespace.

warning: squelched 151 whitespace errors
warning: 156 lines add whitespace errors.
Applying: Small improvements to C++ decompiler testing from CLI
Applying: Add include guards to decompiler C++ headers
Applying: Fix UBSAN errors in decompiler
Applying: Use stroull instead of stroul to parse address offsets
Applying: ARM
Applying: ARMTHUMBinstructions
Applying: ppc_common
Applying: ppc_instructions
Applying: ppc_isa
Applying: ppc_vle
Applying: quicciii
Applying: X86PcRel
[ 33%] No configure step for 'ghidrasource-populate'
[ 44%] No build step for 'ghidrasource-populate'
[ 55%] No install step for 'ghidrasource-populate'
[ 66%] No test step for 'ghidrasource-populate'
[ 77%] Completed 'ghidrasource-populate'
[100%] Built target ghidrasource-populate
-- Ghidra source located at '/Users/xxxxxxxx/Desktop/ollvm/remill-build/_deps/ghidrasource-src'
CMake Warning at /Users/xxxxxxxx/Desktop/ollvm/remill-build/_deps/sleigh-src/sleighspecs/CMakeLists.txt:60 (message):
Could not find sleigh compiler, building from source

Generating runtime target: aarch32
Generating runtime target: thumb2
Generating runtime target: aarch64
Generating runtime target: sparc32
Generating runtime target: sparc64
Generating runtime target: x86
Generating runtime target: x86_avx
Generating runtime target: x86_avx512
Generating runtime target: x86_sleigh
Generating runtime target: amd64
Generating runtime target: amd64_sleigh
Generating runtime target: amd64_avx
Generating runtime target: amd64_avx512
-- thumb tests enabled
-- ppc tests enabled
-- X86 tests enabled
-- Adding test: amd64 as run-amd64-tests
-- Adding test: amd64_avx as run-amd64_avx-tests
-- Configuring done
CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Arch.h

Call Stack (most recent call first):
lib/Arch/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Runtime/Definitions.h

Call Stack (most recent call first):
lib/Arch/AArch64/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Runtime/Definitions.h

Call Stack (most recent call first):
lib/Arch/SPARC32/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Runtime/Definitions.h

Call Stack (most recent call first):
lib/Arch/SPARC64/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Runtime/Definitions.h

Call Stack (most recent call first):
lib/Arch/Sleigh/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/Arch/Runtime/Definitions.h

Call Stack (most recent call first):
lib/Arch/X86/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/BC/ABI.h

Call Stack (most recent call first):
lib/BC/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
Cannot find source file:

/Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include/remill/OS/FileSystem.h

Call Stack (most recent call first):
lib/OS/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch
Call Stack (most recent call first):
lib/Arch/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch_aarch64
Call Stack (most recent call first):
lib/Arch/AArch64/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch_sparc32
Call Stack (most recent call first):
lib/Arch/SPARC32/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch_sparc64
Call Stack (most recent call first):
lib/Arch/SPARC64/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch_sleigh
Call Stack (most recent call first):
lib/Arch/Sleigh/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_arch_x86
Call Stack (most recent call first):
lib/Arch/X86/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_bc
Call Stack (most recent call first):
lib/BC/CMakeLists.txt:15 (add_library)

CMake Error at /Users/xxxxxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake:623 (_add_library):
No SOURCES given to target: remill_os
Call Stack (most recent call first):
lib/OS/CMakeLists.txt:15 (add_library)

CMake Generate step failed. Build files cannot be regenerated correctly.
[x] Build aborted.

@reverseXiang
Copy link
Author

reverseXiang commented Apr 10, 2023

Hello. I re-cloned the project then simply ran the command ". /remill/scripts/build.sh". I now keep getting stuck on this command and it reports errors frequently.
I have to add the directory reference "set(REMILL_INCLUDE_DIR "/Users/xxxxx/Desktop/ollvm/lifting-bits-downloads/vcpkg_macos-11_ llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/include")".
Otherwise it keeps reporting an error about the header file not being found. After fixing this problem, the output of the new error is now pasted above, and it seems to be about "add_library".
By the way, my system is macOS 11. I would appreciate any help and tips you can give me.

@ekilmer
Copy link
Contributor

ekilmer commented Apr 10, 2023

Hmmm. This is weird. I can't recreate your issues. I can build latest remill fine on latest macOS 13.3.1 with CMake 3.26.3 using the ./remill/scripts/build.sh script:

$ git clone https://github.com/lifting-bits/remill
Cloning into 'remill'...
remote: Enumerating objects: 13419, done.
remote: Counting objects: 100% (126/126), done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 13419 (delta 47), reused 83 (delta 23), pack-reused 13293
Receiving objects: 100% (13419/13419), 9.95 MiB | 25.47 MiB/s, done.
Resolving deltas: 100% (8826/8826), done.

$ ./remill/scripts/build.sh
WARNING: ****Likely unsupported MacOS Version****
WARNING: ****Using macos-11****
[-] Library version is vcpkg_macos-11_llvm-15_xcode-13.0_amd64
/tmp/workd/lifting-bits-downloads /tmp/workd/remill-build
Fetching: https://github.com/lifting-bits/cxx-common/releases/download/v0.2.22/vcpkg_macos-11_llvm-15_xcode-13.0_amd64.tar.xz and placing in /tmp/workd/lifting-bits-downloads
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  972M  100  972M    0     0  35.9M      0  0:00:27  0:00:27 --:--:-- 36.3M
+ tar -xJf vcpkg_macos-11_llvm-15_xcode-13.0_amd64.tar.xz
/tmp/workd/remill-build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=True -DCMAKE_TOOLCHAIN_FILE=/tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-osx-rel /tmp/workd/remill
-- ccache: enabled with '/usr/local/bin/ccache'. The cache folder is located here: '/Users/ekilmer/.ccache'
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Install prefix: /usr/local
-- Compiler ID is AppleClang
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found ZLIB: /tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/lib/libz.a (found version "1.2.13")
-- Found zstd: /tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/lib/libzstd.a
-- Found Z3: z3::libz3 (found suitable version "4.12.0", minimum required is "4.7.1")
-- LLVM Libraries: LLVMSupport;LLVMCore;LLVMIRReader;LLVMBitReader;LLVMBitWriter;LLVMPasses;LLVMAsmPrinter;LLVMAArch64Info;LLVMAArch64Desc;LLVMAArch64CodeGen;LLVMAArch64AsmParser;LLVMARMCodeGen;LLVMARMAsmParser;LLVMInterpreter;LLVMMCJIT;LLVMNVPTXDesc;LLVMX86Info;LLVMX86CodeGen;LLVMX86AsmParser;LLVMSparcCodeGen;LLVMSparcAsmParser;LLVMWebAssemblyDesc
-- Found LLVM 15.0.7
-- Using LLVMConfig.cmake in: /tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/share/llvm
Remill llvm version: 15
-- The following compiler has been selected to compile the bitcode: /tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/tools/llvm/clang-15
-- The following linker has been selected to link the bitcode: /tmp/workd/lifting-bits-downloads/vcpkg_macos-11_llvm-15_xcode-13.0_amd64/installed/x64-osx-rel/tools/llvm/llvm-link
-- Found Git: /usr/local/bin/git (found version "2.40.0")
-- Using Ghidra version 10.1.5 at git ref Ghidra_10.1.5_build
-- Populating ghidrasource
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/workd/remill-build/_deps/ghidrasource-subbuild
[ 11%] Creating directories for 'ghidrasource-populate'
[ 22%] Performing download step (git clone) for 'ghidrasource-populate'
Cloning into 'ghidrasource-src'...
remote: Enumerating objects: 53258, done.
remote: Counting objects: 100% (53258/53258), done.
remote: Compressing objects: 100% (27334/27334), done.
remote: Total 53258 (delta 28247), reused 43411 (delta 21613), pack-reused 0
Receiving objects: 100% (53258/53258), 161.87 MiB | 34.68 MiB/s, done.
Resolving deltas: 100% (28247/28247), done.
HEAD is now at 9c724c1a Merge remote-tracking branch 'origin/GP-2355_AARCH64_thunk_pattern' into patch
[ 33%] Performing update step for 'ghidrasource-populate'
[ 44%] Performing patch step for 'ghidrasource-populate'
.git/rebase-apply/patch:13: trailing whitespace.
# so the trick here is to define an INST_NEXT_PTR that works in either context
.git/rebase-apply/patch:28: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:4=calculated_size;
.git/rebase-apply/patch:38: trailing whitespace.
    ; remill_insn_size  {
.git/rebase-apply/patch:43: trailing whitespace.

warning: 4 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
Hrd0002: pc             is pc & hrd0002=7 & h1=1  ; remill_insn_size  {
.git/rebase-apply/patch:20: trailing whitespace.

.git/rebase-apply/patch:25: trailing whitespace.
Hrn0002: pc             is pc & hrn0002=7 & h1=1  ; remill_insn_size  {
.git/rebase-apply/patch:31: trailing whitespace.

.git/rebase-apply/patch:36: trailing whitespace.
Hrm0305: pc             is pc & hrm0305=7 & h2=1  ; remill_insn_size  {
warning: squelched 75 whitespace errors
warning: 80 lines add whitespace errors.
.git/rebase-apply/patch:25: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:$(REGISTER_SIZE)=calculated_size;
.git/rebase-apply/patch:35: trailing whitespace.
addressLI: reloc                is LI & AA=0     ; remill_insn_size [ reloc = inst_start + LI*4;] {
.git/rebase-apply/patch:40: trailing whitespace.

.git/rebase-apply/patch:43: trailing whitespace.
addressBD: reloc                is BD & AA=0             ; remill_insn_size [ reloc = inst_start + BD*4; ] {
.git/rebase-apply/patch:48: trailing whitespace.

warning: 5 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
   {
.git/rebase-apply/patch:23: trailing whitespace.

.git/rebase-apply/patch:33: trailing whitespace.
   {
.git/rebase-apply/patch:37: trailing whitespace.

.git/rebase-apply/patch:42: trailing whitespace.

warning: squelched 17 whitespace errors
warning: 22 lines add whitespace errors.
.git/rebase-apply/patch:15: trailing whitespace.
   {
.git/rebase-apply/patch:19: trailing whitespace.

.git/rebase-apply/patch:24: trailing whitespace.

.git/rebase-apply/patch:28: trailing whitespace.
   {
.git/rebase-apply/patch:32: trailing whitespace.

warning: squelched 9 whitespace errors
warning: 14 lines add whitespace errors.
.git/rebase-apply/patch:16: trailing whitespace.
addrBD8: reloc  is BD8_VLE               ; remill_insn_size [ reloc = inst_start + (BD8_VLE << 1);] {
.git/rebase-apply/patch:21: trailing whitespace.

.git/rebase-apply/patch:22: trailing whitespace.
addrBD15: reloc is BD15_VLE      ; remill_insn_size [ reloc = inst_start + (BD15_VLE << 1);] {
.git/rebase-apply/patch:27: trailing whitespace.

.git/rebase-apply/patch:28: trailing whitespace.
addrBD24: reloc is BD24_VLE      ; remill_insn_size [ reloc = inst_start + (BD24_VLE << 1);] {
warning: squelched 11 whitespace errors
warning: 16 lines add whitespace errors.
.git/rebase-apply/patch:14: trailing whitespace.
   {
.git/rebase-apply/patch:29: trailing whitespace.

warning: 2 lines add whitespace errors.
.git/rebase-apply/patch:27: trailing whitespace.
remill_insn_size: calculated_size is epsilon [calculated_size= inst_next-inst_start; ] { local insn_size_hinted:$(SIZE)=calculated_size;
.git/rebase-apply/patch:38: trailing whitespace.
addr32: [riprel]                                                is bit64=1 & mod=0 & r_m=4; index=4 & base=5; simm32   [ riprel=inst_next+simm32; ] {
.git/rebase-apply/patch:43: trailing whitespace.

.git/rebase-apply/patch:46: trailing whitespace.
Addr32_64: [eiprel]                                             is mod=0 & r_m=5; simm32          [ eiprel=inst_next+simm32; ] {
.git/rebase-apply/patch:51: trailing whitespace.

warning: squelched 151 whitespace errors
warning: 156 lines add whitespace errors.
Applying: Small improvements to C++ decompiler testing from CLI
Applying: Add include guards to decompiler C++ headers
Applying: Fix UBSAN errors in decompiler
Applying: Use `stroull` instead of `stroul` to parse address offsets
Applying: ARM
Applying: ARMTHUMBinstructions
Applying: ppc_common
Applying: ppc_instructions
Applying: ppc_isa
Applying: ppc_vle
Applying: quicciii
Applying: X86PcRel
[ 55%] No configure step for 'ghidrasource-populate'
[ 66%] No build step for 'ghidrasource-populate'
[ 77%] No install step for 'ghidrasource-populate'
[ 88%] No test step for 'ghidrasource-populate'
[100%] Completed 'ghidrasource-populate'
[100%] Built target ghidrasource-populate
-- Ghidra source located at '/tmp/workd/remill-build/_deps/ghidrasource-src'
CMake Warning at /tmp/workd/remill-build/_deps/sleigh-src/sleighspecs/CMakeLists.txt:60 (message):
  Could not find sleigh compiler, building from source


 > Generating runtime target: aarch32
 > Generating runtime target: thumb2
 > Generating runtime target: aarch64
 > Generating runtime target: sparc32
 > Generating runtime target: sparc64
 > Generating runtime target: x86
 > Generating runtime target: x86_avx
 > Generating runtime target: x86_avx512
 > Generating runtime target: x86_sleigh
 > Generating runtime target: amd64
 > Generating runtime target: amd64_sleigh
 > Generating runtime target: amd64_avx
 > Generating runtime target: amd64_avx512
-- Found Python: /usr/local/bin/python3.11 (found version "3.11.3") found components: Interpreter
-- thumb tests enabled
-- ppc tests enabled
-- X86 tests enabled
-- Adding test: amd64 as run-amd64-tests
-- Adding test: amd64_avx as run-amd64_avx-tests
-- Configuring done (25.1s)
-- Generating done (0.9s)
-- Build files have been written to: /tmp/workd/remill-build
+ cmake --build . -- -j16
[...]

It's difficult to debug this if I can't reproduce it 😞

@hxm-cpp
Copy link

hxm-cpp commented Apr 10, 2023

he is on windows. either move to linux or get a mac.

@ekilmer
Copy link
Contributor

ekilmer commented Apr 12, 2023

@reverseXiang Have you removed any pre-existing build directories before trying to build again? You may have an old build directory causing issues with an updated toolchain. Please try starting with a completely fresh and updated repository and remove any previous or existing remill build directories and try building again.

@thug-shaker

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants