When we want to use F# on Mono 3.0 on FreeBSD, we should build from source file, not from ports' fsharp.
How
$ git clone https://github.com/fsharp/fsharp.git $ cd fsharp $ vi configure.acIn configure.ac, update around sgen options as acomments. Reasons later.
#if test "x$MONO_SGEN" = "xno"; thenAnd then,
# mono_gc_options=
#else
# mono_gc_options=--gc=sgen
#fi
$ ./autogen.sh --with-gacdir=/usr/local/lib/mono/gac $ gmake $ sudo gmake installLet's launch F# REPL.
$ fsharpi
Why disable sgen option on F#
The reason is the status of LLVM support for Mono on FreeBSD.mono-sgen - The FreeBSD Forums
- Mono LLVM option for FreeBSD is not stable.
- For Mono on POSIX, pthread is the only thread mechanism until LLVM (supporting "__thread") will support mono on FreeBSD stably.
- On FreeBSD, so that we can use pthread without sgen, and also can use sgen without pthread.





