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.
2 comments:
It would be helpful to state, where to place the tree obtained from GIT so the build works.
I just got it to my /opt/lib/fsharp location and there, the build does not seem to work. I find fsi.exe and fsc.exe etc. only in fsharp/lib/bootstrap/4.0 but nowhere else.
Also there is no /usr/local/lib/mono/gac after my installation.
Check these PRs:
http://www.freebsd.org/cgi/query-pr.cgi?pr=176018
http://www.freebsd.org/cgi/query-pr.cgi?pr=176030
We may wait a few weeks, so we will use fsharp on sgen as out-of-the-box.
Post a Comment