-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.IO.EndOfStreamException: Failed to read past end of stream when building on FreeBSD #2844
Comments
This is a bug in Mono 4.0 and is fixed in later versions (i.e. you need to build Mono from source right now). |
@akoeplinger, the bugfix you mentioned, by any chance it was fixed with mono-4.0.1.44? @ajensenwaud, can you try building with latest mono release version? Note that the Linux Instructions in wiki is recently updated: https://github.com/dotnet/roslyn/wiki/Linux-Instructions. |
This is https://bugzilla.xamarin.com/show_bug.cgi?id=30171 and it is fixed in 4.0.1.44 I have managed to compile C# compiler! it only does not work :) |
@saper, thanks for the update! Were you also able to compile VB compiler in addition to C# (csc && vbc)?
Yes we are advancing one step at a time! 😃 |
Next stop: #1102 (it hangs on |
copying @mmitche for prospective FreeBSD CI configuration :) I am able to compile csc.exe and successfully execute Hello World! app on FreeBSD 10.1 x86 (and ia64).
# installed some packages
pkg install bash nano cmake libunwind gettext llvm37 gmake git autoconf libtool automake
# you need mono to build mono! :)
pkg update -f
pkg install mono
# it's basically you need mcs to build mcs in mono..
# built Mono
mkdir ~/projects
git clone https://github.com/mono/mono ~/projects/mono
# that's right, all @jaredpar's patches are already in mono v4.0.2+
# so Linux build instructions for Roslyn are kind of outdated.
cd ~/projects/mono
ln -s /usr/local/bin/clang37 /usr/local/bin/clang
ln -s /usr/local/bin/clang++37 /usr/local/bin/clang++
setenv CC /usr/local/bin/clang
setenv CXX /usr/local/bin/clang++ then running I had to apply this PR'd patch by @saper to mono: mono/mono#1870 (not sure why that is pending!). Then: ./autogen.sh
bash
gmake
gmake install
mono -V
# => v4.0.3
exit #bash
git clone https://github.com/dotnet/roslyn ~/projects/roslyn
cd ~/projects/roslyn
mozroots --import --machine --sync
echo "Y" | certmgr -ssl https://go.microsoft.com
echo "Y" | certmgr -ssl https://nugetgallery.blob.core.windows.net
echo "Y" | certmgr -ssl https://nuget.org
# if certmgr commands give error then run them without `echo "Y" |` and
# enter Y manually after each one..
curl http://storage.bos.xamarin.com/bot-provisioning/PortableReferenceAssemblies-2014-04-14.zip \
-o ../pcl.zip
unzip ../pcl.zip; rm ../pcl.zip
cp -r PortableReferenceAssemblies-2014-04-14 /usr/local/lib/mono/xbuild-frameworks/.NETPortable
rm -r PortableReferenceAssemblies-2014-04-14
nano ./cibuild.sh and comment out line 236 => ./cibuild.sh will build the binaries in === TEST EXECUTION SUMMARY ===
Roslyn.Compilers.VisualBasic.Syntax.UnitTests.dll Total: 3863, Failed: 0, Skipped: 23
mkdir ~/projects/roslyn/Binaries/Debug/test
nano ~/projects/roslyn/Binaries/Debug/test/hello.cs add using System;
public class Program
{
public static void Main (string[] args)
{
Console.WriteLine("Hello World!");
}
} then nano ~/projects/roslyn/Binaries/Debug/test/packages.config and add: <?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Console" version="4.0.0-beta-22703" />
<package id="System.Runtime" version="4.0.20-beta-22703" />
</packages> Restored packages, compiled and ran hello.exe: cd ~/projects/roslyn/Binaries/Debug/test/
mono ../../../.nuget/NuGet.exe restore -Source https://www.myget.org/F/dotnet-corefx/ -PackagesDirectory .
mono ../csc.exe /nostdlib /noconfig /r:System.Console.4.0.0-beta-22703/lib/contract/System.Console.dll /r:System.Runtime.4.0.20-beta-22703/lib/contract/System.Runtime.dll hello.cs
mono hello.exe
# prints:
# Hello World! |
I think @migueldeicaza is warming up to have Roslyn as the C# compiler for Mono. |
That will only make things better for everyone. Interim codegen disparities will be gone and more issues/shortcomings of Roslyn will be identified and fixed! 👍 I have updated my previous comment. Tested on ia64 as well: Hello World! succeeds and all tests are passing as well ! At this point I think we need to add build instructions for Roslyn in docs (but I think it pre-requires updating the existing cross-platform instructions.. which points to script that are Ubuntu-centric and arranged differently.. rather than mere sequence of commands straight away.. copy other FreeBSD folks: @josteink, @ghuntley, @janhenke, @khellang, @tony (got a lot of help from your CoreCLR instructions for FreeBSD Tony!), @wizardbeard & @qbit. |
Why have I become one of the "FreeBSD folks"? 😝 |
EEEEeee you are not?? It's probably the price we pay to get involved in FreeBSD related PRs in any of the dotnet repos.. jk 😄 |
Certainly it would be a great thing to have Roslyn on FreeBSD as well. Before adding it to the official instructions though, I would like to fix the points you mentioned. It should work out of the box without having to compile all the build dependencies yourself. As far as I see the first step would be to get current Mono point release into ports? @ajensenwaud do you know the status of that? |
FWIW, Roslyn as the C# compiler in Mono is definitely a goal: http://tirania.org/blog/archive/2015/Jul-21.html |
mono/mono#1870 is merged! Thanks @kumpera and @saper! 🎉 |
Update: Mono 4.0.3 is available on FreeBSD 10.2 via latest repositories:
and will be widely available in 2015-Q4 ports. @ajensenwaud, this issue can be marked as resolved and closed. We should probably move forward to writing documentation on how to build Roslyn on FreeBSD (or figuring out if there are other build issues such as: ee79b36#commitcomment-13433977). |
@jasonwilliams200OK Thanks for the update. Feel free to tackle writing the docs on building/testing Roslyn on FreeBSD and we'll add it to the wiki or merge it in. |
Hello,
I receive a strange compilation error when attempting to build Roslyn on FreeBSD. I am using the latest Mono build, v.4.0.1.34 on FreeBSD 10.1 (amd64).
See error below:
OS:
Compiler:
Mono version:
The text was updated successfully, but these errors were encountered: