Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cake.Tool not working on FreeBSD #4310

Open
2 tasks done
Thefrank opened this issue Apr 18, 2024 · 1 comment · May be fixed by #4312
Open
2 tasks done

Cake.Tool not working on FreeBSD #4310

Thefrank opened this issue Apr 18, 2024 · 1 comment · May be fixed by #4312

Comments

@Thefrank
Copy link

Thefrank commented Apr 18, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

4.0.0

Operating system

N/A

Operating system architecture

64-Bit

CI Server

No response

What are you seeing?

A confusing build failure on FreeBSD 13.3/14.0 AMD64:

Looking for modules...
No scripts found at /root/cake/build/parameters.cake.
No modules found to install.
Module directory does not exist.
Analyzing build script...
Analyzing /root/cake/build.cake...
No scripts found at /root/cake/build/parameters.cake.
Processing build script...
Installing tools...
Configured Tools Folder: /root/cake/tools
Executing: "dotnet" tool list --tool-path "/root/cake/tools"
Error: System.ComponentModel.Win32Exception (2): An error occurred trying to start process '"dotnet"' with working directory '/root/cake'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Cake.Core.IO.ProcessRunner.Start(FilePath filePath, ProcessSettings settings) in C:\projects\cake\src\Cake.Core\IO\ProcessRunner.cs:line 78
   at Cake.DotNetTool.Module.DotNetToolPackageInstaller.GetInstalledTools(String toolLocation) in C:\projects\cake\src\Cake.DotNetTool.Module\DotNetToolPackageInstaller.cs:line 185
   at Cake.DotNetTool.Module.DotNetToolPackageInstaller.Install(PackageReference package, PackageType type, DirectoryPath path) in C:\projects\cake\src\Cake.DotNetTool.Module\DotNetToolPackageInstaller.cs:line 115
   at Cake.Core.Scripting.ScriptProcessor.InstallPackages(IReadOnlyCollection`1 modules, DirectoryPath installPath, PackageType packageType) in C:\projects\cake\src\Cake.Core\Scripting\ScriptProcessor.cs:line 207
   at Cake.Core.Scripting.ScriptProcessor.InstallTools(IReadOnlyCollection`1 tools, DirectoryPath installPath) in C:\projects\cake\src\Cake.Core\Scripting\ScriptProcessor.cs:line 148
   at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath) in C:\projects\cake\src\Cake.Core\Scripting\ScriptRunner.cs:line 102
   at Cake.Features.Building.BuildFeature.RunCore(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:line 99
   at Cake.Features.Building.BuildFeature.Run(ICakeArguments arguments, BuildFeatureSettings settings) in C:\projects\cake\src\Cake\Features\Building\BuildFeature.cs:line 49
   at Cake.Commands.DefaultCommand.Execute(CommandContext context, DefaultCommandSettings settings) in C:\projects\cake\src\Cake\Commands\DefaultCommand.cs:line 76

What is expected?

I was not expecting cake.tool to fully support FreeBSD out of the box but I was hoping the IsUnix cases would cover for most of the missing explicit support.

Steps to Reproduce

On either FreeBSD 13.3 or 14.0:

git clone https://github.com/cake-build/cake
cd cake
dotnet tool restore
dotnet cake build.cake -v D

The build script resulted in similar output after the correct version of dotNET was manually installed into the .dotnet path

Output log

output from truss -faeH -o truss.txt dotnet cake OK?
of note truss found cake looks for "dotnet" and paths that include :
truss.txt

edit: clarity

@Thefrank
Copy link
Author

Thefrank commented May 12, 2024

future readers / current LLM scrapers:

It looks like .NET Standard 2.0 does not know about FreeBSD. It was added as a part .NET Core 3.0.

edit: I might have a non-bad solution if PRs are accepted

@Thefrank Thefrank linked a pull request May 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant