dotnet 1.0.0.001833 fails to find an SDK on RHEL
Steps to reproduce
This is on RHEL (but I expect the problem exists elsewhere). Download and unpack dotnet-combined-framework-sdk-host-rhel-x64.latest.tar.gz and then try to run ./dotnet help
Expected behavior
Help is displayed.
Actual behavior
[matell@matell-rhel temp]$ ./dotnet help
--- Executing in muxer mode...
Could not resolve SDK directory from [/home/matell/temp]
If you make a softlink in the sdk folder named -1.-1.-1 and point it at 1.0.0-beta-001833 then things get a little further, but things are still pretty messed up (and we are looking for a .dll?!)
[matell@matell-rhel temp]$ ./dotnet help
--- Executing in muxer mode...
Could not find dotnet.dll at [/home/matell/temp/sdk/-1.-1.-1/dotnet.dll]
Environment data
dotnet --version output:
Even this doesn't work ;-)
[matell@matell-rhel temp]$ cat .version
2044bccea16af3960137bb9dd910bf1f0f0a63a1
1.0.0.001833
/cc @schellap
I'm seeing this on Windows, with the same build.
C:\dotnet>dotnet.exe --help
--- Executing in muxer mode...
Could not find dotnet.dll at [C:\dotnet\sdk\1.0.0-beta-001833\dotnet.dll]
dotnet.dll is present at that location.
Fixed by dotnet/cli#1927
I broke this during some logging and refactoring work I did yesterday. Got a fix issued, sorry guys, I will add some tests now that we have everything in place.
@schellap Even with the above fix (778e63a5a6d99f7df47f8e67f4c7fe6f88309d97 1.0.0.001842), I'm still seeing an error unless my SDK folder has a symlink named -1.-1-.-1 to the real SDK:
[matell@matell-rhel temp]$ COREHOST_TRACE=1 ./dotnet help
Tracing enabled
--- Invoked host main = {
./dotnet
help
}
Exists /home/matell/temp/dotnet.dll
Checking if CoreCLR path exists=[/home/matell/temp/libcoreclr.so]
Host operating in Muxer mode
Considering fxr dir=[/home/matell/temp/dotnethost/fxr]...
Considering fxr dir=[/home/matell/temp/dotnethost/fxr]...
Resolved fxr [/home/matell/temp/libhostfxr.so]...
Tracing enabled
--- Executing in muxer mode...
--- Resolving dotnet from working dir
Probing path [/home/matell/temp/global.json] for global.json
Probing path [/home/matell/global.json] for global.json
Probing path [/home/global.json] for global.json
Terminating global.json search at []
--- Resolving SDK version from SDK dir [/home/matell/temp/sdk]
Considering version... [.]
Considering version... [..]
No production version found, so using latest prerelease
Checking if resolved SDK dir [/home/matell/temp/sdk/-1.-1.-1] exists
Resolved SDK dir is []
Found CLI SDK in:
Could not resolve SDK directory from [/home/matell/temp]
[matell@matell-rhel temp]$
Expected?
ls /home/matell/temp/sdk/ why is it only probing . .. inside sdk.
[matell@matell-rhel temp]$ ls -l /home/matell/temp/sdk
total 16
drwxr-xr-x. 2 matell matell 12288 Mar 17 13:12 1.0.0-beta-001842
[matell@matell-rhel temp]$
unsure if this strace output will be helpful
openat(AT_FDCWD, "/home/matell/temp/sdk", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 3 entries */, 32768) = 88
stat("/home/matell/temp/sdk/1.0.0-beta-001842", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
getdents(3, /* 0 entries */, 32768) = 0
write(2, "Considering version... [.]", 26) = 26
write(2, "\n", 1) = 1
write(2, "Considering version... [..]", 27) = 27
write(2, "\n", 1) = 1
write(2, "No production version found, so "..., 55) = 55
write(2, "\n", 1) = 1
write(2, "Checking if resolved SDK dir [/h"..., 68) = 68
write(2, "\n", 1) = 1
stat("/home/matell/temp/sdk/-1.-1.-1", 0x7fff3dde38d0) = -1 ENOENT (No such file or directory)
write(2, "Resolved SDK dir is []", 22) = 22
write(2, "\n", 1) = 1
write(2, "Found CLI SDK in: ", 18) = 18
write(2, "\n", 1) = 1
write(2, "Could not resolve SDK directory "..., 56) = 56
write(2, "\n", 1) = 1
exit_group(151) = ?
This is fixed now. Thanks @schellap !