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

Build fails on Linux #1397

Closed
cnblogs-dudu opened this issue Mar 13, 2015 · 7 comments
Closed

Build fails on Linux #1397

cnblogs-dudu opened this issue Mar 13, 2015 · 7 comments
Assignees
Milestone

Comments

@cnblogs-dudu
Copy link

Change #!/bin/sh to #!/usr/bin/env bash in build.sh and build on Ubuntu. But get the following failure.

Determining latest version
Latest version is 1.0.0-beta4-11268
dnx-mono.1.0.0-beta4-11268 already installed.
Cannot find dnx-mono.1.0.0-beta4-11268, do you need to run 'dnvm install 1.0.0-beta4-11268'?
info: Target default
info: Target pre-clean
info: Target target-dir-clean
info: Target build-clean
info: Target clean
info: Target post-clean
info: Target validate
info: Target restore-npm-modules
info: Target restore-bower-components
info: Target run-grunt
info: Target repo-initialize
info: Exec
info:   program: kpm
info:   commandline: restore
info:   workingdir: src/Microsoft.Framework.ApplicationHost
warn: ApplicationName='kpm', CommandLine='restore', CurrentDirectory='src/Microsoft.Framework.ApplicationHost', Native error= Cannot find the specified file
verbose: Stack trace: 
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__12 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__5 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__6 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__7 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].StartingTarget (System.String name) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__8 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at View5dd5fdc359be45c5a09589b332b45939+<RenderViewLevel0>c__AnonStorey3.<>m__0 () [0x00000] in <filename unknown>:0 
  at Sake.Engine.Builder.BuilderBase`1[System.Object].CallTarget (System.String name) [0x00000] in <filename unknown>:0 
  at Sake.Engine.SakeEngine.Execute (Sake.Engine.Options options) [0x00000] in <filename unknown>:0 
  at Sake.Engine.SakeEngine.Execute (System.String[] args) [0x00000] in <filename unknown>:0 
  at Sake.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
@glennc glennc added the bug label Mar 13, 2015
@glennc glennc added this to the 1.0.0 milestone Mar 13, 2015
@suhasj
Copy link
Contributor

suhasj commented Mar 13, 2015

@cnblogs-dudu On the shell if you run dnx --version what is the output ?

@cnblogs-dudu
Copy link
Author

@suhasj If use #!/bin/sh, get the following output.

./build.sh: 31: ./build.sh: source: not found
./build.sh: 35: ./build.sh: dnvm: not found

@suhasj
Copy link
Contributor

suhasj commented Mar 14, 2015

sure it is preferable if you use bash. From the error looks like the installation of dnx mono was not as expected. How did you install dnx ?

@cnblogs-dudu
Copy link
Author

@suhasj
dnx --version gets No command 'dnx' found. I follow these steps:

  • git clone DNX repo
  • install mono
  • run ./build.sh

mono --version gets Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)

@davidfowl
Copy link
Member

/cc @troydai @victorhurdugaci

@cnblogs-dudu
Copy link
Author

From stackoverflow answer:

/bin/sh is usually some other shell trying to mimic The Shell. Many distributions use /bin/bash for sh, it supports source. On Ubuntu, though, /bin/dash is used which does not support source. If you cannot edit the script, try to change the shell which runs it.

@muratg muratg modified the milestones: 1.0.0, 1.0.0-beta5 Mar 20, 2015
@davidfowl
Copy link
Member

I see this too on ubuntu:

./build.sh: 31: ./build.sh: source: not found

davidfowl added a commit that referenced this issue Mar 31, 2015
- Changed #!bin/sh to #!bin/bash
#1397
@davidfowl davidfowl assigned davidfowl and unassigned suhasj Mar 31, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants