UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
14,060 Views
Registered: ‎04-18-2017

[Petalinux 2017.2] Failed to source bitbake

Jump to solution

Hello,

 

I have just installed Petalinux in my home folder without using root. The directory where it is installed is /home/myuser/petalinux so I am also not using uppercase letters. The installation seems to be ok. I also created a folder in my home (without sudo) called petalinux_prjts. So, I went into the folder and executed `petalinux-create -t project -s ~/Downloads/avnet-digilent-zedboard-v2017.2-final.bsp`. This also seems to worked. But when I try to build it petalinux-build I get an error saying that it `Failed to source bitbake`and `Failed to build project`.

 

Checking other threads they recommend not to install petalinux with sudo, which is what I did the first time in /opt. After I read this, I deleted the folder /opt/Petalinux (with sudo rm -rf). Besides, now that it is installed in my home folder, I am also sourcing the settings.sh file from /home/myuser/petalinux/settings.sh.

 

What could be the issue that it cannot source bitbake?

 

Thank for the help.

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
17,637 Views
Registered: ‎04-18-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I have just testede version 2017.3 on a clean ubuntu installation and everything worked fine. I sourced:

 

/home/user/Xilinx/Petalinux/settings.sh
/home/user/Xilinx/Petalinux/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux

Thanks for all the help / suggestions.

0 Kudos
18 Replies
Moderator
Moderator
14,011 Views
Registered: ‎12-04-2016

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

Hi

 

I did not get this correctly:-

 I also created a folder in my home (without sudo) called petalinux_prjts.

 

Try changing its name to petalinux-prjts

 

 

Best Regards

Shabbir

0 Kudos
Visitor uscmule
Visitor
13,998 Views
Registered: ‎09-27-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I have pretty much the same problem.

My petlinux is installed as a normal user in /opt

 

I created a project with:

petalinux-create --type project --template zynq -s /opt/bsps/xilinx-zc702-v2017.2-final.bsp --name petatest1

 

The config with:

petalinux-config --oldconfig
[INFO] generating Kconfig for project

[INFO] oldconfig project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to config project.

 

 

petalinux-build produces the same output

 

Any help would be appreciated!

0 Kudos
Explorer
Explorer
13,982 Views
Registered: ‎04-18-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution
It seems that it is not a path naming issue. It does not matter how the folders are called, it is the same thing.

There might bi something wrong with bitbake as it cannot be sourced. Even if I type bitbake I get that it is an unknown command.

I saw that in petalinux's folder I should have components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux. I do not have the `environment-setup-aarch64-xilinx-linux` folder. Perhaps this is the reason? bitbake has not even been installed on my system.
0 Kudos
Explorer
Explorer
13,978 Views
Registered: ‎04-18-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I just tested petalinux 2016.4 and besides sourcing the setting.sh script, I also sourced /opt/pkg/petalinux/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux and /opt/pkg/petalinux/components/yocto/source/arm/environment-setup-cortexa9hf-neon-xilinx-linux-gnueabi and I was able to build the project. Still, I could not reproduce this on petalinux 2017.2. Therefore, for now I should switch to 2016.4 until a solution is found.

 

Hopefully someone has been through the same issue and has solved it.

0 Kudos
Moderator
Moderator
13,967 Views
Registered: ‎09-12-2007

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I have documented the flow I used to install Petalinux on my VM. This might be helpful

0 Kudos
Visitor uscmule
Visitor
13,947 Views
Registered: ‎09-27-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

You chown the /opt directory for a non-privileged user, but then note that the installer should be run as root.... why?

0 Kudos
Visitor uscmule
Visitor
13,849 Views
Registered: ‎09-27-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I created an ubuntu 16.04 lts vm as your instructions describe, and am now able to build petalinux. So, thanks for the help.

 

It seems unreasonable that the same build did not work in debian stretch.

 

Is there anyway you guys can release a docker image of the petalinux install to avoid this type of "works on my machine" configuration issue?

