Bug 15509 - Compiling fsharp fails on Ubuntu / ARM
Summary: Compiling fsharp fails on Ubuntu / ARM
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 2.10.x
Hardware: Other Linux
: --- normal
Target Milestone: ---
Assignee: Alex Rønne Petersen
Depends on:
Reported: 2013-10-18 23:02 UTC by Liam McLennan
Modified: 2015-10-28 05:47 UTC (History)
3 users (show)

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 Liam McLennan 2013-10-18 23:02:24 UTC
When compiling fsharp on ubuntu on ARM I received the error below. 

Reproduction steps are (based on http://fsharp.org/use/linux/):

1. sudo apt-get install mono-devel
2. sudo apt-get install autoconf libtool pkg-config make git
   git clone https://github.com/fsharp/fsharp
   cd fsharp
   ./autogen.sh --prefix /usr

Also reported on the fsharp issue list: https://github.com/fsharp/fsharp/issues/166

Compilation Error

TIME:  1.0 Delta:  0.0 Mem:  18 G0:   0 G1:  0 G2:  0 [Import mscorlib]
TIME:  1.0 Delta:  0.0 Mem:  18 G0:   0 G1:  0 G2:  0 [Import mscorlib and FSharp.Core.dll]

  at Microsoft.FSharp.Core.FSharpFunc`2.InvokeFast<V> (Microsoft.FSharp.Core.FSharpFunc`2<T, Microsoft.FSharp.Core.FSharpFunc`2<TResult, V>>,T,TResult) <0x0002b>
  at Microsoft.FSharp.Compiler.Env.mkTcGlobals (bool,Microsoft.FSharp.Compiler.Tast/CcuThunk,Microsoft.FSharp.Compiler.AbstractIL.IL/ILGlobals,Microsoft.FSharp.Compiler.Tast/CcuThunk,string,bool,bool,bool,bool,Microsoft.FSharp.Core.FSharpFunc`2<Microsoft.FSharp.Collections.FSharpList`1<string>, Microsoft.FSharp.Core.FSharpFunc`2<string, Microsoft.FSharp.Compiler.Tast/CcuThunk>>) <0x0061b>
  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>) <0x008f3>
  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) <0x00173>
  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>) <0x00a0b>
  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>) <0x00247>
  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>) <0x0002b>
  at Microsoft.FSharp.Compiler.CommandLineMain/Driver.main (string[]) <0x00257>
  at Microsoft.FSharp.Compiler.CommandLineMain.main (string[]) <0x000c3>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

Debug info from gdb:

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

make[3]: *** [.libs/proto//4.0/FSharp.Build-proto.dll] Aborted (core dumped)
make[3]: Leaving directory `/home/liam/work/fsharp/src/fsharp/FSharp.Build-proto'
make[2]: *** [do-proto] Error 2
make[2]: Leaving directory `/home/liam/work/fsharp/src/fsharp'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/liam/work/fsharp/src/fsharp'
make: *** [all] Error 2
Comment 1 Rodrigo Kumpera 2014-01-08 21:38:13 UTC
Alex, can you take a look at this one at some point?
Comment 2 Alex Rønne Petersen 2014-01-09 05:51:39 UTC

Liam, can you try running the build as root (or some other superuser) so that GDB can attach and grab a native stack trace?
Comment 3 Alex Rønne Petersen 2014-01-13 12:56:37 UTC
Also, the output of these commands would be useful:

1. `uname -a`
2. `LD_SHOW_AUXV=1 /bin/true`
3. `dpkg --print-architecture`
Comment 4 Liam McLennan 2014-01-14 06:18:46 UTC
Hi Alex,

Last one is easy. 

`uname -a`

Linux localhost 3.4.0 #1 SMP Tue Dec 17 23:25:37 PST 2013 armv7l armv7l armv7l GNU/Linux

`LD_SHOW_AUXV=1 /bin/true`

AT_HWCAP:    swp half thumb fastmult vfp edsp thumbee neon vfpv3
AT_PAGESZ:       4096
AT_CLKTCK:       100
AT_PHDR:         0x8034
AT_PHENT:        32
AT_PHNUM:        9
AT_BASE:         0x76f06000
AT_FLAGS:        0x0
AT_ENTRY:        0x8d11
AT_UID:          1000
AT_EUID:         1000
AT_GID:          1000
AT_EGID:         1000
AT_SECURE:       0
AT_RANDOM:       0x7ebcb914
AT_EXECFN:       /bin/true
AT_PLATFORM:     v7l

`dpkg --print-architecture`

Comment 5 Alex Rønne Petersen 2015-05-07 20:23:29 UTC
This is likely fixed on Mono master as our armhf ABI support is now complete. Can you try again?
Comment 6 Alex Rønne Petersen 2015-10-28 05:47:57 UTC
Closing due to inactivity. Feel free to reopen if it's still an issue.