Ckan: Compile error on Manjaro

Created on 14 Aug 2019  路  20Comments  路  Source: KSP-CKAN/CKAN

Hi, i'm trying to update to 1.26.4-1 from AUR on my Manjaro install.
However it fails to build with:

MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
Error parsing solution file at /tmp/trizen-termy/ckan/src/CKAN-1.26.4/CKAN.sln: Invalid Image
An error occurred when executing task 'Restore-Nuget'.

The CKAN.sln file seems to match the one here, so i must assume an error on your side and not in the pkgbuild/AUR?

Build Linux

Most helpful comment

Builds fine with msbuild-stable for me. Same error as above without it. Using Arch linux

All 20 comments

What version of Mono do you have?

What command did you run to get that error?

Mono is at 5.20.1.19
I use trizen as an AUR-Helper, so "trizen -S ckan"

From what i can tell download, checksum and unpack work fine.
Here's the full output:

=> Erstelle Paket: ckan 1.26.4-1 (Mi 14 Aug 2019 19:22:54 CEST)
==> Pr眉fe Laufzeit-Abh盲ngigkeiten...
==> Pr眉fe Buildtime-Abh盲ngigkeiten...
==> Empfange Quellen...
  -> ckan-1.26.4.tar.gz gefunden
==> 脺berpr眉fe source Dateien mit sha256sums...
    ckan-1.26.4.tar.gz ... Durchgelaufen
==> Entpacke Quellen...
  -> Entpacke ckan-1.26.4.tar.gz mit bsdtar
==> Entferne existierendes $pkgdir/ Verzeichnis...
==> Beginne build()...
Alle in "packages.config" aufgef眉hrten Pakete sind bereits installiert.
The assembly 'Cake.SemVer, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' 
is referencing an older version of Cake.Core (0.26.1).                                                                                                                                                                                                       
For best compatibility it should target Cake.Core version 0.33.0.                                                                                                                                                                                            

----------------------------------------
Setup
----------------------------------------

========================================
Restore-Nuget
========================================
MSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.
Error parsing solution file at /tmp/trizen-termy/ckan/src/CKAN-1.26.4/CKAN.sln: Invalid Image
An error occurred when executing task 'Restore-Nuget'.

----------------------------------------
Teardown
----------------------------------------

Jenkins is refusing to work a simple fix and keeps reporting the                                                                                                                                                                                             
build as broken. 3 different people are trying to figure out why                                                                                                                                                                                             
NetKAN reports an error and calls a fourth one to come check it out.                                                                                                                                                                                         

"licence" is misspelled                                                                                                                                                                                                                                      

    -- Daz NetKAN#3159                                                                                                                                                                                                                                       

Error: One or more errors occurred. (NuGet: Process returned an error (exit code 1).)
        NuGet: Process returned an error (exit code 1).
==> FEHLER: Ein Fehler geschah in build().
    Breche ab...
:: Unable to build ckan - makepkg exited with code: 4

This looks relevant: https://github.com/NuGet/Home/issues/7202
And the fixing PR for that issue: https://github.com/NuGet/NuGet.Client/pull/2891

That PR commit is included in NuGet 5.3.0.6103+.

The issue says, this occurs if only xbuild, not msbuild is installed.

@politas 's most recent message on Discord was "I'm off to bed now, after wrestling to update the AUR version of CKAN", so maybe he can figure this out.

@Termuellinator can you give us the output of msbuild /version?
If that says something with Xbuild, I highly suspect it's the mentioned issue.

It's not released yet :/
https://www.nuget.org/downloads

@DasSkelett i don't have msbuild installed - is it a dependency?
I assume this is the right msbuild?

It looks like it :smile:
MSBuild is the build tool by Microsoft to build .NET software.
Mono normally ships both MSBuild and it's own implementation of it, XBuild (which is deprecated by now IIRC but works still fine most of the time).

However, some distros exclude msbuild from the mono package, since it's quite difficult to build from source (or wasn't even possible at all until recently).

So on those distros, we (and other .NET projects) / mono are relying on XBuild.

And before building, NuGet, a package manager for .NET, scans the solution file (CKAN.sln) to find the project files (*.csproj) which make up the individual parts of the software, using an MSBuild / XBuild API.

And to access this API, NuGet needs to find either the MSBuild.dll or XBuild.dll, preferring MSBuild, with fallback XBuild.

And there is the bug in NuGets code, it should find XBuild, but it doesn't.


So since it can take quite some time until NuGet 5.3.0 will be finally released, it might be best and easiest to install MSBuild instead.

That linked one looks good, you can try it.

Builds fine with msbuild-stable for me. Same error as above without it. Using Arch linux

@DasSkelett Now that's what i call an exhaustive explanation - thank you :D

I can confirm that it builds with msbuild-stable.
And i see telans already requested adding it as a dependency in AUR ^^

Great. Thank you both for testing.

I'll add a note in our Arch wiki page (which needs some work anyhow).

Oh, bugger. It built fine for me. I guess because I had already installed msbuild in order to test the Net-Core PR. I'll see if I can fix the PKGBUILD

Ok, added msbuild as a build dependency to the AUR PKGBUILD. @Termuellinator , can you remove msbuild-stable and try building again?

msbuild installs fine, and ckan builds fine with the updated PKGBUILD

You should probably change the pkgrel so this is pushed as an update

Thanks, @telans , didn't realise how that worked! Done!

i don't think there is a reason to use msbuild instead of msbuild-stable if i don't need the patches that are applied in msbuild for any other package, is there?
As msbuild-stable provides msbuild, the updated AUR-pkbuild still builds fine with msbuild-stable :)

I believe the usual idea is to require the most generic package name.

Issue can be closed, no? At the moment the supplied build script (PKGBUILD) is successful due to added dependency

Yeah i think so - if we can remember to remove it again when nuget 5.3 is released ^^

Was this page helpful?
0 / 5 - 0 ratings