Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-dotnet/buildtools-1.0.27-r1 build failed #378

Closed
soredake opened this issue Feb 3, 2018 · 11 comments
Closed

dev-dotnet/buildtools-1.0.27-r1 build failed #378

soredake opened this issue Feb 3, 2018 · 11 comments

Comments

@soredake
Copy link

soredake commented Feb 3, 2018

buildlog.zip

@ArsenShnurkov
Copy link
Collaborator

ArsenShnurkov commented Feb 3, 2018

buildlog.zip

see also dotnet/sdk#987 (comment)

differences i found in logs:

  1. /usr/lib vs /usr/lib64
  2. Mono, Version 5.9.0.398 vs Mono, Version 5.11.0.132

@Riey
Copy link

Riey commented Mar 1, 2019

It's look like mono only search gac for /usr/lib but Newtonsoft.Json install in /usr/lib64 (profile 17.1?)

ln -sf /usr/lib64/mono/gac/Newtonsoft.Json /usr/lib/mono/gac/Newtonsoft.Json

help me compile buildtools

@fluffynuts
Copy link

I've had to do the same for System.Collections.Immutable after linking for Newtonsoft.Json, and I'm getting new errors (posting here in case it's related, otherwise I can open a new issue):

lots of these:

The type or namespace name 'ITaskItem' could not be found (are you missing a using directive or an assembly reference?)                                  

and

The type or namespace name 'Output' could not be found (are you missing a using directive or an assembly reference?) 

this is now coming from dev-dotnet/msbuild-defaulttasks-15.3-r3, which I know is not the original package referenced here -- it's just the next step I'm stuck on. Any assistance appreciated.

and a few others. Does anyone have an idea what I'm doing wrong?

@ArsenShnurkov
Copy link
Collaborator

Does anyone have an idea what I'm doing wrong?

You making a mistake of assuming that someone else should do the world better for you. Dotnet in gentoo is not working, and will not be in the near future (2019-2020). Because no one dedicate himself to resolve all problems. Debian is in much better position, because it have more people in team.

@fluffynuts
Copy link

That may or may not be the case, but, speaking from a position of having chosen Ubuntu on my work machine (dual-boot) because I expected .net support to be better: the only thing that's better is msbuild (and there's a nice script in /usr/bin for easy invocation).
Other than that, I have no choice about my init system, I have to struggle to build other things because I have to make educated guesses at which *-dev packages I need to build something, and the default install is not at all geared towards what I always considered to be the heart of the Linux community: developers. There's no git or headers by default.
And even bigger: despite the fact that the patch was not accepted upstream to the Linux mainline and despite the fact that there are easier ways to compromise a secure-boot machine, Ubuntu will not let me hibernate on my secure-boot machine (company policy: dual-boot windows must have bitlocker).

Ubuntu takes away my freedoms. Gentoo does not.

I used Debian or a derivative (Ubuntu, Linux Mint) for over 16 years before switching to Gentoo because those distros force me to use systemd and pulseaudio, two over-complex, fragile systems which, if I don't need them, I don't want on my system. I had to use PA for bluetooth headphones on my laptop when I initially installed Gentoo there, but that's just because I couldn't get the alternative to work, and at least it was a choice I could make based on my environment and requirements, not a choice made for me.

I don't think it's a mistake to think that someone else would do a better job than me; however, I'm starting to think that I should learn a lot more, step up and try to help, instead of just asking questions.

@ArsenShnurkov
Copy link
Collaborator

ArsenShnurkov commented Jul 29, 2019

