Skip to content

Add support for Haiku #1840

@nexus6-haiku

Description

@nexus6-haiku

I'm working on porting CppSharp to Haiku where we have a .NET SDK. It's not officially supported yet but it works pretty well.
I've made all the necessary changes to support the new OS (x64 only) including providing a pre-built LLVM package (LLVM17 it's the latest we have, atm).
I have a question on how to generate the bindings in src/CppParser/Bindings/CSharp.
Currently I'm using a copy from Linux or MacOS but clearly it's not going to work as I get tons of errors like:

Generating bindings for Encodings (CSharp)
  Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named '?' in shared library 'Std-symbols'.
     at Std.BasicStringExtensions.__Internal.Data(IntPtr __instance)
     at Std.BasicStringExtensions.Data(BasicString`3 this) in /boot/home/workspace/CppSharp/src/CppParser/Bindings/CSharp/x86_64-unknown-haiku/Std.cs:line 540
     at CppSharp.Parser.CppParserOptions.get_ClangVersion() in /boot/home/workspace/CppSharp/src/CppParser/Bindings/CSharp/x86_64-unknown-haiku/CppSharp.CppParser.cs:line 41009
     at CppSharp.Parser.ParserOptions.get_BuiltinsDirBasePath() in /boot/home/workspace/CppSharp/src/Parser/ParserOptions.cs:line 408
     at CppSharp.Parser.ParserOptions.get_BuiltinsDir() in /boot/home/workspace/CppSharp/src/Parser/ParserOptions.cs:line 421
     at CppSharp.Parser.ParserOptions.SetupIncludes(TargetPlatform targetPlatform) in /boot/home/workspace/CppSharp/src/Parser/ParserOptions.cs:line 428
     at CppSharp.Parser.ParserOptions.Setup(TargetPlatform targetPlatform) in /boot/home/workspace/CppSharp/src/Parser/ParserOptions.cs:line 316
     at CppSharp.Driver.Setup() in /boot/home/workspace/CppSharp/src/Generator/Driver.cs:line 57
     at CppSharp.ConsoleDriver.Run(ILibrary library) in /boot/home/workspace/CppSharp/src/Generator/Driver.cs:line 399
     at CppSharp.Tests.EncodingsTestsGenerator.Main(String[] args) in /boot/home/workspace/CppSharp/tests/dotnet/Encodings/Encodings.Gen.cs:line 27

I'm a bit confused on how the process is supposed to be. Could these bindings be generated on Haiku itself or do I need to do it from another platform?
I've gone through #1708 and #1825 but have not fully grasped how to create the bindings. Is there a step-by-step guide or could anyone provide some guidance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions