cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Scholar
Scholar
642 Views
Registered: ‎08-24-2011

Problem with Petalinux 2017.4 in Debian/testing

Jump to solution

I had to recompile my old design in Petalinux 2017.4 on my Debian/testing machine.

Unfortunately, petalinux-build failed with the following error message:

ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Traceback (most recent call last):
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 981, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x7f19bd882080>):
         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 "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 662, in check_sanity_version_change(status=<SanityStatus object at 0x7f19bd882470>, d=<bb.data_smart.DataSmart object at 0x7f19bd882080>):
     
    >    status.addresult(check_make_version(d))
         status.addresult(check_tar_version(d))
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 492, in check_make_version(sanity_data=<bb.data_smart.DataSmart object at 0x7f19bd882080>):
         version = result.split()[2]
    >    if LooseVersion(version) == LooseVersion("3.82"):
             # Construct a test file
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/distutils/version.py", line 46, in LooseVersion.__eq__(other=LooseVersion ('3.82')):
         def __eq__(self, other):
    >        c = self._cmp(other)
             if c is NotImplemented:
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/distutils/version.py", line 337, in LooseVersion._cmp(other=LooseVersion ('3.82')):
                 return 0
    >        if self.version < other.version:
                 return -1
TypeError: unorderable types: str() < int()

ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/command.py", line 101, in runAsyncCommand
    self.cooker.updateCache()
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/cooker.py", line 1627, in updateCache
    bb.event.fire(bb.event.SanityCheck(False), self.databuilder.mcdata[mc])
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 201, in fire
    fire_class_handlers(event, d)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 124, in fire_class_handlers
    execute_handler(name, handler, event, d)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/bitbake/lib/bb/event.py", line 96, in execute_handler
    ret = handler(event)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 1017, in check_sanity_eventhandler
    check_sanity(sanity_data)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 981, in check_sanity
    check_sanity_version_change(status, sanity_data)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 662, in check_sanity_version_change
    status.addresult(check_make_version(d))
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass", line 492, in check_make_version
    if LooseVersion(version) == LooseVersion("3.82"):
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/distutils/version.py", line 46, in __eq__
    c = self._cmp(other)
  File "/home/xl/petalinux/petalinux-v2017.4/components/yocto/source/aarch64/buildtools/sysroots/x86_64-petalinux-linux/usr/lib/python3.5/distutils/version.py", line 337, in _cmp
    if self.version < other.version:
TypeError: unorderable types: str() < int()


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

A year ago that design was compiling fine in another Debian/testing machine. What can be the source of the problem?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
629 Views
Registered: ‎08-24-2011

Re: Problem with Petalinux 2017.4 in Debian/testing

Jump to solution

To investigate the problem, I have added printing of the compared values in the petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass file:

    489: if status != 0:
    490:    return "Unable to execute make --version, exit code %s\n" % status
    491: version = result.split()[2]
    ==>    print("WZab result=",result)
    ==>    print("WZab Version=",version," ",type(version))
    492: if LooseVersion(version) == LooseVersion("3.82"):
    493:    # Construct a test file
    494:    f = open("makefile_test", "w")
    495:    f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n")

The above code produces:

WZab result= /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
GNU Make 4.2.1
Built for x86_64-petalinux-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
WZab Version= setlocale:   <class 'str'>

So the cause of the problem is lack of the "en_US.UTF-8" locales in the system where I tried to compile my design. Petalinux simply does not report it correctly.

To fix it I have run "dpkg-reconfigure locales" and added "en_US.UTF-8" to the selected locales. Afterwards the design compiled cleanly.

Important remark

The above requires, that the patch described in https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2017-4-quot-petalinux-build-quot-fails-on-the-newest/td-p/845209 is apllied.

View solution in original post

0 Kudos
1 Reply
Highlighted
Scholar
Scholar
630 Views
Registered: ‎08-24-2011

Re: Problem with Petalinux 2017.4 in Debian/testing

Jump to solution

To investigate the problem, I have added printing of the compared values in the petalinux-v2017.4/components/yocto/source/aarch64/layers/core/meta/classes/sanity.bbclass file:

    489: if status != 0:
    490:    return "Unable to execute make --version, exit code %s\n" % status
    491: version = result.split()[2]
    ==>    print("WZab result=",result)
    ==>    print("WZab Version=",version," ",type(version))
    492: if LooseVersion(version) == LooseVersion("3.82"):
    493:    # Construct a test file
    494:    f = open("makefile_test", "w")
    495:    f.write("makefile_test.a: makefile_test_a.c makefile_test_b.c makefile_test.a( makefile_test_a.c makefile_test_b.c)\n")

The above code produces:

WZab result= /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
GNU Make 4.2.1
Built for x86_64-petalinux-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
WZab Version= setlocale:   <class 'str'>

So the cause of the problem is lack of the "en_US.UTF-8" locales in the system where I tried to compile my design. Petalinux simply does not report it correctly.

To fix it I have run "dpkg-reconfigure locales" and added "en_US.UTF-8" to the selected locales. Afterwards the design compiled cleanly.

Important remark

The above requires, that the patch described in https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2017-4-quot-petalinux-build-quot-fails-on-the-newest/td-p/845209 is apllied.

View solution in original post

0 Kudos