Mobius icon indicating copy to clipboard operation
Mobius copied to clipboard

Build.cmd Setup Issues

Open mtcoope opened this issue 7 years ago • 7 comments

I'm new to Mobius and new to Spark as well. I am trying to set up the Build using the instructions but when I run Build.cmd I get a failure due to timeout when it tries to download maven-scala-plugin-2.15.2.pom. Is it possible this is caused because I am behind a proxy in the office?

mtcoope avatar Jun 14 '17 21:06 mtcoope

Does it happen all the time when you try to build?

skaarthik avatar Jun 28 '17 19:06 skaarthik

I am also trying to build and get the following error:

[downloadtools.Unzip-File] Extracting C:\Users\dylan\Downloads\Mobius-2.0.200\build\localmode\..\tools\TarTool.zip to C:\Users\dylan\Downloads\Mobius-2.0.200\build\localmode\..\tools ...
Exception calling "OpenRead" with "1" argument(s): "End of Central Directory record could not be found."
At C:\Users\dylan\Downloads\Mobius-2.0.200\build\localmode\downloadtools.ps1:160 char:5
+     $entries = [IO.Compression.ZipFile]::OpenRead($zipFile).Entries
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidDataException

Exception calling "ExtractToFile" with "3" argument(s): "Value cannot be null.
Parameter name: source"
At C:\Users\dylan\Downloads\Mobius-2.0.200\build\localmode\downloadtools.ps1:166 char:13
+             [IO.Compression.ZipFileExtensions]::ExtractToFile($_, $ta ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentNullException

If I try and extract TarTool.zip manually (Using 7-Zip) it fails so I am thinking that TarTool.zip is corrupt.

This then causes the extraction of apache-maven-3.3.9-bin.tar.gz and spark-2.0.2-bin-hadoop2.6.tgz to fail. I got around this by manually extracting these two archives.

dylangmiles avatar Jul 12 '17 09:07 dylangmiles

@dylangmiles I am not able to repro this issue in my Windows box or in AppVeyor CI build. TarTool could be successfully used to extract files.

Are you building in Developer Command Prompt as recommended at https://github.com/Microsoft/Mobius/blob/master/notes/windows-instructions.md#prerequisites?

skaarthik avatar Jul 14 '17 18:07 skaarthik

@skaarthik I was building from the Mobius-2.0.200 release using the VS2017 developer command prompt when this was happening. It could be that the TarTool.zip was only getting partially downloaded. I have now tried building from the latest version aslo using the VS2017 developer command prompt and the TarTool.zip extracts okay.

I now get an issue with building JsonDataFrame.fsproj:

C:\_server-apps\Mobius\examples\fsharp\JsonDataFrame\JsonDataFrame.fsproj(55,3): error MSB4102: The value "" of the "Pr
oject" attribute in element <Import> is invalid. Parameter "path" cannot have zero length.
===== Build FAILED for C:\_server-apps\Mobius\examples\Examples.sln -- Debug with error 1 - CANNOT CONTINUE =====

To fix this I have changed the following in examples\fsharp\JsonDataFrame\JsonDataFrame.fsproj

<Choose>
  <When Condition="'$(VisualStudioVersion)' == '11.0'">
    <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
      <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
    </PropertyGroup>
  </When>
  <Otherwise>
    <PropertyGroup Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
      <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
    </PropertyGroup>
  </Otherwise>
</Choose>

To:

  <Choose>
    <When Condition="'$(VisualStudioVersion)' != '11.0' and Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')">
      <PropertyGroup>
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets')">
      <PropertyGroup>
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')">
      <PropertyGroup>
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
    <When Condition="Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets')">
      <PropertyGroup>
        <FSharpTargetsPath>$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets</FSharpTargetsPath>
      </PropertyGroup>
    </When>
  </Choose>

dylangmiles avatar Jul 17 '17 09:07 dylangmiles

@dylangmiles - Mobius is not tested yet with VS 2017. Looks like VS project format for fsproj has changed between VS 2015 & 2017.

skaarthik avatar Jul 18 '17 04:07 skaarthik

@skaarthik Thank you! I will work around it for now and can always build in VS2015 if I run into other problems.

dylangmiles avatar Jul 24 '17 13:07 dylangmiles

Hi - I'm having trouble building this too: my problems seem to be around Riosock: I can't build it and I can't seem to bypass it: The build file seems to indicate that it's optional anyway ... but the build process fails to build it and stops. I might be missing something straightforward, but it's got me.

hugo-at-otastech avatar Apr 27 '18 12:04 hugo-at-otastech