c-for-go icon indicating copy to clipboard operation
c-for-go copied to clipboard

[OS X / Ubuntu ARM64] include file not found: <string>

Open Sitin opened this issue 1 year ago • 3 comments

I am trying to create bindings JSBSim and have the following error:

var/jsbsim/src/FGJSBBase.h:42:10: include file not found: <queue>
var/jsbsim/src/FGJSBBase.h:43:10: include file not found: <string>
var/jsbsim/src/FGJSBBase.h:44:10: include file not found: <cmath>
var/jsbsim/src/FGJSBBase.h:45:10: include file not found: <stdexcept>
var/jsbsim/src/FGJSBBase.h:46:10: include file not found: <random>
var/jsbsim/src/FGJSBBase.h:47:10: include file not found: <chrono>

Config

---
GENERATOR:
  PackageName: gojsbsim
  PackageDescription: "Package gojsbsim provides Go bindings for JSBSim."
  PackageLicense: "LGPL-2.1 licence follows the original JSBSim license."
  Includes:
    - var/jsbsim/src/JSBSim_API.h
    - var/jsbsim/src/FGJSBBase.h
    - var/jsbsim/src/FGFDMExec.h
  Options:
    SafeStrings: true

PARSER:
  Defines:
    _POSIX_C_SOURCE: 1
  IncludePaths:
    # From `c++ -xc++ /dev/null -E -Wp,-v 2>&1 | sed -n 's,^ ,,p'`
    - /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
    - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/include
    - /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
    - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
    - /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
    # Additional paths (everything what I've tried so far ツ):
    - /opt/homebrew/Cellar/gcc/13.1.0/include
    - /opt/homebrew/Cellar/gcc/13.1.0/include/c++/13
    - /opt/homebrew/Cellar/gcc/13.1.0/lib/gcc/13/gcc/aarch64-apple-darwin22/13/include
    - /Library/Developer/CommandLineTools/usr/include
    - /Library/Developer/CommandLineTools/usr/include/c++/v1
    - /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
    - /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
    - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
    - /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
  SourcesPaths:
    - var/jsbsim/src/JSBSim_API.h
    - var/jsbsim/src/FGJSBBase.h
    - var/jsbsim/src/FGFDMExec.h
  Arch: arm64

TRANSLATOR:
  ConstCharIsString: true
  ConstUCharIsString: false
  ConstRules:
    defines: expand
    enum: eval

Command

Both

c-for-go -ccdefs -debug --out dist jsbsim.yaml

and (which AFAIU shold replace the inputs):

c-for-go -ccdefs -ccincl -debug --out dist jsbsim.yaml

return the same error.

I've also tried both with the following paths on Parallels Ubuntu with the following includes:

  IncludePaths:
    - /usr/include/c++/11
    - /usr/include/aarch64-linux-gnu/c++/11
    - /usr/include/c++/11/backward
    - /usr/lib/gcc/aarch64-linux-gnu/11/include
    - /usr/local/include
    - /usr/include/aarch64-linux-gnu
    - /usr/include

Same error. So, possibly this is not related to OS X.

Sitin avatar Jun 28 '23 22:06 Sitin