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

file not found: stdbool.h #114

Open
blacktop opened this issue Jul 16, 2021 · 3 comments
Open

file not found: stdbool.h #114

blacktop opened this issue Jul 16, 2021 · 3 comments

Comments

@blacktop
Copy link

REPO - https://github.com/blacktop/arm64-cgo

disassembler.yml

---
GENERATOR:
  PackageName: arm64
  PackageDescription: "Package arm64 provides Go bindings for then Binary Ninja Arm64 Disassembler"
  PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
  Includes: ["decode.h", "format.h"]

PARSER:
  Defines:
    _POSIX_C_SOURCE: 1
  IncludePaths: [
    "/usr/include",
    "/usr/local/include",
    "/usr/local/Cellar/gcc/11.1.0_1/include",
    "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
  ]
  SourcesPaths: ["disassembler/decode.h", "disassembler/format.h"]
❯ xcode-select --install                          
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

❯ xcode-select -p                                      
/Applications/XCode.app/Contents/Developer

Just going into the dir and running make -f Makefile-local works

ERROR

Running c-for-go -ccdefs disassembler.yml

❯ make
c-for-go -ccdefs disassembler.yml
  processing disassembler.yml ⠹[ERR] disassembler/decode.h:3:10: include file not found: stdbool.h. Search paths:
        /usr/include
        /usr/local/include
        /usr/local/Cellar/gcc/11.1.0_1/include
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
        /Users/blacktop/Projects/GitHub/blacktop/arm64-cgo
        /usr/include
        /usr/local/include
        /usr/local/Cellar/gcc/11.1.0_1/include
        /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
        /Users/blacktop/Projects/GitHub/blacktop/arm64-cgo (and 3 more errors)
make: *** [all] Error 1
@blacktop
Copy link
Author

Code seems VERY self-contained. I'm sure I'm doing something dumb

@blacktop
Copy link
Author

Updated disassembler.yml

---
GENERATOR:
  PackageName: arm64
  PackageDescription: "Package arm64 provides Go bindings for then Binary Ninja Arm64 Disassembler"
  PackageLicense: "THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS."
  Includes: ["decode.h", "format.h"]

PARSER:
  IncludePaths: [
    "/usr/include",
    "/usr/local/include",
    "/usr/local/Cellar/gcc/11.1.0_1/include",
    "/usr/local/Cellar/gcc/11.1.0_1/lib/gcc/11/gcc/x86_64-apple-darwin20/11.1.0/include",
    "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include",
  ]
  SourcesPaths: ["disassembler/decode.h", "disassembler/format.h"]

NEW ERRORS

❯ make      
c-for-go -ccdefs disassembler.yml
  processing disassembler.yml ⠹disassembler/operations.h:4:6: enum tag redefined, previous definition: disassembler/operations.h:4:1
disassembler/encodings_dec.h:8:6: enum tag redefined, previous definition: disassembler/encodings_dec.h:8:1
disassembler/regs.h:13:6: enum tag redefined, previous definition: disassembler/regs.h:13:1
disassembler/sysregs.h:3:6: enum tag redefined, previous definition: disassembler/sysregs.h:3:1
disassembler/decode.h:23:6: enum tag redefined, previous definition: disassembler/decode.h:23:1
disassembler/decode.h:396:6: enum tag redefined, previous definition: disassembler/decode.h:396:1
disassembler/decode.h:416:6: enum tag redefined, previous definition: disassembler/decode.h:416:1
disassembler/decode.h:424:6: enum tag redefined, previous definition: disassembler/decode.h:424:1
disassembler/decode.h:431:6: enum tag redefined, previous definition: disassembler/decode.h:431:1
disassembler/encodings_dec.h:8:6: enum tag redefined, previous definition: disassembler/encodings_dec.h:8:1
too many errors
make: *** [all] Error 1

@CannibalVox
Copy link

Unfortunately, c-for-go is on a version of cc that seems to be approaching 3 years old. I suspect it would be not trivial to advance to the v3 branch, but there are a lot of improvements to CC that really need to be added.

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

2 participants