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

msbuild fail under opensuse #3580

Closed
red0bear opened this issue Aug 4, 2018 · 32 comments
Closed

msbuild fail under opensuse #3580

red0bear opened this issue Aug 4, 2018 · 32 comments
Labels

Comments

@red0bear
Copy link

red0bear commented Aug 4, 2018

i was trying to compile using last openssl and get this ...

Cannot get required symbol EC_KEY_set_public_key_affine_coordinates from libssl

@rainersigwald
Copy link
Member

Can you provide a bit more detail about what command you were running, and how this error occurs? Ideally in the form of repro instructions.

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

I just resolved this question formatting to more recent version from opensuse. now errors are another one during building. How could i set verbosity compiling to put here ?

@rainersigwald
Copy link
Member

What are you trying to build? The MSBuild repo, or a project of your own?

Can you copy and paste the command line command you're using and its output?

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

here the firstoutput : output_compiling.txt

@rainersigwald
Copy link
Member

/run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/src/Tasks/Microsoft.Build.Tasks.csproj(993,5): error MSB3030: Could not copy the file "/home/felipe/.nuget/packages/netstandard.library/2.0.3/build/netstandard2.0/ref/netstandard.dll" because it was not found.
/run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/src/Tasks/Microsoft.Build.Tasks.csproj(993,5): error MSB3030: Could not copy the file "/home/felipe/.nuget/packages/netstandard.library/2.0.3/build/netstandard2.0/ref/netstandard.dll" because it was not found.
/run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/src/Tasks/Microsoft.Build.Tasks.csproj(993,5): error MSB3030: Could not copy the file "/home/felipe/.nuget/packages/netstandard.library/2.0.3/build/netstandard2.0/ref/netstandard.dll" because it was not found.

Possibly related to https://github.com/Microsoft/msbuild/pull/3528/files#diff-4d3fc7780500131817fceb95ddcea3fe.

@cdmihai What causes NETStandard.Library version 2.0.3 to be restored? AFAIK the implicit reference from our version of the SDK is 2.0.2. But of course it works on our machines and CI . . .

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

what command could i try to solve this ?

@rainersigwald
Copy link
Member

@red0bear Can you try to check out an earlier commit, like d4e8d81 and build that? That would help narrow down whether it's a recently introduced problem.

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

git command to back to that version please.

@rainersigwald
Copy link
Member

git checkout d4e8d81

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

Roger that.

@cdmihai
Copy link
Contributor

cdmihai commented Aug 6, 2018

@cdmihai What causes NETStandard.Library version 2.0.3 to be restored? AFAIK the implicit reference from our version of the SDK is 2.0.2. But of course it works on our machines and CI . . .

AFAIK it happens magically in the SDK: https://github.com/dotnet/sdk/blob/fd24f4b3df6d4839b03f0481677743ccf0d816b8/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.props#L38-L46

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

Seems tests doesn't pass .... output_compiling.txt

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

second one ...
output_compiling.txt

@rainersigwald
Copy link
Member

Can you share the .log files that are mentioned in the warnings?

XUnit : warning : /run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/build/../artifacts/2/Debug/TestResults/Microsoft.Build.Utilities.UnitTests_netcoreapp2.0_x64.log [netcoreapp2.0|x64] [/run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj]
XUnit : warning : /run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/build/../artifacts/2/Debug/TestResults/Microsoft.Build.Utilities.UnitTests_netcoreapp2.1_x64.log [netcoreapp2.1|x64] [/run/media/felipe/FFCOSTA/PROGRAMAS/msbuild/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj]

There should also be a .xml file with the same base name next to each of them; that would also be helpful.

@red0bear
Copy link
Author

red0bear commented Aug 6, 2018

right here Microsoft.Build.zip

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

Some progress there ? Im curious .

@rainersigwald
Copy link
Member

