Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Cannot build DNX on Mac using ./build.sh - System.IO.EndOfStreamException #1761

Closed
iamthemovie opened this issue May 1, 2015 · 5 comments
Closed

Comments

@iamthemovie
Copy link

Not sure if I'm missing something but based on the README in the DNX repo on the dev branch I seem to be getting System.IO.EndOfStreamException: Failed to read past end of stream. Potentially from a missing file?

git clone https://github.com/aspnet/dnx --recursive

then:

cd dnx && ./build.sh

Restores all the NuGet packages and results to the following exception:

screen shot 2015-05-01 at 16 23 21

info: Target initialize
info: Target build-managed-projects
info: Exec
info:   program: dnu
info:   commandline: pack src/dnx.host --configuration Debug
info:   workingdir: /Users/jordanappleson/Documents/Projects/dnx

Building dnx.host for DNX,Version=v4.5.1
  Using Project dependency dnx.host 1.0.0-t150501151506
    Source: /Users/jordanappleson/Documents/Projects/dnx/src/dnx.host/project.json

  Using Project dependency Microsoft.Framework.CommandLineUtils 1.0.0-t150501151506
    Source: /Users/jordanappleson/Documents/Projects/dnx/src/Microsoft.Framework.CommandLineUtils/project.json

  Using Project dependency Microsoft.Framework.Runtime.Common 1.0.0-t150501151506
    Source: /Users/jordanappleson/Documents/Projects/dnx/src/Microsoft.Framework.Runtime.Common/project.json

  Using Project dependency Microsoft.Framework.Runtime.Loader 1.0.0-t150501151506
    Source: /Users/jordanappleson/Documents/Projects/dnx/src/Microsoft.Framework.Runtime.Loader/project.json

  Using Project dependency Microsoft.Framework.Runtime.Interfaces 1.0.0-t150501151506
    Source: /Users/jordanappleson/Documents/Projects/dnx/src/Microsoft.Framework.Runtime.Interfaces/project.json

  Using Assembly dependency framework/System.Runtime 4.0.0.0
    Source: /usr/local/Cellar/mono/4.0.1/lib/mono/4.5/Facades/System.Runtime.dll

  Using Assembly dependency framework/mscorlib 4.0.0.0
    Source: /usr/local/Cellar/mono/4.0.1/lib/mono/4.5/mscorlib.dll

  Using Assembly dependency framework/System 4.0.0.0
    Source: /usr/local/Cellar/mono/4.0.1/lib/mono/4.5/System.dll

  Using Assembly dependency framework/System.Core 4.0.0.0
    Source: /usr/local/Cellar/mono/4.0.1/lib/mono/4.5/System.Core.dll

  Using Assembly dependency framework/Microsoft.CSharp 4.0.0.0
    Source: /usr/local/Cellar/mono/4.0.1/lib/mono/4.5/Microsoft.CSharp.dll