for this particular bug, i propose to check your profile. Probably it is 17.1 (see #398 ).
eselect profile list

In this version of profile the directories layout was changed and mono became more broken than before.

@fluffynuts
Copy link

fluffynuts commented Jul 29, 2019

For anyone who is interested, I had to make the following symlinks:

/usr/lib/mono/gac/System.Collections.Immutable -> /usr/lib64/mono/gac/System.Collections.Immutable
/usr/lib/mono/gac/Microsoft.Build.Utilities.Core/15.3.0.0__0738eb9f132ed756 -> /usr/lib64/mono/gac/Microsoft.Build.Utilities.Core/15.3.0.0__0738eb9f132ed756
/usr/lib/mono/gac/Microsoft.Build.Framework/15.3.0.0__0738eb9f132ed756 -> /usr/lib64/mono/gac/Microsoft.Build.Framework/15.3.0.0__0738eb9f132ed756
/usr/lib/mono/gac/Microsoft.Build/15.3.0.0__0738eb9f132ed756 -> /usr/lib64/mono/gac/Microsoft.Build/15.3.0.0__0738eb9f132ed756                                                                                                             
/usr/lib/mono/gac/Newtonsoft.Json -> /usr/lib64/mono/gac/Newtonsoft.Json
/usr/lib/mono/gac/System.Reflection.Metadata -> /usr/lib64/mono/gac/System.Reflection.Metadata
/usr/lib/mono/gac/Microsoft.Build.Tasks.Core/15.3.0.0__0738eb9f132ed756 -> /usr/lib64/mono/gac/Microsoft.Build.Tasks.Core/15.3.0.0__0738eb9f132ed756

I'm not sure if some of these have to be made "along the way" as the errors were coming out of three packages originally:

dev-dotnet/msbuild-defaulttasks-15.3-r3
dev-dotnet/msbuild-roslyn-csc-15.3-r1
dev-util/msbuild-15.3-r3

(dev-util/msbuild brought in the first two afaik)

In addition, the patch mentioned at #426 is also required.

I've bundled the above symlinks and patch creation into a shell script (gentoo-msbuild-helper.txt)

  • FIRST DOUBLE-CHECK THE CONTENTS OF THE SCRIPT
    • I accept no responsibility for any loss or damage anyone may incur due to running this script. YOU RUN IT AT YOUR OWN PERIL.
  • attempt to install dev-util/msbuild first
    • I'm assuming this is how I got the supporting libraries
  • either exec with /bin/sh (ie /bin/sh gentoo-msbuild-helper.txt) or make executable and run it
  • must obviously be run as root to set up the symlinks and patch file
    • DON'T JUST RUN SCRIPTS YOU FIND ON THE INTERNET:
      • read them
      • if you don't understand them, delete them
      • I re-iterate that I take no responsibility for any mishap resulting from running this script.

As far as I can tell, the links should be for libraries which are already installed, so this script should work well after the first failed attempt to install dev-util/msbuild

One of the links (Microsoft.Build/15.3.0.0__0738eb9f132ed756) is not required to build, but is required at runtime when invoking /usr/bin/msbuild.

@ArsenShnurkov I agree that the source of much of this (barring the patch) is probably due to the new lib layout in profile 17.1, so

  • this is a workaround
  • I'm not staying on the older profile just for mono
  • I hope the time I've spent on this may:
    • help someone else
    • perhaps guide what needs to be fixed for profile 17.1

(updated with safer helper script: I realise that the destination dirs may exist once this is fixed upstream, so ln -sf is a little heavy-handed)

@stvoidmain
Copy link

Thanks, that worked and saved me some time, was building a script to do just that when found yours, thanks a ton!

@soredake soredake closed this as completed Jan 9, 2020
@KingDuckZ
Copy link

KingDuckZ commented Mar 18, 2020

I'm a new user trying to install msbuild and I encountered this same error (among the others). @Riey's solution got me past this error, but why is this issue closed if it's still happening?

Edit: I actually needed all of the symlinks than @fluffynuts posted, and the patch. So none of this is actually fixed.

@TheGreatMcPain
Copy link

TheGreatMcPain commented May 3, 2020

I'm also still getting this error. Using the solution from @Riey got it to build.

EDIT: I also had to do @fluffynuts solution to get msbuild to merge.

@RealAstolfo
Copy link

issue still continues. and now neither of the solutions work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants