Bug 17537 - xbuild gives "Native error= Cannot find the specified file" if assembly to be run by task not marked executable
Summary: xbuild gives "Native error= Cannot find the specified file" if assembly to be...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-01-31 06:38 UTC by robin.neatherway
Modified: 2014-12-31 08:35 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description robin.neatherway 2014-01-31 06:38:32 UTC
I am using fslex/fsyacc. If either is not marked executable then xbuild fails with "Native error= Cannot find the specified file". If I then chmod +x fs{lex,yacc}.exe and rerun the build everything works fine.

I think this should at least give a more descriptive error, but preferably it should not matter as xbuild must be invoking the executable via mono.

Error snippet from xbuild:

		Tool /packages/FSPowerPack.Community.3.0.0.0/Tools/fsyacc.exe execution started with arguments: -o HORSParser.fs -v --module "HORSSyntax.HORSParser"  HORSParser.fsy 
/auto/users/robnea/dev/horsmc/ModelCheckApp/packages/FSPowerPack.Community.3.0.0.0/Tools/FSharp.PowerPack.targets: error : Error executing tool '/packages/FSPowerPack.Community.3.0.0.0/Tools/fsyacc.exe': ApplicationName='/packages/FSPowerPack.Community.3.0.0.0/Tools/fsyacc.exe', CommandLine='-o HORSParser.fs -v --module "HORSSyntax.HORSParser"  HORSParser.fsy ', CurrentDirectory='/auto/users/robnea/dev/horsmc/HORSSyntax/HORSSyntax', Native error= Cannot find the specified file
	Task "FsYacc" execution -- FAILED
	Done building target "CallFsYacc" in project "/auto/users/robnea/dev/horsmc/HORSSyntax/HORSSyntax/HORSSyntax-mono.fsproj".-- FAILED
Done building project "/auto/users/robnea/dev/horsmc/HORSSyntax/HORSSyntax/HORSSyntax-mono.fsproj".-- FAILED
Comment 1 Mikayla Hutchinson [MSFT] 2014-01-31 15:30:01 UTC
This is the exception text that comes from Mono's Process.Start.
Comment 2 robin.neatherway 2014-05-26 12:45:08 UTC
Is this viewed as a bug in Mono's Process.Start then? What would be viewed as acceptable behaviour? I would like it if xbuild would just run fslex/fsyacc correctly.
Comment 3 Marius Ungureanu 2014-12-31 08:35:47 UTC
This has been fixed and will be shipped in future versions of mono.