Issue with accessing network from a recipe


Gärding Antti
 

Hi,

 

I am having an issue with a recipe whose do_configure requires network connections and I wonder if this issue could be related to Yocto so that this list would be the correct place to ask for ideas.

 

The problem appears when trying to build dotnet-hello-world which comes with meta-dotnet (https://github.com/jeremy-prater/meta-dotnet). I am not the only one having this issue, but many people, including the layer's author, also report having no problems. Googling gives a lot of suggestions, but as this is related to .NET, all of them are related to Windows / Visual Studio environment and I don't know how to apply them using Yocto.

 

In short, do_configure for dotnet-hello-world invokes the .NET SDK's tool dotnet as a host tool to fetch what is needed to build and run the program. As a part of that, it uses NuGet, the package manager for .NET, which says "error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json".

 

If I modify the recipe so that it tries to curl that file, I get "Could not resolve host: api.nuget.org". If I do the same but use numeric address, I get "Couldn't connect to server".

 

If I run the commands in the recipe manually in the same environment I use for Yocto builds, using .NET SDK I have installed manually, they work.

 

My build environment is Ubuntu 20.04 run inside a Docker container.

 

 

Best regards,

Antti Gärding

Join yocto@lists.yoctoproject.org to automatically receive all group messages.