cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1,695 Views
Registered: ‎08-13-2019

petalinux-build failure

Aloha All,

I have successfully used petalinux-build in the past and my most recent build was yesterday morning where I had no issues.  Yesterday afternoon, during a build, my machine froze and restarted.  I attempted to start over on the build and recieved the following output:

$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
[INFO] generating user layers
INFO: bitbake petalinux-user-image
ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Traceback (most recent call last):
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 979, in check_sanity_eventhandler(e=<bb.event.SanityCheck object at 0x7f476e59dd30>):
             sanity_data = copy_data(e)
    >        check_sanity(sanity_data)
             if e.generateevents:
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 943, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x7f476edc8358>):
         if last_sanity_version < sanity_version or last_nativelsbstr != nativelsbstr: 
    >        check_sanity_version_change(status, sanity_data)
             status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data))
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 637, in check_sanity_version_change(status=<SanityStatus object at 0x7f476edc8278>, d=<bb.data_smart.DataSmart object at 0x7f476edc8358>):
         status.addresult(check_git_version(d))
    >    status.addresult(check_perl_modules(d))
         status.addresult(check_wsl(d))
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 563, in check_perl_modules(sanity_data=<bb.data_smart.DataSmart object at 0x7f476edc8358>):
             except subprocess.CalledProcessError as e:
    >            errresult += e.output
                 ret += "%s " % m
TypeError: Can't convert 'bytes' object to str implicitly

ERROR: Command execution failed: Traceback (most recent call last):
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 561, in check_perl_modules
    subprocess.check_output(["perl", "-e", "use %s" % m])
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['perl', '-e', 'use Text::ParseWords']' returned non-zero exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/command.py", line 113, in runAsyncCommand
    self.cooker.updateCache()
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 1527, in updateCache
    bb.event.fire(bb.event.SanityCheck(False), self.databuilder.mcdata[mc])
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 225, in fire
    fire_class_handlers(event, d)
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 134, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 106, in execute_handler
    ret = handler(event)
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 979, in check_sanity_eventhandler
    check_sanity(sanity_data)
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 943, in check_sanity
    check_sanity_version_change(status, sanity_data)
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 637, in check_sanity_version_change
    status.addresult(check_perl_modules(d))
  File "/opt/pkg/petalinux/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 563, in check_perl_modules
    errresult += e.output
TypeError: Can't convert 'bytes' object to str implicitly


Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

After spending an hour trying to solve the issue, I completely deleted the build and started a new project.  When I tried to build I recieved the same error.  Then I removed petalinux and reinstalled in a new location, setup my environment and reattempted to build.  I GOT THE SAME ERROR.  

 

Equipment:
MSI Trident X Plus 9SE

OS:
Ubuntu 16.04 LTS - kernel 4.15.0-55-generic

Software:
Licensed Xilinx User for Complete Suite
PetaLinux Tools 2019.1

Thanks in advance for your for your time and consideration.  

Very respectfully,

Craig

0 Kudos
9 Replies
longley
Xilinx Employee
Xilinx Employee
1,613 Views
Registered: ‎04-15-2011

Hi, @craig@deathstardev.com

This error is reported by Yocto. Maybe some packages in your OS are damaged. You can try to update or reinstall all necessary packages that need by Petalinux.
Or you can try Petalinux in another PC or server.

Thanks,
Longley
Thanks,

Longley


------------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our
Versal Blogs

------------------------------------------------------------------------------------------------
0 Kudos
watari
Professor
Professor
1,605 Views
Registered: ‎06-16-2013

Hi craig@deathstardev.com 

 

Would you execute the following command to fix disk issue ?

 

$ fsck <your device name>

 

Best regards,

0 Kudos
1,591 Views
Registered: ‎08-13-2019

Thank you for your input. Unfortunately, the way I was able to recover was to format, reinstall the OS, and reinstall all software.  This time, I upgraded to 18.04 LTS. 

Very respectfully,

Craig

0 Kudos
ganwencao
Observer
Observer
1,320 Views
Registered: ‎09-09-2019

我也遇到了与楼主同样的问题。我的环境是ubuntu18.04 + petalinux2019.1。在此环境下我构建了两个项目,一个通过xilinx-zcu104-v2019.1-final.bsp构建的项目,此项目可以正常执行petalinux的所有命令;另一个是通过xilinx-zc702-v2019.1-final.bsp构建的项目。此项目中执行跟内核相关的命令如 petalinux-config -c kernel 或者petalinux-build都会报错,而只执行petalinux-config不会报错。

0 Kudos
ganwencao
Observer
Observer
1,314 Views
Registered: ‎09-09-2019

问题解决了,原因是同时安装了petalinux_sdk和petalinux,petalinux_sdk中的environment-setup-aarch64-xilinx-linux与petalinux/settings.sh 有冲突,屏蔽后就正常了。

BigAl
Visitor
Visitor
1,136 Views
Registered: ‎03-24-2020

The error says that execution failed while attemting to run: perl -e 'use Thread::Queue'

If you run that directly on your command line, you'll see the actual error (which was hidden by Yocto messy error handling).

You'll likely find that the actual error was that Thread::Queue perl module is not installed.

To solve this, install the "Thread::Queue" module.

On my Fedora,I ran: sudo dnf install 'perl(Thread::Queue)'

0 Kudos
Edgar_lemaire2
Observer
Observer
947 Views
Registered: ‎03-04-2020

Hello,

 

Got the exact same problem. I just ran the following commands

sudo apt-get update
sudo apt-get install libthread-queue-any-perl

 And then I was able to build my project without errors

I also started a brand new project, so this might be related too, but I think the most important are the two commands above.

Regards,

 

Edgar

0 Kudos
tbrooks
Observer
Observer
732 Views
Registered: ‎04-08-2019

I had the same problem after doing a petalinux-build -x mrproper -f 

I found perl was completely broken:

doing "perl -de0" caused an error!!

I had to close the terminal I was using, open a new one, source petalinux again, then I was back on track... 

Quite a scary thing to happen!

0 Kudos
ach7al
Newbie
Newbie
123 Views
Registered: ‎08-12-2021

0 Kudos