0 Kudos
Xilinx Employee
Xilinx Employee
13,719 Views
Registered: ‎05-24-2012

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I saw the same error message in my build today.  In my case, I ran petalinux-config to add a user layer and had a problem in the path.  I looked at the build.log file which pointed to the problem.  Once I fixed the problem, petalinux-build worked fine.  The error message is unfortunate because the problem is not really with "can not source bitbake".  In any case, take a look at your log file and fix any problems indicated in the file and see if your problem goes away.

0 Kudos
Explorer
Explorer
17,638 Views
Registered: ‎04-18-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I have just testede version 2017.3 on a clean ubuntu installation and everything worked fine. I sourced:

 

/home/user/Xilinx/Petalinux/settings.sh
/home/user/Xilinx/Petalinux/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux

Thanks for all the help / suggestions.

0 Kudos
10,511 Views
Registered: ‎12-17-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

It seems to be related to default version of python aliased by /usr/bin/python.  I'm on Ubuntu 17.10 and I started with this:

 

lukasz@workstation:~/projects/petalinux/first$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to build project

 

when my default python was set to:

 

 

lukasz@workstation:~$ which python
/home/lukasz/anaconda3/bin/python

when switched to python 2, bitbake was successfully located and the build went on. 

 

 

One of the ways to temporarily set python 2 as the default is described here - https://stackoverflow.com/a/7237949 

 

 

 

Moderator
Moderator
10,498 Views
Registered: ‎04-24-2017

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

Hi @lukaszlaszko,

 

We don't support Ubuntu-17. 

 

Refer UG1144 pasge 8 for more details.

 

Also https://www.xilinx.com/support/answers/69372.html has package list you can install the sw packages.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Visitor venturezhao
Visitor
10,177 Views
Registered: ‎03-14-2018

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

Hi, guys. I also meet this problem and fixed it just now. The reason caused such problem is version mismatch of python. Please make sure your default python is 2.xx. Then the 'petalinux-config' works well.

0 Kudos
Visitor venturezhao
Visitor
10,169 Views
Registered: ‎03-14-2018

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

Hello. Yes, I also find that it is the problem of default version of python. Moreover, it is not the link of '/usr/bin/python'. Instead it depends on the environment configuration of python.

 

For me, I use anaconda and virtualenv of conda. So it is no need to change the default version of python, just change the current shell into virtualenv of python=2.7. Then the petalinux works well.

0 Kudos
Contributor
Contributor
8,601 Views
Registered: ‎09-18-2018

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

I had this problem with Ubuntu 18.04, PetaLinux Tools 2018.2.

For me, the problem was related to an issue in the installer preventing the necessary software from being installed.

The shim from this post seemed to fix it for me. ("PetaLinux 2018.1 Install Fails on Debian Stretch"), however, I needed to leave it in place indefinitely.

 

Also, be careful moving the installation folder after you've installed petalinux. There are a few hard-coded paths in various folders that could get confused if you try, for example, moving petalinux from ~/ to /opt/.

Visitor philippos
Visitor
7,040 Views
Registered: ‎06-08-2018

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

Same error with Petalinux 2018.2 on Fedora Linux 28

The problem was related to a missing package and you can find this information by running devtool after sourcing

/home/user/Xilinx/Petalinux/components/yocto/source/aarch64/environment-setup-aarch64-xilinx-linux

Contributor
Contributor
5,500 Views
Registered: ‎10-29-2018

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

after i uninstall Anaconda it works.
i hope it worls also for you if you try it.

0 Kudos
Observer eliezer
Observer
4,616 Views
Registered: ‎03-21-2019

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution

For me, I experienced this issue after migrating my petalinux project to a new user. 

petalinux-build -x mrproper

this cleaned the project enough that when I tried petalinux-build again, the problem was solved.

0 Kudos
Observer eliezer
Observer
4,363 Views
Registered: ‎03-21-2019

Re: [Petalinux 2017.2] Failed to source bitbake

Jump to solution


Another thing that caused this was having incorrect characters in local.conf.

I had copy-pasted "

INHIBIT_PACKAGE_STRIP = “1”

"

from a document, and the quotation marks were fancy ones instead of the default quotation marks. The build process did not recognize those characters, so retyping in actual quotes fixed that.

0 Kudos