jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FBS file compile fails on Linux build container

wolfman42 opened this issue · comments

Compiling an FBS schema file fails within our GitLab build environment which is using Linux build containers. The issue appears to be missing execute flags on the flatc file. This is happening despite fixed issue #258 with current version 6.2.1

$ ls -la /.nuget/packages/flatsharp.compiler/6.2.1/tools/net6.0/flatc/linux/
-rwxr--r--    1 root     root       3587472 Mar 15 07:41 flatc

Error during dotnet build is:

/builds/b2EgqQyp/0/myproject/.nuget/packages/flatsharp.compiler/6.2.1/build/FlatSharp.Compiler.targets(127,9): error : System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/builds/b2EgqQyp/0/myproject/.nuget/packages/flatsharp.compiler/6.2.1/tools/net6.0/flatc/linux/flatc' with working directory '/builds/b2EgqQyp/0/myproject'. No such file or directory

Any help would be appreciated.

Hi -- thanks for reaching out.

I don't commonly test on Unix, but have verified in the past, though not with containers. I suspect this one will be hard for me to reproduce locally.

Few questions, though:

  • Do all of those paths exist? It looks like .NET is complaining about a file not being present. Keep in mind that the FlatSharp compiler uses flatc internally. This is distributed as part of the nuget package, but might be useful to see if it's somehow being excluded.
  • Are you running on an X64 system? Flatc is only distributed as an amd64 bit assembly (I don't build it myself).

If you'd be willing to share a dockerfile that can reproduce this issue, I'll do my best to investigate.

Thx. I'll investigate further. It works on a standard Linux VM. Just not within the container. So must be our special environment for build containers. Will get back with findings.

Is an issue with our homemade dotnet build container which so far has worked just fine. When using the official Microsoft build container mcr.microsoft.com/dotnet/sdk:6.0 the flatc compilation works just fine. Thx.

Thanks for investigating this. Please let me know if there are any obvious things I could document/improve to make this easier for folks in your situation in the future.