System.IO.EndOfStreamException: Failed to read past end of stream.
  at System.IO.BinaryReader.ReadChar () [0x00000] in :0 
  at Microsoft.CodeAnalysis.CvtResFile.ReadStringOrID (System.IO.BinaryReader fhIn) [0x00000] in :0 
  at Microsoft.CodeAnalysis.CvtResFile.ReadResFile (System.IO.Stream stream) [0x00000] in :0 
  at Microsoft.CodeAnalysis.Compilation.MakeWin32ResourceList (System.IO.Stream win32Resources, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x00000] in :0 
  at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.SetupWin32Resources (Microsoft.CodeAnalysis.CSharp.Emit.PEModuleBuilder moduleBeingBuilt, System.IO.Stream win32Resources, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) [0x00000] in :0 
  at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.CompileImpl (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBuilder, System.IO.Stream win32Resources, System.IO.Stream xmlDocStream, Boolean generateDebugInfo, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Predicate`1 filterOpt, CancellationToken cancellationToken) [0x00000] in :0 
  at Microsoft.CodeAnalysis.Compilation.Compile (Microsoft.CodeAnalysis.Emit.CommonPEModuleBuilder moduleBuilder, System.IO.Stream win32Resources, System.IO.Stream xmlDocStream, Boolean generateDebugInfo, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Predicate`1 filterOpt, CancellationToken cancellationToken) [0x00000] in :0 
  at Microsoft.CodeAnalysis.Compilation.Emit (Microsoft.CodeAnalysis.EmitStreamProvider peStreamProvider, Microsoft.CodeAnalysis.EmitStreamProvider pdbStreamProvider, Microsoft.CodeAnalysis.EmitStreamProvider xmlDocumentationStreamProvider, Microsoft.CodeAnalysis.EmitStreamProvider win32ResourcesStreamProvider, IEnumerable`1 manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, Microsoft.CodeAnalysis.CodeGen.CompilationTestData testData, System.Func`1 getHostDiagnostics, CancellationToken cancellationToken) [0x00000] in :0 
  at Microsoft.CodeAnalysis.Compilation.Emit (System.IO.Stream peStream, System.IO.Stream pdbStream, System.IO.Stream xmlDocumentationStream, System.IO.Stream win32Resources, IEnumerable`1 manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, Microsoft.CodeAnalysis.CodeGen.CompilationTestData testData, System.Func`1 getHostDiagnostics, CancellationToken cancellationToken) [0x00000] in :0 
  at Microsoft.CodeAnalysis.Compilation.Emit (System.IO.Stream peStream, System.IO.Stream pdbStream, System.IO.Stream xmlDocumentationStream, System.IO.Stream win32Resources, IEnumerable`1 manifestResources, Microsoft.CodeAnalysis.Emit.EmitOptions options, CancellationToken cancellationToken) [0x00000] in :0 
  at Microsoft.Framework.Runtime.Roslyn.RoslynProjectReference.EmitAssembly (System.String outputPath) [0x00000] in :0 
  at Microsoft.Framework.PackageManager.ProjectBuilder.Build (System.String name, System.String outputPath) [0x00000] in :0 
  at Microsoft.Framework.PackageManager.BuildContext.Build (System.Collections.Generic.List`1 diagnostics) [0x00000] in :0 
  at Microsoft.Framework.PackageManager.BuildManager.Build () [0x00000] in :0 
  at Microsoft.Framework.PackageManager.Program+<>c__DisplayClass3_3.b__6 () [0x00000] in :0 
  at Microsoft.Framework.Runtime.Common.CommandLine.CommandLineApplication.Execute (System.String[] args) [0x00000] in :0 
  at Microsoft.Framework.PackageManager.Program.Main (System.String[] args) [0x00000] in :0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0 
warn: Exit code 1 from dnu
verbose: Stack trace: 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__25 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__17 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__14 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__6 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__7 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__8 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at View4729eb1c5dcd401e8b96d34c35c5cac2+c__AnonStorey4.<>m__0 () [0x00000] in :0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in :0 
  at Sake.Engine.SakeEngine.Execute (Sake.Engine.Options options) [0x00000] in :0 
  at Sake.Engine.SakeEngine.Execute (System.String[] args) [0x00000] in :0 
  at Sake.Program.Main (System.String[] args) [0x00000] in :0 
@BrennanConroy
Copy link
Member

Are you on Mono 4.0.0 or 4.0.1? This seems to be happening on those versions. 3.12.1 works last I checked.

@iamthemovie
Copy link
Author

Yes 4.0.1.

I tapped into the new DNX homebrew repo yesterday and I believe it's a dependency and upgraded my mono from 3.12 to 4.0.1.

I will double check on 3.12 😄

Thanks!

@davidfowl
Copy link
Member

It's a mono bug. Nothing we can do about this.

@gregbair
Copy link

gregbair commented May 5, 2015

It's apparently fixed in Mono master, but was repro'd by them in 4.0.1 - https://bugzilla.xamarin.com/show_bug.cgi?id=29499

@davidfowl
Copy link
Member

Closing this out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants