Bug 22497 - F# fails to build on Mono version 3.8.0 ((no/62a857e Wed Aug 13 00:46:20 EDT 2014)
Summary: F# fails to build on Mono version 3.8.0 ((no/62a857e Wed Aug 13 00:46:20 EDT ...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 3.8.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-29 05:30 UTC by Dave Thomas
Modified: 2014-08-29 15:08 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 Dave Thomas 2014-08-29 05:30:17 UTC
Im sure this worked on the previous version of mono 3.8.

When building F# I now get the following error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src/fsharp all
/Applications/Xcode.app/Contents/Developer/usr/bin/make build-proto
mkdir: /Users/dave/code/fsharp//lib/proto/: File exists
make[2]: [build-proto] Error 1 (ignored)
cp -p /Users/dave/code/fsharp/lib/bootstrap/4.0/FSharp.Core.dll /Users/dave/code/fsharp//lib/proto/FSharp.Core.dll
cp -p /Users/dave/code/fsharp/lib/bootstrap/4.0/FSharp.Core.sigdata /Users/dave/code/fsharp//lib/proto/FSharp.Core.sigdata
cp -p /Users/dave/code/fsharp/lib/bootstrap/4.0/FSharp.Core.optdata /Users/dave/code/fsharp//lib/proto/FSharp.Core.optdata
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C FSharp.Build-proto Configuration=proto build-proto
MONO_ENV_OPTIONS= xbuild /p:Configuration=Proto
XBuild Engine Version 12.0
Mono, Version 3.8.0.0
Copyright (C) 2005-2013 Various Mono authors

Build started 29/08/2014 10:18:27.
__________________________________________________
Project "/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj" (default target(s)):
	Target CallFsSrGen:
	Skipping target "CallFsSrGen" because its outputs are up-to-date.
	Target PrepareForBuild:
		Configuration: Proto Platform: AnyCPU
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	Target CoreCompile:
		Tool /Users/dave/code/fsharp/lib/bootstrap/4.0/fsc.exe execution started with arguments: -o:obj/proto/./FSharp.Build-proto.dll -g --noframework --define:CROSS_PLATFORM_COMPILER --define:DEBUG --define:NO_STRONG_NAMES --define:NO_STRONG_NAMES --define:BUILDING_WITH_LKG --define:FSHARP_CORE_4_5 --define:FX_ATLEAST_45 --define:FX_ATLEAST_40 --define:FX_ATLEAST_35 --define:BE_SECURITY_TRANSPARENT --define:QUERIES_IN_FSLIB --define:PUT_TYPE_PROVIDERS_IN_FSCORE --define:FX_ATLEAST_LINQ --define:FX_NO_BIGINT_CULTURE_PARSE --doc:/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/../../../lib/proto/./FSharp.Build-proto.xml --optimize+ --resource:obj/proto/./FSBuild.resources -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/mscorlib.dll -r:/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/../../../lib/bootstrap/4.0/FSharp.Core.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/System.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/System.Numerics.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.Build.Engine.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.Build.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.Build.Framework.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.Build.Utilities.v4.0.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/Microsoft.Build.Tasks.v4.0.dll -r:/Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/System.Core.dll --target:library --nowarn:69,65,54,61,75 --warn:3 --warnaserror:76 --fullpaths --flaterrors --highentropyva-  --times --version:4.3.1.0 obj/proto/./FSBuild.fs ../../utils/CompilerLocationUtils.fs ../FSharp.Build/CreateFSharpManifestResourceName.fsi ../FSharp.Build/CreateFSharpManifestResourceName.fs ../FSharp.Build/Fsc.fsi ../FSharp.Build/Fsc.fs
		F# Compiler for F# 3.0 (private, test-signed)
		Freely distributed under the Apache 2.0 Open Source License
		TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib]
		TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib and FSharp.Core.dll]
		Could not allocate 341236 bytes
		mono-sgen(1593,0xa155c1a8) malloc: *** mach_vm_map(size=344064) failed (error code=268435459)
		mono-sgen(1593,0xa155c1a8) malloc: *** error: can't allocate region
		mono-sgen(1593,0xa155c1a8) malloc: *** set a breakpoint in malloc_error_break to debug
		Stacktrace:
		  at <unknown> <0xffffffff>
		  at Microsoft.FSharp.Compiler.Build/TcImports.BuildFrameworkTcImports (Microsoft.FSharp.Compiler.Build/TcConfigProvider,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>) <0x00b1f>
		  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine$cont@322 (Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,Microsoft.FSharp.Compiler.Lexhelp/LexResourceManager,Microsoft.FSharp.Collections.FSharpList`1<string>,string,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.Unit) <0x001b3>
		  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine (Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,string[],string,string,Microsoft.FSharp.Core.FSharpOption`1<int>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00ce3>
		  at Microsoft.FSharp.Compiler.Driver.main1 (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00227>
		  at Microsoft.FSharp.Compiler.Driver.mainCompile (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x0001b>
		  at Microsoft.FSharp.Compiler.CommandLineMain/Driver.main (string[]) <0x002db>
		  at Microsoft.FSharp.Compiler.CommandLineMain.main (string[]) <0x000bf>
		  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>
		Native stacktrace:
			0   mono-sgen                           0x000db6b0 mono_handle_native_sigsegv + 304
			1   mono-sgen                           0x0013616d sigabrt_signal_handler + 109
			2   libsystem_platform.dylib            0x977efdeb _sigtramp + 43
			3   ???                                 0xffffffff 0x0 + 4294967295
			4   libsystem_c.dylib                   0x965c729c abort + 155
			5   mono-sgen                           0x002948bc monoeg_g_logv + 188
			6   mono-sgen                           0x00294919 monoeg_g_log + 41
			7   mono-sgen                           0x0029465c monoeg_malloc + 76
			8   mono-sgen                           0x0019a646 mono_mempool_alloc + 70
			9   mono-sgen                           0x000d4b9c mono_local_regalloc + 860
			10  mono-sgen                           0x0003565a mono_codegen + 138
			11  mono-sgen                           0x0003b8a2 mini_method_compile + 8578
			12  mono-sgen                           0x0003ca4b mono_jit_compile_method_with_opt + 1755
			13  mono-sgen                           0x0003d4f9 mono_jit_compile_method + 57
			14  mono-sgen                           0x000e1504 common_call_trampoline + 1092
			15  mono-sgen                           0x000de56b mono_magic_trampoline + 59
			16  ???                                 0x0048c088 0x0 + 4767880
		Debug info from gdb:
		warning: (i386) /Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
		=================================================================
		Got a SIGABRT while executing native code. This usually indicates
		a fatal error in the mono runtime or one of the native libraries
		used by your application.
		=================================================================
/Users/dave/code/fsharp/lib/bootstrap/4.0/Microsoft.FSharp.Targets: error : Tool exited with code: 134. Output: F# Compiler for F# 3.0 (private, test-signed)
Freely distributed under the Apache 2.0 Open Source License
TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib]
TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib and FSharp.Core.dll]
Could not allocate 341236 bytes
mono-sgen(1593,0xa155c1a8) malloc: *** mach_vm_map(size=344064) failed (error code=268435459)
mono-sgen(1593,0xa155c1a8) malloc: *** error: can't allocate region
mono-sgen(1593,0xa155c1a8) malloc: *** set a breakpoint in malloc_error_break to debug
Stacktrace:

  at <unknown> <0xffffffff>
  at Microsoft.FSharp.Compiler.Build/TcImports.BuildFrameworkTcImports (Microsoft.FSharp.Compiler.Build/TcConfigProvider,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>) <0x00b1f>
  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine$cont@322 (Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,Microsoft.FSharp.Compiler.Lexhelp/LexResourceManager,Microsoft.FSharp.Collections.FSharpList`1<string>,string,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.Unit) <0x001b3>
  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine (Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,string[],string,string,Microsoft.FSharp.Core.FSharpOption`1<int>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00ce3>
  at Microsoft.FSharp.Compiler.Driver.main1 (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00227>
  at Microsoft.FSharp.Compiler.Driver.mainCompile (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x0001b>
  at Microsoft.FSharp.Compiler.CommandLineMain/Driver.main (string[]) <0x002db>
  at Microsoft.FSharp.Compiler.CommandLineMain.main (string[]) <0x000bf>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   mono-sgen                           0x000db6b0 mono_handle_native_sigsegv + 304
	1   mono-sgen                           0x0013616d sigabrt_signal_handler + 109
	2   libsystem_platform.dylib            0x977efdeb _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x965c729c abort + 155
	5   mono-sgen                           0x002948bc monoeg_g_logv + 188
	6   mono-sgen                           0x00294919 monoeg_g_log + 41
	7   mono-sgen                           0x0029465c monoeg_malloc + 76
	8   mono-sgen                           0x0019a646 mono_mempool_alloc + 70
	9   mono-sgen                           0x000d4b9c mono_local_regalloc + 860
	10  mono-sgen                           0x0003565a mono_codegen + 138
	11  mono-sgen                           0x0003b8a2 mini_method_compile + 8578
	12  mono-sgen                           0x0003ca4b mono_jit_compile_method_with_opt + 1755
	13  mono-sgen                           0x0003d4f9 mono_jit_compile_method + 57
	14  mono-sgen                           0x000e1504 common_call_trampoline + 1092
	15  mono-sgen                           0x000de56b mono_magic_trampoline + 59
	16  ???                                 0x0048c088 0x0 + 4767880

Debug info from gdb:

warning: (i386) /Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================


	Task "Fsc" execution -- FAILED
	Done building target "CoreCompile" in project "/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj".-- FAILED
Done building project "/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj".-- FAILED

Build FAILED.
Errors:

/Users/dave/code/fsharp/src/fsharp/FSharp.Build-proto/FSharp.Build-proto.fsproj (default targets) ->
/Users/dave/code/fsharp/lib/bootstrap/4.0/Microsoft.FSharp.Targets (CoreCompile target) ->

	/Users/dave/code/fsharp/lib/bootstrap/4.0/Microsoft.FSharp.Targets: error : Tool exited with code: 134. Output: F# Compiler for F# 3.0 (private, test-signed)
Freely distributed under the Apache 2.0 Open Source License
TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib]
TIME:  0.3 Delta:  0.0 Mem:  23 G0:   0 G1:  0 G2:  0 [Import mscorlib and FSharp.Core.dll]
Could not allocate 341236 bytes
mono-sgen(1593,0xa155c1a8) malloc: *** mach_vm_map(size=344064) failed (error code=268435459)
mono-sgen(1593,0xa155c1a8) malloc: *** error: can't allocate region
mono-sgen(1593,0xa155c1a8) malloc: *** set a breakpoint in malloc_error_break to debug
Stacktrace:

  at <unknown> <0xffffffff>
  at Microsoft.FSharp.Compiler.Build/TcImports.BuildFrameworkTcImports (Microsoft.FSharp.Compiler.Build/TcConfigProvider,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>,Microsoft.FSharp.Collections.FSharpList`1<Microsoft.FSharp.Compiler.Build/AssemblyResolution>) <0x00b1f>
  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine$cont@322 (Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,Microsoft.FSharp.Compiler.Lexhelp/LexResourceManager,Microsoft.FSharp.Collections.FSharpList`1<string>,string,Microsoft.FSharp.Compiler.Build/TcConfig,Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger,Microsoft.FSharp.Core.Unit) <0x001b3>
  at Microsoft.FSharp.Compiler.Driver.getTcImportsFromCommandLine (Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Core.Unit>>,string[],string,string,Microsoft.FSharp.Core.FSharpOption`1<int>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Core.Unit>,bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00ce3>
  at Microsoft.FSharp.Compiler.Driver.main1 (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x00227>
  at Microsoft.FSharp.Compiler.Driver.mainCompile (string[],bool,Microsoft.FSharp.Compiler.ErrorLogger/Exiter,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Compiler.Build/TcConfigBuilder, Microsoft.FSharp.Compiler.ErrorLogger/ErrorLogger>) <0x0001b>
  at Microsoft.FSharp.Compiler.CommandLineMain/Driver.main (string[]) <0x002db>
  at Microsoft.FSharp.Compiler.CommandLineMain.main (string[]) <0x000bf>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	0   mono-sgen                           0x000db6b0 mono_handle_native_sigsegv + 304
	1   mono-sgen                           0x0013616d sigabrt_signal_handler + 109
	2   libsystem_platform.dylib            0x977efdeb _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x965c729c abort + 155
	5   mono-sgen                           0x002948bc monoeg_g_logv + 188
	6   mono-sgen                           0x00294919 monoeg_g_log + 41
	7   mono-sgen                           0x0029465c monoeg_malloc + 76
	8   mono-sgen                           0x0019a646 mono_mempool_alloc + 70
	9   mono-sgen                           0x000d4b9c mono_local_regalloc + 860
	10  mono-sgen                           0x0003565a mono_codegen + 138
	11  mono-sgen                           0x0003b8a2 mini_method_compile + 8578
	12  mono-sgen                           0x0003ca4b mono_jit_compile_method_with_opt + 1755
	13  mono-sgen                           0x0003d4f9 mono_jit_compile_method + 57
	14  mono-sgen                           0x000e1504 common_call_trampoline + 1092
	15  mono-sgen                           0x000de56b mono_magic_trampoline + 59
	16  ???                                 0x0048c088 0x0 + 4767880

Debug info from gdb:

warning: (i386) /Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================



	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:02.0316070
make[3]: *** [build-proto] Error 1
make[2]: *** [build-proto] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
Comment 1 Zoltan Varga 2014-08-29 15:08:26 UTC
This is already fixed in the mono-3.8.0-branch by 45d0ba1bc0b1e8740622b6c6468dfdba45c1d7fd.