jamescourtney / FlatSharp

Fast, idiomatic C# implementation of Flatbuffers
Apache License 2.0
497 stars 50 forks source link

FBS file compile fails on Linux build container #287

Closed wolfman42 closed 2 years ago

wolfman42 commented 2 years ago

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.

jamescourtney commented 2 years ago

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:

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

wolfman42 commented 2 years ago

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.

wolfman42 commented 2 years ago

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.

jamescourtney commented 2 years ago

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.