[Mono-dev] Building Roslyn on OS X

Jeff Kilpatrick jkilpatrick at tableausoftware.com
Wed Aug 13 00:09:04 UTC 2014


Hey folks,

I’m relatively new to Mono and attempting to build Roslyn on OS X (10.9), but haven’t made much progress. I’m hoping I’m missing something obvious. So here’s what I’ve done:

(1) Noting that a recent build from master is required, build mono from source (from https://github.com/mono/mono):
   a. Install MDK (I’ve also tried wiping the MDK and using make get-monolite-latest; both ways successfully build mono and fail in the same way building Roslyn)
   b. git clone https://github.com/mono/mono.git
   c. ./configure --prefix-/usr/local/mono.git --enable-nls=no
   d. make && make install
   e. add /usr/local/mono.git/bin to front of $PATH

(2) Build Roslyn (from https://github.com/mono/roslyn):
  a. git clone https://github.com/mono/roslyn.git
  c. xbuild Src/Compilers/CSharp/csc/csc.csproj
  d. Get error about missing PCL reference assembiles
  e. Copy assemblies from a Windows box to /usr/local/mono.git/lib/mono/xbuild-frameworks/.NETPortable
  f. xbuild Src/Compilers/CSharp/csc/csc.csproj
  g. Get errors relating to csc2.exe
  h. Apply “Manual changes needed” from README.md Microsoft.Net.ToolsetCompilers.props, which must have been fetched during the last xbuild.
  i. xbuild Src/Compilers/CSharp/csc/csc.csproj
  j. 30 Warning, 5896 Errors

The build log is 2.8M, so I’ll omit it here unless requested, but here are some samples:

(when building CodeAnalysis.Desktop.csproj):
CommandLine/CommonCommandLineArguments.cs(246,168): error CS0122: `Microsoft.CodeAnalysis.DiagnosticInfo' is inaccessible due to its protection level
				/Users/jkilpatrick/sharedLogic/roslyn/Binaries/Debug//Microsoft.CodeAnalysis.dll (Location of the symbol related to previous error)
CommandLine/CommonCommandLineArguments.cs(246,200): error CS0122: `Microsoft.CodeAnalysis.CommonMessageProvider' is inaccessible due to its protection level
…

(when building CSharpCodeAnalysis.csproj):
SymbolDisplay/ObjectDisplay.cs(7,52): error CS0122: `Microsoft.CodeAnalysis.Collections.PooledStringBuilder' is inaccessible due to its protection level
SymbolDisplay/ObjectDisplay.cs(8,35): error CS0122: `Roslyn.Utilities.ExceptionUtilities' is inaccessible due to its protection level
Symbols/Source/SourceAssemblySymbol.cs(16,56): error CS0122: `Microsoft.CodeAnalysis.CommonAssemblyWellKnownAttributeData<TNamedTypeSymbol>' is inaccessible due to its protection level
…

When I dig into these errors, I see that the inaccessible classes are internal and in different assemblies than the ones being built. I’m clearly missing something here. Any ideas?

TIA,
Jeff



More information about the Mono-devel-list mailing list