Skip to content
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

Can't build on macOS Sierra #643

Closed
d12frosted opened this issue Sep 22, 2016 · 12 comments
Closed

Can't build on macOS Sierra #643

d12frosted opened this issue Sep 22, 2016 · 12 comments
Assignees

Comments

@d12frosted
Copy link

Hey,

Just tried to build omnisharp on macOS Sierra 10.12 and run into multiple errors. I saw similar issue on other projects and if I understand the problem correctly, this must be fixed on project level.

Problem

$ git rev-parse HEAD
3d943b4f5b21ce97667a0be06b8110e63c6456ec

$ ./build.sh
Feeds used:
  /Users/d12frosted/.local/share/NuGet/Cache
  /Users/d12frosted/.nuget/packages/
  https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
  https://api.nuget.org/v3/index.json

All packages listed in /Users/d12frosted/Developer/Other/omnisharp-roslyn/scripts/packages.config are already installed.
Analyzing build script...
Processing build script...
Installing addins...
Compiling build script...

========================================
Cleanup
========================================
Executing task: Cleanup
Finished executing task: Cleanup

========================================
BuildEnvironment
========================================
Executing task: BuildEnvironment
dotnet-install: .NET SDK version 1.0.0-preview2-003121 is already installed.
dotnet-install: Adding to current process PATH: /Users/d12frosted/Developer/Other/omnisharp-roslyn/.dotnet. Note: This change will be visible only when sourcing script.
dotnet-install: Installation finished successfully.
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
Feeds used:
  https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
  https://api.nuget.org/v3/index.json

Package "xunit.runner.console.2.2.0-beta2-build3300" is already installed.
Finished executing task: BuildEnvironment

========================================
PopulateRuntimes
========================================
Executing task: PopulateRuntimes
Finished executing task: PopulateRuntimes

========================================
Setup
========================================
Executing task: Setup
Finished executing task: Setup

========================================
Restore
========================================
Executing task: Restore
Restoring packages....
Package restore successful!
Restoring packages....
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample06/src/Project2/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample06/tests/Test1/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestUtility/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample07/tests/Test1/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample07/src/Project1/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample07/src/Project2/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample07/src/Project2/Embed/project.json...
log  : Restoring packages for /Users/d12frosted/Developer/Other/omnisharp-roslyn/tests/TestSamples/ProjectSearchSample06/src/Project2/Embed/project.json...
error: System.Diagnostics.Process 4.1.0 provides a compile-time reference assembly for System.Diagnostics.Process on .NETCoreApp,Version=v1.0, but there is no run-time assembly compatible with osx.10.12-x64.

...

Full log can be found here.

Oh, and just to make this report more interesting, here is screenshot that made my day. I wasn't ready for this 💃 😸

screenshot 2016-09-22 18 04 53

P. S. Sorry if it's actually not related to Omnisharp.

@willl
Copy link
Member

willl commented Sep 22, 2016

You'll probably need to change this line to osx.10.12-x64.

@d12frosted
Copy link
Author

@willl

Thanks for suggestion. But still doesn't work. I also tried to build on clean repository (so it downloaded some required tools / libs) with that change in project.json file. Here is new output (52.3 Mb and buffer has 202401 lines, 8321969 words, and 54891506 characters 😸).

@DustinCampbell
Copy link
Contributor

@d12frosted, @wjk: Could you try PR #642? Does that address the problem. I'm a bit nervous about updating to Sierra myself to see if it fixes it.

@DustinCampbell
Copy link
Contributor

Ah -- I see why it's failing. We didn't specify a RID in build.cake on OSX: https://github.com/OmniSharp/omnisharp-roslyn/blob/dev/build.cake#L118

@DustinCampbell
Copy link
Contributor

I think I've got a fix for this here: #644. It'd be great if somebody could pull that change and try it out.

@DustinCampbell
Copy link
Contributor

It looks like we also do a "dotnet restore --infer-runtimes" for tests in https://github.com/OmniSharp/omnisharp-roslyn/blob/dev/build.cake#L172-L183, which will certainly break on macSierra.

@wjk
Copy link

wjk commented Sep 23, 2016

@DustinCampbell Replacing dotnet restore --infer-runtimes with just plain dotnet restore causes the restore to succeed, but then the BuildTest target fails with the following message:

Can not find runtime target for framework '.NETCoreApp,Version=v1.0' compatible with one of the target runtimes: 'osx.10.12-x64'. Possible causes:
1. The project has not been restored or restore failed - run `dotnet restore`
2. The project does not list one of 'osx.10.12-x64' in the 'runtimes' section.
3. You may be trying to publish a library, which is not supported. Use `dotnet pack` to distribute libraries.

@DustinCampbell
Copy link
Contributor

Yeah, "default" keeps getting threaded through various steps in the build process. I've updated to macSierra and am working through the issues.

@DustinCampbell
Copy link
Contributor

OK. #644 should fix this now.

@d12frosted
Copy link
Author

@DustinCampbell thank you for suggestions. I will try those PRs today in the evening. And I'll let you know about results.

I'm a bit nervous about updating to Sierra myself to see if it fixes it.

Now I am a bit nervous about doing update as well 😸 💃

@DustinCampbell
Copy link
Contributor

@d12frosted: No worries. #644 does fix the build.

@d12frosted
Copy link
Author

@DustinCampbell indeed. Thanks for a quick solution! 💃 ❤️

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

No branches or pull requests

4 participants