Problem compiling EventStore on Ubuntu 14.10 x86

Hi all,

I have just pulled down the latest code version from git and I am trying to compile EventStore on Ubuntu 14.10 x86.

Mono version running is:

XBuild Engine Version 12.0

Mono, Version 3.2.8.0

To compile I run:

$ ./build.sh full 3.0.1 x86

and what I get is:

Project “/home/antonio/git/EventStore/src/EventStore.sln” (default target(s)):

Target ValidateSolutionConfiguration:

Building solution configuration “release|Any CPU”.

Target Build:

Project “/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj” (default target(s)):

Target PrepareForBuild:

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

Task “Message” execution – FAILED

Done building target “PrepareForBuild” in project “/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj”.-- FAILED

Target _RecordCleanFile:

: error : Error initializing task ReadLinesFromFile: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

Task “ReadLinesFromFile” execution – FAILED

Done building target “_RecordCleanFile” in project “/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj”.-- FAILED

Done building project “/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj”.-- FAILED

Project “/home/antonio/git/EventStore/src/EventStore.ClientAPI/EventStore.ClientAPI.csproj” (default target(s)):

Target BeforeBuild:

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

Task “Message” execution – FAILED

Done building target “BeforeBuild” in project “/home/antonio/git/EventStore/src/EventStore.ClientAPI/EventStore.ClientAPI.csproj”.-- FAILED

Done building project “/home/antonio/git/EventStore/src/EventStore.ClientAPI/EventStore.ClientAPI.csproj”.-- FAILED

Project “/home/antonio/git/EventStore/src/esquery/esquery.csproj” (default target(s)):

Target PrepareForBuild:

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

Task “Message” execution – FAILED

Done building target “PrepareForBuild” in project “/home/antonio/git/EventStore/src/esquery/esquery.csproj”.-- FAILED

Target _RecordCleanFile:

: error : Error initializing task ReadLinesFromFile: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

Task “ReadLinesFromFile” execution – FAILED

Done building target “_RecordCleanFile” in project “/home/antonio/git/EventStore/src/esquery/esquery.csproj”.-- FAILED

Done building project “/home/antonio/git/EventStore/src/esquery/esquery.csproj”.-- FAILED

Task “MSBuild” execution – FAILED

Done building target “Build” in project “/home/antonio/git/EventStore/src/EventStore.sln”.-- FAILED

Done building project “/home/antonio/git/EventStore/src/EventStore.sln”.-- FAILED

Build FAILED.

Errors:

/home/antonio/git/EventStore/src/EventStore.sln (default targets) ->

(Build target) ->

/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj (default targets) ->

/usr/lib/mono/4.5/Microsoft.Common.targets (PrepareForBuild target) ->

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

/home/antonio/git/EventStore/src/EventStore.sln (default targets) ->

(Build target) ->

/home/antonio/git/EventStore/src/EventStore.Common/EventStore.Common.csproj (default targets) ->

/usr/lib/mono/4.5/Microsoft.Common.targets (_RecordCleanFile target) ->

: error : Error initializing task ReadLinesFromFile: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

/home/antonio/git/EventStore/src/EventStore.sln (default targets) ->

(Build target) ->

/home/antonio/git/EventStore/src/EventStore.ClientAPI/EventStore.ClientAPI.csproj (default targets) ->

(BeforeBuild target) ->

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

/home/antonio/git/EventStore/src/EventStore.sln (default targets) ->

(Build target) ->

/home/antonio/git/EventStore/src/esquery/esquery.csproj (default targets) ->

/usr/lib/mono/4.5/Microsoft.Common.targets (PrepareForBuild target) ->

: error : Error initializing task Message: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

/home/antonio/git/EventStore/src/EventStore.sln (default targets) ->

(Build target) ->

/home/antonio/git/EventStore/src/esquery/esquery.csproj (default targets) ->

/usr/lib/mono/4.5/Microsoft.Common.targets (_RecordCleanFile target) ->

: error : Error initializing task ReadLinesFromFile: Could not load file or assembly ‘Microsoft.Build.Tasks.v4.0’ or one of its dependencies. The system cannot find the file specified.

0 Warning(s)

5 Error(s)

Sorry for bugging you with compiling problems but I am not really into Mono/.NET so I would like to know if there is a way to fix this.

Thanks

Antonio

Why are you building x86? Also upgrade to 3.10 mono

I am trying to run EStore with:
./run-node.sh --db…

but it looks like:

$ file clusternode

clusternode: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=e27786203e1b669b8a4dfe4e0a6bfc2616409f4d, not stripped

and unfortunately I am on Ubuntu 14.10 32-bit at the moment, so I am trying to compile it for my env.

I have upgraded mono to 3.10:

$ xbuild /version

XBuild Engine Version 12.0

Mono, Version 3.10.0.0

Copyright © 2005-2013 Various Mono authors

Just pulled down the code and run again “./build.sh full 3.0.1 x86”.

Mono it was turning warning messages to errors. I am not sure how to change the “build config” to avoid this so I just changed the code in:

src/EventStore.ClientAPI/Common/Log/FileLogger.cs

So I commented out from the file the following lines:

11: //private readonly string _filename

16: //_filename = filename;

and:

Helpers/TestFixtureWithExistingEvents.cs(424,69): error CS0429: Warning as Error: Unreachable expression code detected

so I changed the line 424 from src/EventStore.Core.Tests/Helpers/TestFixtureWithExistingEvents.cs into:

var tfPos = new TFPos(eventRecord.position + 50, eventRecord.position);

//var tfPos = new TFPos(commitPosition ?? eventRecord.position + 50, eventRecord.position);

and the compiling succeed.

Anyway I couldn’t find the “clusternode” binary anywhere, so I just run:

EventStore/bin/clusternode$ mono EventStore.ClusterNode.exe

and it looks working fine.

Thanks