Jump to content
  • 0

Petalinux-Zybo-Z7-20 project fails to build and fetch components




I have a problem quite similar to the one discussed in "Petalinux-Zybo-Z7-20 project doesn't build".

I followed exactly all suggestions posted here and inside the Xilinx documentation, in brief:

All libraries are been installed, bash as shell, a brand new 16.04.3 LTS ubuntu (even tried twice to be sure) .

I tried to create the project by the BSP and/or cloning the repo.

I even tried the suggestion posted in "Petalinux-Zybo-Z7-20 project doesn't build", but nothing is changed.

I have errors and fetches failures:

Many like these ones:


ERROR: pkgconfig-0.29.1+gitAUTOINC+87152c05be-r0 do_populate_sysroot_setscene: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
 *** 0002:do_populate_sysroot_setscene(d)
File: '/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/classes/staging.bbclass', lineno: 238, function: do_populate_sysroot_setscene
     0234:do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/"
     0235:do_populate_sysroot[stamp-extra-info] = "${MACHINE}"
     0237:python do_populate_sysroot_setscene () {
 *** 0238:    sstate_setscene(d)
     0240:addtask do_populate_sysroot_setscene
File: '/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/classes/sstate.bbclass', lineno: 659, function: sstate_setscene
     0655:            break
     0657:def sstate_setscene(d):
     0658:    shared_state = sstate_state_fromvars(d)
 *** 0659:    accelerate = sstate_installpkg(shared_state, d)
     0660:    if not accelerate:
     0661:        bb.fatal("No suitable staging package found")
     0663:python sstate_task_prefunc () {
File: '/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/classes/sstate.bbclass', lineno: 327, function: sstate_installpkg
     0323:        bb.build.exec_func(f, d, (sstateinst,))
     0325:    for state in ss['dirs']:
     0326:        prepdir(state[1])
 *** 0327:        os.rename(sstateinst + state[0], state[1])
     0328:    sstate_install(ss, d)
     0330:    for plain in ss['plaindirs']:
     0331:        workdir = d.getVar('WORKDIR', True)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/pkgconfig/0.29.1+gitAUTOINC+87152c05be-r0/sstate-install-populate_sysroot/sysroot-destdir' -> '/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/pkgconfig/0.29.1+gitAUTOINC+87152c05be-r0/sysroot-destdir'

WARNING: Logfile for failed setscene task is /home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/pkgconfig/0.29.1+gitAUTOINC+87152c05be-r0/temp/log.do_populate_sysroot_setscene.4795
WARNING: Setscene task (/opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot_setscene) failed with exit code '1' - real task will be run instead


and some fetch failures:

NOTE: Tasks Summary: Attempted 960 tasks of which 955 didn't need to be rerun and 4 failed.

Summary: 4 tasks failed:
Summary: There were 5 WARNING messages shown.
Summary: There were 60 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project


for  last ones i tried to change the git configuration for https but nothing in changed..


Anyone can help me? I spent an entire day trying anything ... I'm quite desperate  :)



Link to comment
Share on other sites

12 answers to this question

Recommended Posts


I followed all indications for Petalinux-Zybo-Z7-20 (and some hints see here around):  Petalinux 2017.4 , Brand new Ubuntu 16.04.3 LTS (VM in virtualbox) in details:

After I created the VM i added all required libraries:


sudo -s

apt-get install tofrodos gawk xvfb git libncurses5-dev tftpd zlib1g-dev zlib1g-dev:i386 \ libssl-dev flex bison chrpath socat autoconf libtool texinfo gcc-multilib \ libsdl1.2-dev libglib2.0-dev screen pax


-------------------- ALL OK

sudo -s

apt-get install tftpd-hpa chmod a+w /var/lib/tftpboot/


-------------------- ALL OK

sudo -s

mkdir -p /opt/pkg/petalinux chown <your_user_name> /opt/pkg/ chgrp <your_user_name> /opt/pkg/ chgrp <your_user_name> /opt/pkg/petalinux/ chown <your_user_name> /opt/pkg/petalinux/



cd ~/Downloads

./petalinux-v2017.4-final-installer.run /opt/pkg/petalinux

----------------- ALL OK

I changed dash to bash as default terminal (to avoid the warning about the bash terminal) : sudo dpkg-reconfigure dash

and set the enviroment variables: source /opt/pkg/petalinux/settings.sh

--------------- ALL OK (No warning related to NO BASH)

git clone --recursive https://github.com/Digilent/Petalinux-Zybo-Z7-20.git

------------------- ALL OK


---------- THIS IS THE POINT I HAVE ALL ERRORS -----------------

Note: If I create the project by the BDS release file using : petalinux-create -t project -s <path to .bsp file>  i had the same errors.

I tried even other projects and all behave similarly.

I even added the git --- config to manage https in place of http but nothing  changed.

If i try to clone reps manually the address works with http to.

I noticed before every error few seconds of process stopped for the digilent reps (probably because try to load the rep) instead with the linaro_lib all data is downloaded but the task is marked as failed.





Link to comment
Share on other sites

hello @MauroChimenti,

2 hours ago, MauroChimenti said:

git clone --recursive https://github.com/Digilent/Petalinux-Zybo-Z7-20.git 

------------------- ALL OK 

2 hours ago, MauroChimenti said:

I even added the git --- config to manage https in place of http but nothing  changed. 

I have had no issues cloning the repo, but I am working with Ubuntu natively.


2 hours ago, MauroChimenti said:

 I noticed before every error few seconds of process stopped for the digilent reps (probably because try to load the rep) instead with the linaro_lib all data is downloaded but the task is marked as failed. 

14 hours ago, MauroChimenti said:

Summary: 4 tasks failed:
Summary: There were 5 WARNING messages shown.

Did you checkout your submodules?

On 6/13/2018 at 1:31 AM, fandrei said:

So, the problem with "Please set a MACHINE in your local.conf or environment" was that I didn't check out submodules of the Petalinux-Zybo-Z7-20 project. ?
And then, back to the first question: how do I make the Petalinux-Zybo-Z7-20 project work with PetaLinux 2018.1, what modifications are required?

Link to comment
Share on other sites


I was just supposing that  git clone --recursive .... should create a complete repository cloning with all subreps ready to be used.

What does it mean "Set a MACHINE in you local.conf"? I have to specify what kind of board or zynq a have, or what else?

I just checked under  Petalinux-Arty-Z7-20/Arty-Z7-20/project-spec/meta-user/recipes-apps/digilent-apps/ and I have :

gpioutil  kmsdemo  libgpio  libpwm  libuio  libvrc  pwmdemo

but they aren't git reps , only one file inside them, the same related to the error.

example : /Petalinux-Arty-Z7-20/Arty-Z7-20/project-spec/meta-user/recipes-apps/digilent-apps/libpwm/libpwm.bb

so I have all 3 lib*.bb file  and I have  : /opt/pkg/petalinux/components/yocto/source/arm/layers/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-6.2.bb

Anyway for all them Petalinux tries to download them and fails.

Any possibile wrong configuration with petalinux-config?


Now i tried some different configurations: limiting at 1 thread and job the something is changed.

I just reset teh build state with:

petalinux-build -c u-boot -x distclean

petalinux-build -x mrproper

and now many errors are disappered.

Onlly the last one about linario is still present:

The repos is downloaded but failes something inside it ..


WARNING: gcc-source-linaro-6.2-linaro-6.2-r2016.11 do_fetch: Failed to fetch URL git://git.linaro.org/toolchain/gcc.git;protocol=https;branch=linaro-local/releases/linaro-6.2-2016.11, attempting MIRRORS if available
ERROR: gcc-source-linaro-6.2-linaro-6.2-r2016.11 do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-RfFQQEf0o9"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export GIT_SSL_CAINFO="/opt/pkg/petalinux/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/etc/ssl/certs/ca-certificates.crt"; export PATH="/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/opt/pkg/petalinux/components/yocto/source/arm/layers/core/scripts:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/x86_64-linux/usr/bin/arm-xilinx-linux-gnueabi:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/plnx_arm/usr/bin/crossscripts:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/x86_64-linux/usr/sbin:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/x86_64-linux/usr/bin:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/x86_64-linux/sbin:/home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/sysroots/x86_64-linux/bin:/opt/pkg/petalinux/components/yocto/source/arm/layers/core/scripts:/opt/pkg/petalinux/components/yocto/source/arm/layers/core/bitbake/bin:/opt/pkg/petalinux/components/yocto/source/arm/sysroots/x86_64-petalinux-linux/usr/bin:/opt/pkg/petalinux/components/yocto/source/arm/buildtools/sysroots/x86_64-petalinux-linux/usr/bin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/bin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/sbin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/bin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/sbin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/bin/../x86_64-petalinux-linux/bin:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/bin/arm-xilinx-linux-gnueabi:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/bin/arm-xilinx-linux-uclibc:/opt/pkg/petalinux/components/yocto/source/arm/tmp/sysroots/x86_64-linux/usr/bin/arm-xilinx-linux-musl:/opt/pkg/petalinux/tools/common/petalinux/utils:/opt/pkg/petalinux/tools/linux-i386/petalinux/bin:/opt/pkg/petalinux/tools/linux-i386/petalinux/bin/unexport:/opt/pkg/petalinux/tools/hsm/bin:/opt/pkg/petalinux/tools/webtalk/bin:/opt/pkg/petalinux/tools/linux-i386/petalinux/bin:/opt/pkg/petalinux/tools/common/petalinux/bin:/opt/pkg/petalinux/tools/linux-i386/gcc-arm-none-eabi-r5/bin:/opt/pkg/petalinux/tools/linux-i386/microblaze-xilinx-elf/bin:/opt/pkg/petalinux/tools/linux-i386/microblazeel-xilinx-linux-gnu/bin:/opt/pkg/petalinux/tools/linux-i386/gcc-arm-none-eabi/bin:/opt/pkg/petalinux/tools/linux-i386/gcc-arm-linux-gnueabi/bin:/opt/pkg/petalinux/tools/linux-i386/aarch64-none-elf/bin:/opt/pkg/petalinux/tools/linux-i386/aarch64-linux-gnu/bin:/home/mauro/bin:/home/mauro/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"; export HOME="/home/mauro"; LANG=C git -c core.fsyncobjectfiles=0 fetch -f --prune --progress https://git.linaro.org/toolchain/gcc.git refs/*:refs/* failed with exit code 128, output:
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository

ERROR: gcc-source-linaro-6.2-linaro-6.2-r2016.11 do_fetch: Fetcher failure for URL: 'git://git.linaro.org/toolchain/gcc.git;protocol=https;branch=linaro-local/releases/linaro-6.2-2016.11'. Unable to fetch URL from any source.
ERROR: gcc-source-linaro-6.2-linaro-6.2-r2016.11 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/tmp/work-shared/gcc-linaro-6.2-r2016.11/temp/log.do_fetch.8647
ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-linaro-toolchain/recipes-devtools/gcc/gcc-source_linaro-6.2.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 132 tasks of which 131 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
Summary: There was 1 WARNING message shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project




Link to comment
Share on other sites


After have studied all logs i noticed that the main problem is related to the site 'http://www.author.xilinx.com/sswreleases/rel-v2017.4/downloads/" 

First petalinux tries to download 'http://www.author.xilinx.com/sswreleases/rel-v2017.4/downloads/git2_git.linaro.org.toolchain.gcc.git.tar.gz, but it fails and after tries other mirrors .

If I disable network access (in yocto petalinux-config) i have another error:

 gcc-source-linaro-6.2-linaro-6.2-r2016.11 do_fetch: Network access disabled through BB_NO_NETWORK (or set indirectly due to use of BB_FETCH_PREMIRRORONLY) but access requested with command /usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /home/mauro/Projects/Petalinux-Arty-Z7-20/Arty-Z7-20/build/downloads 'http://www.author.xilinx.com/sswreleases/rel-v2017.4/downloads/git2_git.linaro.org.toolchain.gcc.git.tar.gz' (for url None)

So this file is needed.

Any help to localte this file: 'http://www.author.xilinx.com/sswreleases/rel-v2017.4/downloads/git2_git.linaro.org.toolchain.gcc.git.tar.gz".

Do i have a dns problem? because I cant even reach www.author.xilinx.com?



Link to comment
Share on other sites


K, so it looks like you got the fetches for the digilent-apps working. 

Can you provide project-spec/configs/config for your project? I just want to make sure the URLs in it have not been modified somehow. Typically the tools reach out to petalinux.xilinx.com, so I find the author.xilinx.com domain suspicious. I can't access it either (in a browser). I also want to check your TMPDIR setting.

Are you using a VPN or any other service that might be playing with your connection? Also, is your petalinux project (or the entire VM) on a NFS file server? How many processors and how much RAM have you allocated to your VM? Last, how much disk space have do you have free on your VM, and on the disk which your VM resides?

Most problems like this boil down to a unique host system setup, or a dirty project. To clean your petalinux project completely, just try manually deleting all folders except the project-spec folder. Also, delete the meta-plnx-generated folder.

Link to comment
Share on other sites


Looking into the failure logs simply www.author.xilink.com is the last of tens mirrors tried, but the first one is the petalinux.xilinix.com.

The issue seems not related to the project, because i tried many different projects and all have the same behaviour.

More: I even tried to verify the installation and the system. using different petalinux versions with a xilinx reference project (xilinx-zc702) all in the same ubuntu 16.04.4 LTS and i had:

version 2018.2 project xilinx-zc702 built successfully, version 2018.1 project xilinx-zc702 built successfully, version 2017.4 xilinx-zc702 fails,  version 2017.3 xilinx-zc702 fails.

The project Petalinux-Arty-z7-20 is exaclty the one checked out from the digilent repo (but i tried the Zybo and the z7-10 too), note: if I try to build it with the 2018.2 all fetches are done correctly but i have an aspected failure for kernel_insanity.

I create three new Virtual Box VM, the first two using the iso directly downloaded from the ubuntu site and the last one a vdi image from os boxes under rpickeri's suggestion .

I linked sh->bash and even tried to link sh.distrib->bash and static-sh->bash

I'm not inside any VPN or strange connection. I even tried on one  other computer and another internet provider. I'm very close to give up.

I'm sure i missed something in the sys configuration  out of the project, or really now the xilinx remote links for the 2017 releases have problems and you all don't see the issue because already have cached all files locally.



Link to comment
Share on other sites


I restarted again.with a new VM this time with an Ubuntu 16.04.1 LTS, all configuration steps done without any error.

Always the same results.

In attachment the project conf file (Arty-Z7-20) cloned from the digilent repos. I attached even my printev because i'm sure the issue is related to something outside the project, for example enviroment vars or lib releaseas.

I'm able to ping petalinux.xilinx.org, git://github.com/digilent/,  git://git.linaro.org/

I think something related to the url with some vars inside example: PETALINUX_VER=2017.4  --> CONFIG_PRE_MIRROR_URL="http://petalinux.xilinx.com/sswreleases/rel-v${PETALINUX_VER}/downloads".

But all i see seems correct :(




Link to comment
Share on other sites

K, so it looks like you have it nailed down to petalinux 2017.4 not working on your system (since the xilinx-zc702 also seems to fail). Also, whatever issue you are running into seems to have been resolved in 2018.1. I don't like punting people to other places, but at this point I'd recommend reaching out on the Xilinx forums and seeing what they have to say. You should also try opening a support ticket with them. The fact that it seems to have been fixed in 2018.1 suggests that someone over there knows what is going on. Be sure to provide error.txt to them.

We can keep trying here too... It looks like yocto has generated an invalid git command for the 5 repos that throw errors. The command tries to fetch a remote branch directly onto the current branch, which is not allowed. Perhaps the git repo is in a different state than yocto expects for some reason.

Another possibility is that your git configuration is not compatible with the version of yocto present in 2017.4. Can you provide ~/.gitconfig, and any other git configuration files you might have on your system (you might want to strip them of personal info, your call)? Also, what version of git are you using?


Link to comment
Share on other sites


I tried to upgrade python3 and git, but nothing is changed:

Actually I have:

python3.5      3.5.2-2ubuntu0 amd64          Interactive high-level object-oriented lang

git                   1:2.7.4-0ubunt amd64          fast, scalable, distributed revision contro

The global git config is surely a clean empty one, because the VM is brand new (uhmm .. an empty git global config could be the issue).

The global and system git configuration were empty. I created a base configuration but nothing is changed.

--------------- .gitconfig ----------------------------------

        name = Mauro Chimenti
        email = mauro.chimenti@gmail.com


I'm sure the issue is little configuration detail somewhere.

In the Xilinx forum, just like here, no one reported my issue and all describe the same steps i did. I started from a brand new VM (several times), so I really don't understand what I missed.

If I try to build the Arty-z7-20 project with the 2018.2 (or 2018.1) petalinux version, i see all fetches go ahead correctly, compile 99% and finally stops with an expected insanity kernel error. All version older than 2018.1 fails (i tried 2017.4, 2017.3, 2017.2 and 2016.4)


dpkg list.txt

Link to comment
Share on other sites


After about a week of total disperation I discovered the reason of the issue.

I have  fast internet line about 100 Mbits and 5 ms ping.

The reason of the  build failure in related to the speed or better at the very slow ping. I really don't understand why but more Ilimit the speed or increase the ping up to 100ms the issue disappers.

Actually a simply limited the VM Eth port with a netem rule:

sudo tc qdisc add dev enp0s3 root netem delay 100ms


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...