Giter VIP home page Giter VIP logo

Comments (2)

RussKie avatar RussKie commented on July 19, 2024 1

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.

chwarr avatar chwarr commented on July 19, 2024

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...

from bond.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.