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

Building CppSharp on Ubuntu 22.04 fails #1703

Closed
axelschroth opened this issue Dec 14, 2022 · 3 comments · Fixed by #1737
Closed

Building CppSharp on Ubuntu 22.04 fails #1703

axelschroth opened this issue Dec 14, 2022 · 3 comments · Fixed by #1737

Comments

@axelschroth
Copy link

Brief Description

Tried to build as explained in GettingStarted section.
Errors occur when compiling with command
./build.sh -configuration Release -platform x64


OS: Linux (Kubuntu 22.04)
Dotnet info:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.425
 Commit:    ca553b8af8

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /lhome/ax/.dotnet/sdk/3.1.425/

Host (useful for support):
  Version: 3.1.31
  Commit:  0e404aa9b8

.NET Core SDKs installed:
  3.1.425 [/lhome/ax/.dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.31 [/lhome/ax/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.31 [/lhome/ax/.dotnet/shared/Microsoft.NETCore.App]

Error message:
error : '__malloc__' attribute takes no arguments

Expand console output
~/src/CppSharp/build$ ./build.sh -configuration Release -platform x64
Archive llvm-791523-linux-x64-gcc-11-Release.tar.xz already exists.
Using debug LLVM build: /lhome/ax/src/CppSharp/build/llvm/llvm-791523-linux-x64-gcc-11-Debug
Using release LLVM build: /lhome/ax/src/CppSharp/build/llvm/llvm-791523-linux-x64-gcc-11-Release
Building configurations...
Running action 'gmake2'...
Done (83ms).
Generating CppSharp build configuration file 'BuildConfig.cs'
Building configurations...
Running action 'vs2019'...
Done (49ms).
  Determining projects to restore...
  All projects are up-to-date for restore.
make: Entering directory '/lhome/ax/src/CppSharp/build/gmake'
==== Building CppSharp.CppParser (release_x64) ====
==== Building Std-symbols (release_x64) ====
==== Building NamespacesBase.Native (release_x64) ====
==== Building NamespacesDerived.Native (release_x64) ====
==== Building Common.Native (release_x64) ====
==== Building CSharp.Native (release_x64) ====
==== Building Encodings.Native (release_x64) ====
==== Building VTables.Native (release_x64) ====
==== Building CLI.Native (release_x64) ====
==== Building StandardLib.Native (release_x64) ====
make: Leaving directory '/lhome/ax/src/CppSharp/build/gmake'
  CppSharp -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.dll
  CppSharp.Runtime -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Runtime.dll
  CppSharp.AST -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.AST.dll
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(39838,141): warning CS0109: The member 'Parser.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(106,156): warning CS0109: The member 'NativeLibrary.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/Std.cs(241,137): warning CS0109: The member 'CharTraits<_CharT>.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/Std.cs(37,133): warning CS0109: The member 'Allocator<_Tp>.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(3055,146): warning CS0109: The member 'SourceRange.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/Std.cs(375,155): warning CS0109: The member 'BasicString<_CharT, _Traits, _Alloc>.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(40784,151): warning CS0109: The member 'ParserDiagnostic.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(41209,146): warning CS0109: The member 'ClangParser.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(40996,147): warning CS0109: The member 'ParserResult.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(40587,151): warning CS0109: The member 'CppLinkerOptions.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(3277,147): warning CS0109: The member 'Type.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(40048,151): warning CS0109: The member 'CppParserOptions.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(11259,153): warning CS0109: The member 'LayoutBase.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(10140,161): warning CS0109: The member 'BaseClassSpecifier.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(39166,151): warning CS0109: The member 'ParserTargetInfo.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(298,150): warning CS0109: The member 'Comment.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(4682,159): warning CS0109: The member 'TemplateArgument.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(6402,154): warning CS0109: The member 'Declaration.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(11450,154): warning CS0109: The member 'ClassLayout.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(19905,167): warning CS0109: The member 'CapturedStmt.Capture.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(3420,157): warning CS0109: The member 'TypeQualifiers.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(20917,173): warning CS0109: The member 'CoroutineBodyStmt.CtorArgs.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(3569,156): warning CS0109: The member 'QualifiedType.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(21739,166): warning CS0109: The member 'Expr.Classification.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(1911,176): warning CS0109: The member 'InlineCommandComment.Argument.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(7893,160): warning CS0109: The member 'StatementObsolete.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(28368,176): warning CS0109: The member 'DesignatedInitExpr.Designator.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(15543,153): warning CS0109: The member 'ASTContext.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(28622,181): warning CS0109: The member 'DesignatedInitExpr.FieldDesignator.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(28730,188): warning CS0109: The member 'DesignatedInitExpr.ArrayOrRangeDesignator.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(950,175): warning CS0109: The member 'BlockCommandComment.Argument.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(10596,158): warning CS0109: The member 'VTableComponent.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(15844,147): warning CS0109: The member 'Stmt.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(18938,172): warning CS0109: The member 'GCCAsmStmt.AsmStringPiece.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(2303,176): warning CS0109: The member 'HTMLStartTagComment.Attribute.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(10761,155): warning CS0109: The member 'VTableLayout.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(14879,161): warning CS0109: The member 'PreprocessedEntity.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(35854,170): warning CS0109: The member 'OverloadExpr.FindResult.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(10910,154): warning CS0109: The member 'VFTableInfo.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(38091,182): warning CS0109: The member 'MaterializeTemporaryExpr.ExtraState.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(2797,153): warning CS0109: The member 'RawComment.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(13932,173): warning CS0109: The member 'FunctionTemplateSpecialization.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs(11085,154): warning CS0109: The member 'LayoutField.NativeToManagedMap' does not hide an accessible member. The new keyword is not required. [/lhome/ax/src/CppSharp/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj]
  CppSharp.Parser.CSharp -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Parser.CSharp.dll
  CppSharp.Parser -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Parser.dll
  CppSharp.Generator -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Generator.dll
  CLI.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/CLI.Gen.dll
  StandardLib.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/StandardLib.Gen.dll
  Common.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/Common.Gen.dll
  VTables.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/VTables.Gen.dll
  Encodings.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/Encodings.Gen.dll
  NamespacesDerived.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/NamespacesDerived.Gen.dll
  CppSharp.Parser.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Parser.Gen.dll
  CSharp.Gen -> /lhome/ax/src/CppSharp/bin/Release_x64/CSharp.Gen.dll
  CppSharp.Parser.Bootstrap -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Parser.Bootstrap.dll
  CppSharp.CLI -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.CLI.dll
  CppSharp.Generator.Tests -> /lhome/ax/src/CppSharp/bin/Release_x64/CppSharp.Generator.Tests.dll



  Generating bindings for Encodings (CSharp)
  Generating bindings for VTables (CLI)
  Generating bindings for StandardLib (CLI)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/Encodings
  Looking for tests in: /lhome/ax/src/CppSharp/tests/StandardLib
  Looking for tests in: /lhome/ax/src/CppSharp/tests/VTables

  Generating bindings for Common (CLI)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/Common


  Generating bindings for CSharp (CSharp)
  Generating bindings for NamespacesDerived (CSharp)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/CSharp
  Looking for tests in: /lhome/ax/src/CppSharp/tests/NamespacesDerived

  Generating bindings for CLI (CLI)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/CLI
  Parsed 'StandardLib.Native'
  Parsed 'Encodings.Native'
  Parsed 'VTables.Native'
  Parsed 'Common.Native'
  Parsed 'NamespacesDerived.Native'
  Parsed 'NamespacesBase.Native'
  Parsed 'CSharp.Native'
  Parsed 'CLI.Native'
  Error parsing 'Encodings.h'
  Error parsing 'VTables.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
  CppSharp has encountered an error while parsing code.
  CppSharp has encountered an error while parsing code.

  Generating bindings for VTables (CSharp)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/VTables
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/Encodings.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/Encodings/Encodings.Gen.csproj]
  Parsed 'VTables.Native'
  Error parsing 'StandardLib.h'
  Error parsing 'NamespacesBase.h, Independent.h, NamespacesDerived.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
  Error parsing 'Common.h, AnotherUnit.h, interface.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
  CppSharp has encountered an error while parsing code.
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/StandardLib.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/StandardLib/StandardLib.Gen.csproj]
  CppSharp has encountered an error while parsing code.
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/NamespacesDerived.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/NamespacesDerived/NamespacesDerived.Gen.csproj]
  Error parsing 'VTables.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
  CppSharp has encountered an error while parsing code.
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/VTables.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/VTables/VTables.Gen.csproj]
  CppSharp has encountered an error while parsing code.

  Generating bindings for Common (CSharp)
  Looking for tests in: /lhome/ax/src/CppSharp/tests/Common
  Parsed 'CLI.h, ClassWithNestedEnum.h, NestedEnumConsumer.h, EmployeeOrg.h, EmployeeForwardDecl.h, Employee.h, IgnoredClassTemplateForEmployee.h'
  Parsed 'Common.Native'
      Found ambiguous overload: TestMappedTypeNonConstRefParam::TestMappedTypeNonConstRefParam
  Error parsing 'Common.h, AnotherUnit.h, interface.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
  CppSharp has encountered an error while parsing code.
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/Common.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/Common/Common.Gen.csproj]
  Generated 'CLI.h'
  Generated 'CLI.cpp'
  Generated 'Employee.h'
  Generated 'Employee.cpp'
  Generated 'EmployeeOrg.h'
  Generated 'EmployeeOrg.cpp'
  Generated 'ClassWithNestedEnum.h'
  Generated 'ClassWithNestedEnum.cpp'
  Generated 'NestedEnumConsumer.h'
  Generated 'NestedEnumConsumer.cpp'
  Generated 'EmployeeForwardDecl.h'
  Generated 'EmployeeForwardDecl.cpp'
  Generated 'IgnoredClassTemplateForEmployee.h'
  Generated 'IgnoredClassTemplateForEmployee.cpp'
  Error parsing 'CSharpTemplates.h, CSharp.h, AnotherUnit.h, AnonTypes.h'