The error is

    Microsoft.Build.UnitTests.ToolTask_Tests.FindOnPathSucceeds [FAIL]
      Shouldly.ShouldAssertException : "/usr/bin/sh"
          should be with options: Ignoring case
      "/bin/sh"
          but was not
          difference
      Difference     |       |    |    |         |    |    |    |    |    |   
                     |      \|/  \|/  \|/       \|/  \|/  \|/  \|/  \|/  \|/  
      Index          | 0    1    2    3    4    5    6    7    8    9    10   
      Expected Value | /    b    i    n    /    s    h                        
      Actual Value   | /    u    s    r    /    b    i    n    /    s    h    
      Expected Code  | 47   98   105  110  47   115  104                      
      Actual Code    | 47   117  115  114  47   98   105  110  47   115  104  
      Stack Trace:
           at Shouldly.ShouldBeStringTestExtensions.ExecuteAssertion(IAssertion assertion, Func`1 customMessage)
        /_/src/Utilities.UnitTests/ToolTask_Tests.cs(690,0): at Microsoft.Build.UnitTests.ToolTask_Tests.FindOnPathSucceeds()

So it looks like your machine (or maybe just opensuse in general) has /usr/bin before /bin in PATH, and the test is broken for that case. It'd probably be better for the test to compare against the output of which sh instead of hardcoding /bin/sh as the expected result.

We'd happily take such a fix if you're interested in contributing it.

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

But i need to set this path ? i wish to test here then.

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

here in /etc/shells

/bin/ash
/bin/bash
/bin/csh
/bin/dash
/bin/false
/bin/ksh
/bin/ksh93
/bin/mksh
/bin/pdksh
/bin/sh
/bin/tcsh
/bin/true
/bin/zsh
/usr/bin/csh
/usr/bin/dash
/usr/bin/ksh
/usr/bin/ksh93
/usr/bin/mksh
/usr/bin/passwd
/usr/bin/pdksh
/usr/bin/bash
/usr/bin/tcsh
/usr/bin/zsh
/usr/bin/fish

@rainersigwald
Copy link
Member

What's echo $PATH say?

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

/sbin:/bin:/usr/sbin:/usr/bin root

/usr/local/bin:/usr/bin:/bin: user

@rainersigwald
Copy link
Member

That user path confirms my suspicion.

The failing test does

https://github.com/Microsoft/msbuild/blob/5b306279d417df77c2434a881660b5fcf4a1f266/src/Utilities.UnitTests/ToolTask_Tests.cs#L684-L690

But with your PATH, that's not correct.

As I mentioned, we'd gladly take a patch for that, or you can ignore this test failure for now.

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

So if i ignore tests this will pass ..... good to know. Just more one question. To compile and execute msbuild projects under linux do you have a good wiki to suggest ?

@rainersigwald
Copy link
Member

Are you interested in building this repo, or code of your own?

Docs for our repo are at https://github.com/Microsoft/msbuild/blob/master/documentation/wiki/Building-Testing-and-Debugging-on-.Net-Core-MSBuild.md#unix

For the more generic case, I would recommend the .NET Core docs at https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial.

Or do you have a specific thing you're trying to do?

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

I wish to compile this project to test: https://github.com/BigBitsYouTube/BitMEXAssistant/tree/master/BitMEXAssistant

@red0bear
Copy link
Author

red0bear commented Aug 7, 2018

the problem to me is where is dotnet is built and msbuild ..... or dotnet have already msbuild on line command. .....

@rainersigwald
Copy link
Member

You don't generally need to build dotnet or MSBuild if you just want to build some .NET code. I would start with the openSUSE installation instructions at https://www.microsoft.com/net/learn/get-started-with-dotnet-tutorial, which will get you a working copy of MSBuild that you can use to build projects.

I took a quick look at that project, though, and I'm not sure it's .NET Core compatible. It may only build on Windows at the moment.

@red0bear
Copy link
Author

red0bear commented Aug 8, 2018

The problem i have opensuse leap 15.0 ........ you still on 42.2

@rainersigwald
Copy link
Member

Oh, I see. https://github.com/dotnet/core-setup/issues/4413 may be related.

You can download a tarball of the .NET Core SDK from https://www.microsoft.com/net/download/dotnet-core/2.1.

@red0bear
Copy link
Author

@rainersigwald , sorry for not respond ... im busy here too.

Well i see msbuild have a good potential . But i think people should use cmake with big structures to compile. I have been looking around and people make things too much hard to people today. Well i see good effort to make easy to build ... but the big question is what tool to build big things to do the hard work easy ?

The dotnet2.1 fails to build the simple program because dependencies. Well i will keep watching guys your work. ;-)

@red0bear
Copy link
Author

I did it but with ./build.sh -skipTests ... i build good. but i need know where msbuild stay and a simple example.

@rainersigwald
Copy link
Member

Should be fixed by #6055.

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

No branches or pull requests

4 participants