12

BitBake fails for me because it can't find https://www.example.com.

My computer is an x86-64 running native Xubuntu 18.04. Network connection is via DSL. I'm using the latest versions of the OpenEmbedded/Yocto toolchain.

This is the response I get when I run BitBake:

$ bitbake -k core-image-sato
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
Please ensure your host's network is configured correctly,
or set BB_NO_NETWORK = "1" to disable network access if
all required sources are on local disk.


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

The networking issue, the reason why I can't access www.example.com, is a question for the SuperUser forum. My question here is, why does BitBake rely on the existence of www.example.com? What is it about that website that is so vital to BitBake's operation? Why does BitBake post an Error if it cannot find https://www.example.com?

At this time, I don't wish to set BB_NO_NETWORK = "1". I would rather understand and resolve the root cause of the problem first.

Ray Depew
  • 573
  • 1
  • 9
  • 22

4 Answers4

18

Modifying poky.conf didn't work for me (and from what I read, modifying anything under Poky is a no-no for a long term solution).

Modifying /conf/local.conf was the only solution that worked for me. Simply add one of the two options:

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"

#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""

This solution was originally found here.

bamos
  • 506
  • 4
  • 8
  • 3
    This should be the accepted answer; modifying local.conf is vastly preferred over poky.conf, the latter being difficult to maintain particularly if you're working in a team – Carsten Hansen Mar 12 '20 at 04:17
11

For me, this appears to be a problem with my ISP (CenturyLink) not correctly resolving www.example.com. If I try to navigate to https://www.example.com in the browser address bar I just get taken to the ISP's "this is not a valid address" page.

Technically speaking, this isn't supposed to happen, but for whatever reason it does. I was able to work around this temporarily by modifying the CONNECTIVITY_CHECK_URIS in poky/meta-poky/conf/distro/poky.conf to something that actually resolves:

# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master    
CONNECTIVITY_CHECK_URIS ?= "https://www.google.com/"

See this commit for more insight and discussion on the addition of the www.example.com check. Not sure what the best long-term fix is, but the change above allowed me to build successfully.

montaguk
  • 111
  • 1
  • 2
1

If you want to resolve this issue without modifying poky.conf or local.conf or any of the files for that matter, just do:

$touch conf/sanity.conf

It is clearly written in meta/conf/sanity.conf that:

Expert users can confirm their sanity with "touch conf/sanity.conf"

If you don't want to execute this command on every session or build, you can comment out the line INHERIT += "sanity" from meta/conf/sanity.conf, so the file looks something like this:

meta/conf/sanity.conf

Sachin Mokashi
  • 415
  • 5
  • 17
1

Had same issue with Bell ISP when accessing example.com gave DNS error. Solved by switching ISP's DNS IP to Google's DNS (to avoid making changes to configs):
https://developers.google.com/speed/public-dns/docs/using

AlBaZ
  • 36
  • 4