/usr/include/wchar.h(155,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdlib.h(566,5): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdlib.h(570,14): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdlib.h(799,6): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(189,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(201,25): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(223,39): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(260,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(285,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(294,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(303,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(309,32): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(315,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(322,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
/usr/include/stdio.h(830,24): error : '__malloc__' attribute takes no arguments [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]
  CppSharp has encountered an error while parsing code.
/lhome/ax/.dotnet/sdk/3.1.425/Microsoft.Common.CurrentVersion.targets(5266,5): error MSB3073: The command "dotnet "/lhome/ax/src/CppSharp/bin/Release_x64/CSharp.Gen.dll"" exited with code -1. [/lhome/ax/src/CppSharp/tests/CSharp/CSharp.Gen.csproj]

Does anyone have an idea how to solve this issue?

@tritao
Copy link
Collaborator

tritao commented Dec 14, 2022

I think we've had an issue before about this before, I think its likely to be this: https://bugs.llvm.org/show_bug.cgi?id=52265

Until Clang implement this upstream to be compatible with latest GCC, we cannot really do much but wait.

@axelschroth
Copy link
Author

Ok, so I have to downgrade back to Ubuntu 20.04 again 😅
Thanks for your quick response.
Btw, here you can find the corresponding github issue of the (read-only) bugzilla ticket: llvm/llvm-project#51607

@tritao
Copy link
Collaborator

tritao commented May 30, 2023

Figured out a way to workaround this, hopefully it works for you.

JordanL8 pushed a commit to MoonCollider/CppSharp that referenced this issue Aug 29, 2023
JordanL8 added a commit to MoonCollider/CppSharp that referenced this issue Sep 7, 2023
* Incorrect build instructions on Windows (mono#1701)

* Fix incorrect build instructions for Windows

* Add link to Visual Studio installer

* Refine building instructions for VS2019+

(cherry picked from commit c4a24b0)

* Misc changes (mono#1710)

* Minor code refactoring for re-use.

* Add Class.FindVariable helper method.

* Upgrade to .NET 6.

(cherry picked from commit db7949b)

* Add C++ WebAssembly ABI (mono#1711)

* Minor code refactorings.

* Fix debug assert issue with vtable methods.

* Add support for WebAssembly C++ ABI to parser and AST converter.

(cherry picked from commit 9b06e7b)

* Add initial Emscripten generator. (mono#1712)

(cherry picked from commit 117567d)

* Code cleanups and improvements (mono#1713)

* Code cleanups.

* Run GetterSetterToPropertyPass for more generators.

* Fixed compile warning when compiling parser bindings.

* Cleanup driver code.

* Remove dead 32-bit code.

* Reduce verbosity when Options.Quiet is set.

* Remove test compile-time warnings.

* Move .NET tests to tests/dotnet.

* Remove unused AST viewer code and premake-qt submodule.

* Move tests2/ contents to tests/.

(cherry picked from commit 4417dd9)

* Publish package to nuget.org when a version tag is created

(cherry picked from commit 5715df5)

* Allow passing a `-target-framework` option to `build.sh` (mono#1718)

Closes mono#1717.

(cherry picked from commit 8cf6e3f)

* Remove unused LLVM build flags.

(cherry picked from commit 84b7276)

* Update LLVM workflow to latest Action images.

(cherry picked from commit 3d32fc7)

* Update LLVM Windows workflow to latest Action images.

(cherry picked from commit f9f9e9c)

* Update action steps to latest to fix Node.js deprecation warnings.

(cherry picked from commit 7d6decd)

* Update LLVM build script for Visual Studio 2022.

(cherry picked from commit b8a16a4)

* Workaround Directory.Build.props getting picked up when building LLVM.

This is to workaround MSBuild CMake step from LLVM build in Windows
picking this up.

(cherry picked from commit 25e2c7c)

* Added variation of mono#1736

* Workaround parsing GNU system headers with GCC 11.0 version. (mono#1737)

Closes mono#1703.

Upstream bugs:

  llvm/llvm-project#51607
  llvm/llvm-project#53152

(cherry picked from commit 0272532)

* CppSharp.AST.Declaration - fix return QualifiedOriginalName, QualifiedLogicalOriginalName (mono#1740)

Fixed properties getters of QualifiedOriginalName, QualifiedLogicalOriginalName and methods GetQualifiedName(),  GatherNamespaces.

(cherry picked from commit 9923d79)

* CSharpExpressionPrinter: Wrap expression in parenthesis (mono#1741)

Wrap default parameter expressions in parentheses to ensure whole expressions are casted instead of only the first operand.

(cherry picked from commit 169f868)

* Update README.md

Remove Gitter since the link is 404 and we have not been using it anyway.

(cherry picked from commit 160efb4)

* CSharpExpressionPrinter: Recurse into operands (mono#1745)

* CSharpExpressionPrinter: Recurse into operands

Recursively call `VisitExpression` on the LHS and RHS of a binary
operator expression. This fixes the generation for complex default
parameters involving things other than two enumeration members.

* CSharpSources: Use `const` when possible

Generate `const` instead of `static` members when possible.
This allows generated members to be used when compile-time constants are
required, such as default parameters.

(cherry picked from commit 1ce9cb7)

* CSharp: More default parameter fixes (mono#1747)

- Expression generation for `ConstructorReference` now also recursively
calls `VisitExpression` for the argument if only one argument is
detected. This allows correct overload generation for functions taking
a variable as the default parameter value.
- Default parameters of pointer-to-enumeration types are now correctly
generated similar to primitive types.

(cherry picked from commit add3aba)

* Add type parameter to non-type template parameter decls. (mono#1749)

(cherry picked from commit bb31bd6)

* Update parser example to latest API.

(cherry picked from commit 8c1fa18)

* Fixed debugging printing when type printing delegate is not initialized.

(cherry picked from commit 9f3ce76)

* Array marshalling (mono#1748)

* Generator: Customization for const char[]

Allow the user to choose whether `const char[]` should be marshalled as
`string` or a normal `char` array in C#.

A new option `MarshalConstCharArrayAsString` is added, and is `true`
by default.

This helps in situations where the original C++ API distinguishes
between C-strings and char arrays using the two different notations.

* CSharpMarshal: Fix unknown length array marshal

For unknown length arrays, also run a conversion loop if the primitive
type encountered needs conversion (e.g. `char` to `sbyte`).

* CSharpTypePrinter: Fix for boolean arrays

(cherry picked from commit 357efec)

* Add qualified template name to GetCXXRecordDeclFromBaseType. (mono#1751)

(cherry picked from commit 626a362)

* SymbolResolver: Use filename when path cannot be found (mono#1752)

Uses bare filename to pass to `dlopen` when the full path cannot
be detected. This helps on systems where library paths are not the
same as $PATH.

(cherry picked from commit 3978fb3)

* CSharpSources: Dereference pointer variables (mono#1753)

Dereference pointers when generating getters for pointer variables.
Otherwise, the managed instance would point to the pointer itself
rather than the object at the native instance's address.

(cherry picked from commit ce3d04a)

* Use TypePrinter.IntPtrType in CSharpSources.cs code from previous commit.

(cherry picked from commit 3c31179)

---------

Co-authored-by: aybe <aybe@users.noreply.github.com>
Co-authored-by: João Matos <joao@tritao.eu>
Co-authored-by: josetr <37419832+josetr@users.noreply.github.com>
Co-authored-by: stachu99 <stachu99@users.noreply.github.com>
Co-authored-by: Trung Nguyen <57174311+trungnt2910@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants