Bug 41052 - fsharp build from source fails
Summary: fsharp build from source fails
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: (C7)
Assignee: Alexander Köplinger [MSFT]
Depends on:
Reported: 2016-05-12 12:46 UTC by Atsushi Eno
Modified: 2016-05-16 06:01 UTC (History)
4 users (show)

Tags: c7regression
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:

Description Atsushi Eno 2016-05-12 12:46:43 UTC
With mono master installed, run fsharp build:

git clone https://github.com/fsharp/fsharp.git
cd fsharp
./autogen.sh --prefix={specify appropriate one}

The build fail with:


/sources/fsharp/src/fsharp/FSharp.Core/FSharp.Core.fsproj (default targets) ->
/sources/fsharp/packages/FSharp.Compiler.Tools. (CoreCompile target) ->

	/sources/fsharp/packages/FSharp.Compiler.Tools. error : Tool exited with code: 1. Output: 
Unhandled Exception:
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "FSComp.resources" was correctly embedded or linked into assembly "FSharp.Compiler-proto" at compile time, or that all the satellite assemblies required are loadable and fully signed.
  at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing (System.String fileName) <0x7f92b281b430 + 0x00270> in <filename unknown>:0 
  at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet (System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary`2[TKey,TValue] localResourceSets, System.Boolean tryParents, System.Boolean createIfNotExists, System.Threading.StackCrawlMark& stackMark) <0x7f92b28198b0 + 0x002d7> in <filename unknown>:0 

... snip ...

  at Microsoft.FSharp.Compiler.ErrorLogger+ErrorLoggerExtensions.ErrorLogger.ErrorRecovery (Microsoft.FSharp.Compiler.ErrorLogger+ErrorLogger x, System.Exception exn, Microsoft.FSharp.Compiler.Range+range m) <0x4146e4e0 + 0x0027b> in <filename unknown>:0 

	 0 Warning(s)
	 1 Error(s)

The full error stack trace is https://gist.github.com/atsushieno/fb295b9768dadcf900fb501f75d13221

All the following versions resulted the same:

Mono JIT compiler version 4.2.1 (Debian
Mono JIT compiler version 4.4.0 (tarball 2016年  5月 12日 木曜日 20:44:23 JST)
Mono JIT compiler version 4.5.1 (master/3c2fd4f 2016年  5月 12日 木曜日 08:23:10 JST)
Comment 1 Alexander Köplinger [MSFT] 2016-05-12 12:59:43 UTC
I can repro on OSX too with Mono 4.4.
Comment 2 Alexander Köplinger [MSFT] 2016-05-12 13:56:29 UTC
If I compile with Mono on Ubuntu 14.04 then it works fine.

Looking at the differences in ./src/fsharp/FSharp.Compiler-proto/obj/proto/FSharp.Compiler-proto.dll between 4.4 and the 4.2 compiled assemblies in the former case it is missing the resources, so this seems to me like a regression somewhere in 4.4. I'm wondering why you hit the same in 4.2.1 though (did you clean the repository after switching Mono versions?)
Comment 3 Alexander Köplinger [MSFT] 2016-05-12 15:54:33 UTC
Ok, so the issue is that the FSharp compiler package that is used for bootstrapping has a .targets that contains this:

    <UsingXBuild Condition="Exists('$(MSBuildExtensionsPath32)\..\4.0\Mono.Posix.dll')">true</UsingXBuild>

This doesn't work on Mono 4.4 since the <prefix>/lib/mono/4.0 folder doesn't contain assemblies anymore (the reference assemblies were renamed to 4.0-api).

It was already fixed with https://github.com/fsharp/fsharp/pull/525 in fsharp upstream, but apparently hasn't made it's way into the bootstrap package yet.

We'll do the same as we did for nunit in https://bugzilla.xamarin.com/show_bug.cgi?id=38331 and copy the stub Mono.Posix.dll to the 4.0 folder so this keeps working: https://github.com/mono/mono/pull/2990
Comment 4 Alexander Köplinger [MSFT] 2016-05-12 16:18:04 UTC
Merged to master with https://github.com/mono/mono/pull/2990.

Filed a trello card for getting the fix into 4.4: https://trello.com/c/cdL4uAJA/252-mono-bug-41052-fsharp-build-from-source-fails
Comment 5 Shruti 2016-05-13 13:29:09 UTC
Reproduce Status:
I am able to reproduce this issue on  Mono
Error Log: https://gist.github.com/shrutis360/2b0ad4fadaf62fec280b587e35abfeae

Verify Status:
I have verified this issue with master build MonoFramework-MDK-
Now build does not get fail while make 
Terminal Output :https://gist.github.com/shrutis360/5d055bf45101208e5f5129b3c910a711

Ι will close the issue once verify with C7 builds
Comment 6 Shruti 2016-05-16 06:01:56 UTC
I have verified this issue with master build MonoFramework-MDK-
Now build does not get fail after make 

Terminal Output: https://gist.github.com/shrutis360/e8aef4d24d9fd9882b32eb29d3f6b8f7.

This is working fine. Hence, Closing this issue.