Created attachment 156642 [details] Patch Hi, As part of our effort to port CoreCLR and the Roslyn compiler collection to FreeBSD, it has been necessary for us to have a working version of Mono v4.0.1 on FreeBSD. The version in Ports is on version 3.x, which is getting quite old. So I updated the port Makefile to 4.0.1.28, the most recent available version from the Mono team. The patch is available from here: https://github.com/ajensenwaud/mono4-freebsd-ports/tree/master/mono The patch is attachd to this PR.
(In reply to Anders from comment #0) I forgot to add: The patch file atch-mono_metadata_Makefile.in needs to be removed as part of this. Will do do this manually or do you need it as part of the patch?
Thanks for your patch. I tried it on recent HEAD (amd64) and run into a problem with not finding 'mcs': [..snip..] Making all in runtime gmake[3]: Entering directory '/usr/ports/lang/mono/work/mono-4.0.1/runtime' if test -w /usr/ports/lang/mono/work/mono-4.0.1/mcs; then :; else chmod -R +w /usr/ports/lang/mono/work/mono-4.0.1/mcs; fi cd /usr/ports/lang/mono/work/mono-4.0.1/mcs && gmake --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_5 xbuild_12 xbuild_14 ' CC='cc' all-profiles gmake[7]: mcs: Command not found build/profiles/basic.make:93: recipe for target 'build/deps/basic-profile-check.exe' failed gmake[7]: *** [build/deps/basic-profile-check.exe] Error 127 *** The compiler 'mcs' doesn't appear to be usable. *** Trying the 'monolite' directory. * Assertion at mini-trampolines.c:1360, condition `mono_trampoline_code [tramp_type]' not met Stacktrace: ================================================================= 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. ================================================================= build/profiles/basic.make:93: recipe for target 'build/deps/basic-profile-check.exe' failed gmake[9]: *** [build/deps/basic-profile-check.exe] Abort trap (core dumped) *** The contents of your 'monolite' directory may be out-of-date *** You may want to try 'make get-monolite-latest' build/profiles/basic.make:77: recipe for target 'do-profile-check-monolite' failed gmake[9]: *** [do-profile-check-monolite] Error 1 build/profiles/basic.make:60: recipe for target 'do-profile-check' failed gmake[8]: *** [do-profile-check] Error 2 build/profiles/basic.make:85: recipe for target 'do-profile-check-monolite' failed gmake[7]: *** [do-profile-check-monolite] Error 2 build/profiles/basic.make:60: recipe for target 'do-profile-check' failed gmake[6]: *** [do-profile-check] Error 2 Makefile:44: recipe for target 'profile-do--basic--all' failed gmake[5]: *** [profile-do--basic--all] Error 2 Makefile:40: recipe for target 'profiles-do--all' failed gmake[4]: *** [profiles-do--all] Error 2 Makefile:555: recipe for target 'all-local' failed gmake[3]: *** [all-local] Error 2 gmake[3]: Leaving directory '/usr/ports/lang/mono/work/mono-4.0.1/runtime' Makefile:522: recipe for target 'all-recursive' failed gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory '/usr/ports/lang/mono/work/mono-4.0.1' Makefile:449: recipe for target 'all' failed gmake[1]: *** [all] Error 2 gmake[1]: Leaving directory '/usr/ports/lang/mono/work/mono-4.0.1'
(In reply to Rainer Hurling from comment #2) Could this be because you are running CURRENT? mcs is running alive and well here: freebsd-frankfurt% uname -a FreeBSD freebsd-frankfurt 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0: Tue Apr 7 01:09:46 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 freebsd-frankfurt% mcs --version Mono C# compiler version 4.0.1.0 freebsd-frankfurt% which mcs /usr/local/bin/mcs Not sure about the stack trace below.
(In reply to Anders from comment #3) Thanks for the answer. But this is not my problems. I am in the build process of lang/mono and there is no installed version in /usr/local/bin. The following breaks the build: cd /usr/ports/lang/mono/work/mono-4.0.1/mcs gmake --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_5 xbuild_12 xbuild_14 ' CC='cc' all-profiles gmake[7]: mcs: Command not found
Update committed, thanks!
A commit references this bug: Author: romain Date: Sun May 17 17:05:43 UTC 2015 New revision: 386633 URL: https://svnweb.freebsd.org/changeset/ports/386633 Log: Update to 4.0.1.28 Based on [1]. PR: 200118 [1] Submitted by: anders@jensenwaud.com [1] Changes: head/lang/mono/Makefile head/lang/mono/distinfo head/lang/mono/files/patch-mono_metadata_Makefile.in head/lang/mono/pkg-plist