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

Need to update document to clarify which linux distro that autorest supports now. #3601

Closed
rollingage opened this issue Oct 2, 2020 · 8 comments

Comments

@rollingage
Copy link

rollingage commented Oct 2, 2020

I'm trying to use autorest on "WSL 2 + ubuntu" (the default version in Windows Store is "Ubuntu 20.04.1 LTS")

Autorest does not work on ubuntu 20.04.1 LTS!

autorest --input-file=petstore.yaml --csharp --output-folder=CSharp_PetStore --namespace=PetStore

... 
No usable version of the libssl was found
FATAL: csharp/simplifier - FAILED
FATAL: Error: [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.
Process() cancelled due to exception : [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.

This forked repository mentioned that autorest supports up to ubuntu 16.04
https://github.com/amarzavery/AutoRest

I tried ubuntu 16.04, and it works, but have to install another package firstly. (it was also mentioned in amarzavery's repo)
sudo apt-get install libunwind8 -y

@daviwil
Copy link
Contributor

daviwil commented Oct 5, 2020

Try running sudo apt install libssl-dev and then try AutoRest again.

@rollingage
Copy link
Author

rollingage commented Oct 5, 2020

@daviwil, thanks for your help, I tried it but got the same error.

AutoRest code generation utility [cli version: 3.0.6247; node: v12.18.4, max-memory: 2048 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/home/dylandev/.autorest/@[email protected]/node_modules/@autorest/core/dist' (3.0.6320)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.90)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55)
realpath(): Permission denied
realpath(): Permission denied
realpath(): Permission denied
No usable version of the libssl was found
Process() cancelled due to failure

Also, there is some annoying info in the log "realpath(): Permission denied", (known issue? I also have it on Ubuntun 16.04 but no issue to get generated code)

I'm wondering how does it used in Microsoft teams, is there anyone use WSL2+Ubuntun latest?

@archanaiyer
Copy link

I'm trying to run the sample in the autorest project here: https://github.com/Azure/autorest/blob/master/docs/examples/generating-a-client.md

I'm seeing the same issue as mentioned above (even after trying to install libssl-dev)

autorest --input-file=petstore.yaml --csharp --output-folder=CSharp_PetStore --namespace=PetStore
AutoRest code generation utility [cli version: 3.0.6247; node: v12.18.4, max-memory: 2048 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
NOTE: AutoRest core version selected from configuration: ~2.0.4413.
   Loading AutoRest core      '/home/ariye/.autorest/@[email protected]/node_modules/@microsoft.azure/autorest-core/dist' (2.0.4417)
   Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.90)
   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55)
realpath(): Permission denied
realpath(): Permission denied
realpath(): Permission denied
No usable version of the libssl was found
FATAL: csharp/simplifier - FAILED
FATAL: Error: [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.
Process() cancelled due to exception : [Exception] AutoRest extension '@microsoft.azure/autorest.csharp' terminated.

Is this a known issue on WSL? What else can I try?

@daviwil
Copy link
Contributor

daviwil commented Oct 19, 2020

Thanks for pointing this out, it seems like the current release of @microsoft.azure/autorest.csharp is built with an older .NET Core SDK which expects libssl 1.0 where Ubuntu 20 has libssl 1.1 installed. More info can be found here: dotnet/runtime#28079.

I'll see if I can get a new build of the generator shipped with a newer update of the SDK.

@lugolven
Copy link

Did someone find a work around for this issue?

@older
Copy link
Contributor

older commented Jan 8, 2021

So are there any plans to update autorest to use LTS version of .NET?

As far as I understand current version of aurorest is using .NET Core SDK 2.0 which has reached end of life more than 2 years ago in 2018 and is not supported by Microsoft any more. So it means that autorest doesn't work on Ubuntu 20.04 which is now default version for WSL2 and in Microsoft hosted agents in Azure DevOps.

@timotheeguerin
Copy link
Member

The newest CSharp generator(v3 - @autorest/csharp) is using dotnet 3.1+ and should resolve this. It is now the default when running autorest. Let me know if you are still having issue on this

@timotheeguerin
Copy link
Member

Closing, please open a new issue if you still have this problem

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

6 participants