uxmal / reko

Reko is a binary decompiler.
https://uxmal.github.io/reko
GNU General Public License v2.0
2.16k stars 253 forks source link

Can't build with xbuild under Linux (Ubuntu 14.04LTS) #247

Closed pfalcon closed 8 years ago

pfalcon commented 8 years ago
Errors:

/mnt/hdd/projects-3rdparty/RevEng/Decompilers/reko/src/Reko-decompiler.sln (default targets) ->
(Build target) ->
/mnt/hdd/projects-3rdparty/RevEng/Decompilers/reko/src/ImageLoaders/Elf/Elf.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

    ElfLoader.cs(74,44): error CS0840: `Reko.ImageLoaders.Elf.ElfLoader.Sections.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors
    ElfLoader.cs(75,66): error CS0840: `Reko.ImageLoaders.Elf.ElfLoader.Symbols.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors
    ElfLoader.cs(76,76): error CS0840: `Reko.ImageLoaders.Elf.ElfLoader.ExternalProcedures.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors

     130 Warning(s)
     3 Error(s)
$ xbuild /version
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
pfalcon commented 8 years ago

It happens both with typoed tag "version-0.6.0,0" and master.

pfalcon commented 8 years ago

Fixing those 3 errors in the code doesn't lead too far:

/mnt/hdd/projects-3rdparty/RevEng/Decompilers/reko/src/Reko-decompiler.sln (default targets) ->
(Build target) ->
/mnt/hdd/projects-3rdparty/RevEng/Decompilers/reko/src/Gui/Gui.csproj (default targets) ->
/usr/lib/mono/4.5/Microsoft.CSharp.targets (CoreCompile target) ->

    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(175,42): error CS0135: `addr' conflicts with a declaration in a child block
    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(175,59): error CS0135: `addr' conflicts with a declaration in a child block
    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(177,39): error CS0135: `addr' conflicts with a declaration in a child block
    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(182,32): error CS0135: `addr' conflicts with a declaration in a child block
    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(183,40): error CS0135: `addr' conflicts with a declaration in a child block
    Windows/Controls/MixedCodeDataModel.SpanGenerator.cs(195,53): error CS0135: `addr' conflicts with a declaration in a child block
uxmal commented 8 years ago

The particular class you're having problems with (MixedCodeDataMode.SpanGenerator.cs) compiles successfully with VStudio 2013, VStudio 2015, MonoDevelop 5.10.1, and the Mono toolchain used by TravisCI (xBuild 12.0, Mono 4.2.3.0; see https://travis-ci.org/uxmal/reko/builds/133095747 for a recent log). It is possible that you may need to upgrade your Mono environment to a later version.

uxmal commented 8 years ago

I've confirmed that I can build on my Ubuntu VM. Mono 4.2.3.0 and xBuild 12.0 again. Let me know if the issue persists after upgrading your toolchain to latest stable.

uxmal commented 8 years ago

...but I will also patch the code so that it will work with older C# compilers that give the error messages you've reported.

uxmal commented 8 years ago

@pfalcon : are you still having problems compiling reko? Please let me know either way.

uxmal commented 8 years ago

Closing this now due to lack of response. I've verified that the build works on at least two Linux machines in different environments. If you still have this problem, please reopen the issue.