[Mono-dev] [Bug?] mkbundle - " Windows cannot find 'sh' "

[xico] - xico2kx xico2kx at hotmail.com
Sun Jul 29 12:38:17 EDT 2007


Hi!
I was trying to port a simple Windows-based C# terminal application to be able to run it on a Linux terminal....
But when I try using mkbundle, I get the following errors...
> http://img511.imageshack.us/img511/2636/mkbundleerror1jv1.jpg

>
> C:\Temp>mkbundle -o testcommand TestCommand.exe
> OS is: Windows
> Sources: 1 Auto-dependencies: False
>   embedding: C:\Temp\TestCommand.exe
> Compiling:
> as -o temp.o temp.s
>
> Unhandled Exception: System.ComponentModel.Win32Exception: Cannot find the specified file
>  at System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000]
>  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000]
>  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000]
>  at System.Diagnostics.Process.Start (System.String fileName, System.String arguments) [0x00000]
>  at MakeBundle.Execute (System.String cmdLine) [0x00000]
>  at MakeBundle.GenerateBundles (System.Collections.ArrayList files) [0x00000]
>  at MakeBundle.Main (System.String[] args) [0x00000]
>
> Unhandled Exception: System.IO.IOException: Sharing violation on path temp.c
>  at System.IO.File.Delete (System.String path) [0x00000]
>  at MakeBundle.GenerateBundles (System.Collections.ArrayList files) [0x00000]
>  at MakeBundle.Main (System.String[] args) [0x00000]
>


Just after the "as -o temp.o temp.s" line, I get this Windows error message...
> http://img511.imageshack.us/img511/1875/mkbundleerror2ks3.jpg
> "Windows cannot find 'sh'. Make sure you typed the name correctly, and then try again. (...)"
After I click "OK" the rest of the errors listed above appear in the command-prompt.

I know that "sh" is a Unix shell but as I'm running Windows that command isn't avaliable...
The Windows shell is "cmd.exe"...


By reading the mkbundle documentation on
> http://www.mono-project.com/Guide:Running_Mono_Applications#Bundles
I can see that the error is probably before executing the command "cc -o
..."


The source code for my application is very simple as you can see here...
> http://img511.imageshack.us/img511/2216/mkbundleerror3zs7.jpg

> using System;
> using System.Collections.Generic;
> using System.Text;
> namespace ConsoleApplication1
> {
>     class Program
>     {
>         static void Main(string[] args)
>         {
>             foreach (string s in args) System.Console.Write(s + " ");
>        }
>     }
> }


I've also ran the "Mono Migration Analyzer" tool and it reports everything is ok!
I'm using "Windows XP SP2" as my operating system, "Microsoft Visual C# 2005 Express Edition" to compile my code, and "Mono v1.2.4"...

Is this a bug or am I doing something wrong?
Any ideas on how I can solve this problem?
Thanks in advance!



_________________________________________________________________
Receba as últimas notícias do Brasil e do mundo direto no seu Messenger com Alertas MSN! É GRÁTIS!
http://alertas.br.msn.com/


More information about the Mono-devel-list mailing list