Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does BitBake error if it can't find www.example.com?

Tags:

yocto

bitbake

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.

like image 410
Ray Depew Avatar asked Sep 18 '18 22:09

Ray Depew


3 Answers

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.

like image 89
bamos Avatar answered Nov 08 '22 00:11

bamos


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.

like image 20
montaguk Avatar answered Nov 08 '22 00:11

montaguk


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

like image 1
Sachin Mokashi Avatar answered Nov 08 '22 01:11

Sachin Mokashi