Comments (3)
I don't understand how you even got this far running gbc.exe on a Linux host. :-) The gbc.exe in the NuGet package is an Windows binary. I would expect invoking that gbc.exe to fail with an error about the file being non-executable or in a bad format. Are you using Wine or something like it?
I was surprised as well :) I've run it locally under wsl2, I have no idea what makes that tick...
I went and studied build log from an Ubuntu build agent, and I think you're right - it didn't work there at all:
/usr/bin/sh: 2: /tmp/MSBuildTempcloudtest/tmpd8b95f3859a5437f9e9a945de90024e6.exec.cmd: /mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/../../tools/gbc.exe: Exec format error
/mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/Common.targets(161,5): error MSB3073: The command ""/mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/../../tools/gbc.exe" c# --import-dir="/mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/../../tools/inc" --jobs=-2 --namespace=bond=Bond --output-dir="/mnt/vss/_work/1/s/artifacts/obj/PerformanceTests/Release/net8.0/" @"/mnt/vss/_work/1/s/artifacts/obj/PerformanceTests/Release/net8.0/bonddefaultcodegen.in"" exited with code 126. [/mnt/vss/_work/1/s/bench/Extensions/PerformanceTests/PerformanceTests.csproj]
##[error].packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/Common.targets(161,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command ""/mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/../../tools/gbc.exe" c# --import-dir="/mnt/vss/_work/1/s/.packages/bond.compiler.csharp/10.0.0/build/netstandard1.6/../../tools/inc" --jobs=-2 --namespace=bond=Bond --output-dir="/mnt/vss/_work/1/s/artifacts/obj/PerformanceTests/Release/net8.0/" @"/mnt/vss/_work/1/s/artifacts/obj/PerformanceTests/Release/net8.0/bonddefaultcodegen.in"" exited with code 126.
It's just the first line isn't highlighted/reported as error, which made it easy to miss.
from bond.
I don't understand how you even got this far running gbc.exe on a Linux host. :-) The gbc.exe in the NuGet package is an Windows binary. I would expect invoking that gbc.exe to fail with an error about the file being non-executable or in a bad format. Are you using Wine or something like it?
- To run Bond on Linux, I suggest that you build gbc from source targeting Linux. That's how the Bond CI build for Linux works. For more details about how to do that and how to tell the MSBuild targets about your copy of gbc, see issue #940, gbc for Linux?.
- gbc.exe does normalize slashes on input files. If you are running this atop Wine, I would expect that gbc would think that it is running on Windows and will thus translate all its paths to use backslashes. However, I would then expect Wine would be responsible for mapping Windows paths back to the appropriate ones for the platform.
- Are you invoking gbc manually or via MSBuild? Your invocation of gbc.exe appears to be missing a
@
before the path to "bonddefaultcodegen.in". The file is typically generated by the MSBuild codegen targets and passed to gbc.exe (to avoid command length limits) via @listfile syntax. I would expect the invocation of gbc to be~/.nuget/packages/bond.compiler.csharp/10.0.0/tools/gbc.exe c# ... --namespace=bond=Bond @"./bonddefaultcodegen.in"
with a leading@
before the file and the path surrounded by quotes.- However, I would expect a missing
@
to result in a parse error, as "Bond.bond" isn't valid .bond syntax. The "No such file or directory" error implies that this is failing to open the input file at all...
- However, I would expect a missing
from bond.
Related Issues (20)
- [C#] Support System.Collections.Immutable collections as custom containers
- [C++] How do we deserialize two continuous objects from one bulk of memory? HOT 2
- In C# implementation, how to parse to structs separated by BT_STOP_BASE HOT 2
- Correct way to read list of mapped values in C# HOT 3
- [ci] Image cleanup script needs to handle 18.04 images
- [ci] CI image Dockerfile needs to be paramatarized on FROM registry
- This repo is missing important files
- c#: Add ToString() implementations for compiled bond objects HOT 1
- Merge API support for C#? HOT 2
- Bond generated headers don't work for clang in c++20 HOT 2
- Include enums in Bond runtime schema HOT 1
- cmake/Config.cmake looks for the EOLed Python-2.7 HOT 1
- Deserialization/serialization under Linux is 7x-10x slower than Windows HOT 2
- [C#] gbc.exe: Exec format error inside mcr.microsoft.com/dotnet/sdk:latest docker image. HOT 3
- [C#] Deserializing bond-like strings into dynamic type HOT 2
- Linux build error - ghc: panic! HOT 4
- Support dotnet trimming HOT 5
- Target `netstandard2.0` for c# HOT 1
- C++: GCC: Double/Float comparison warning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bond.