Yocto L5.4.70_2.3.0 build image failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto L5.4.70_2.3.0 build image failed

5,649 Views
joshua_jhan
Contributor III

Hi all,

I am trying to build the Yocto L5.4.70_2.3.0 "imx-image-full " in ubuntu 20.04, and I've been following the steps on https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf to build

the error message as below:

ERROR: python3-pybind11-native-2.5.0-r0 do_configure: Execution of '/<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/temp/run.do_configure.2608628' failed with exit code 1:
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++
-- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.5")
CMake Error at tools/FindPythonLibsNew.cmake:96 (message):
Python config failure:

Traceback (most recent call last):

File "<string>", line 4, in <module>
File "/usr/lib/python3.8/distutils/sysconfig.py", line 117, in get_python_inc
return sysconfig.get_path('platinclude')
File "/usr/lib/python3.8/sysconfig.py", line 512, in get_path
return get_paths(scheme, vars, expand)[name]
File "/usr/lib/python3.8/sysconfig.py", line 502, in get_paths
return _expand_vars(scheme, vars)
File "/usr/lib/python3.8/sysconfig.py", line 172, in _expand_vars
_extend_dict(vars, get_config_vars())
File "/usr/lib/python3.8/sysconfig.py", line 550, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python3.8/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)

ModuleNotFoundError: No module named '_sysconfigdata'

Call Stack (most recent call first):
tools/pybind11Tools.cmake:16 (find_package)
CMakeLists.txt:33 (include)


-- Configuring incomplete, errors occurred!
See also "/<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/build/CMakeFiles/CMakeOutput.log".
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/temp/log.do_configure.2608628
Log data follows:
| DEBUG: Executing shell function do_configure
| -- The CXX compiler identification is GNU 9.3.0
| -- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++
| -- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++ -- works
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - done
| -- Detecting CXX compile features
| -- Detecting CXX compile features - done
| -- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.5")
| CMake Error at tools/FindPythonLibsNew.cmake:96 (message):
| Python config failure:
|
| Traceback (most recent call last):
|
| File "<string>", line 4, in <module>
| File "/usr/lib/python3.8/distutils/sysconfig.py", line 117, in get_python_inc
| return sysconfig.get_path('platinclude')
| File "/usr/lib/python3.8/sysconfig.py", line 512, in get_path
| return get_paths(scheme, vars, expand)[name]
| File "/usr/lib/python3.8/sysconfig.py", line 502, in get_paths
| return _expand_vars(scheme, vars)
| File "/usr/lib/python3.8/sysconfig.py", line 172, in _expand_vars
| _extend_dict(vars, get_config_vars())
| File "/usr/lib/python3.8/sysconfig.py", line 550, in get_config_vars
| _init_posix(_CONFIG_VARS)
| File "/usr/lib/python3.8/sysconfig.py", line 421, in _init_posix
| _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
|
| ModuleNotFoundError: No module named '_sysconfigdata'
|
| Call Stack (most recent call first):
| tools/pybind11Tools.cmake:16 (find_package)
| CMakeLists.txt:33 (include)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/build/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/temp/run.do_configure.2608628' failed with exit code 1:
| -- The CXX compiler identification is GNU 9.3.0
| -- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++
| -- Check for working CXX compiler: /<build dir>/tmp/hosttools/g++ -- works
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - done
| -- Detecting CXX compile features
| -- Detecting CXX compile features - done
| -- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.5")
| CMake Error at tools/FindPythonLibsNew.cmake:96 (message):
| Python config failure:
|
| Traceback (most recent call last):
|
| File "<string>", line 4, in <module>
| File "/usr/lib/python3.8/distutils/sysconfig.py", line 117, in get_python_inc
| return sysconfig.get_path('platinclude')
| File "/usr/lib/python3.8/sysconfig.py", line 512, in get_path
| return get_paths(scheme, vars, expand)[name]
| File "/usr/lib/python3.8/sysconfig.py", line 502, in get_paths
| return _expand_vars(scheme, vars)
| File "/usr/lib/python3.8/sysconfig.py", line 172, in _expand_vars
| _extend_dict(vars, get_config_vars())
| File "/usr/lib/python3.8/sysconfig.py", line 550, in get_config_vars
| _init_posix(_CONFIG_VARS)
| File "/usr/lib/python3.8/sysconfig.py", line 421, in _init_posix
| _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
|
| ModuleNotFoundError: No module named '_sysconfigdata'
|
| Call Stack (most recent call first):
| tools/pybind11Tools.cmake:16 (find_package)
| CMakeLists.txt:33 (include)
|
|
| -- Configuring incomplete, errors occurred!
| See also "/<build dir>/tmp/work/x86_64-linux/python3-pybind11-native/2.5.0-r0/build/CMakeFiles/CMakeOutput.log".
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (virtual:native:/<build dir>/sources/meta-imx/meta-ml/recipes-devtools/python/python3-pybind11_2.5.0.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 271 tasks of which 265 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
virtual:native:/<build dir>/sources/meta-imx/meta-ml/recipes-devtools/python/python3-pybind11_2.5.0.bb:do_configure
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

 Python version : 3.8.5

 

thanks

0 Kudos
5 Replies

5,444 Views
Childe
Contributor II

I edit python3-pybind11_2.5.0.bb follow @Farsan_Baloo  and It’s work.

thanks!

0 Kudos

5,583 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

I compiled this version of bsp on the ubuntu10.04/20.04/debian-10 platform, and no problems were encountered. The following is my hardware configuration and software package configuration.

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

Host Comfiguration :
--CPU: i7-6700 4-core 8 threads
--Total memory: 32GB DDR4
--Windows 7 64bit
--USB3.1 SSD ( For Linux virtual machine)
Virtual Machine:
--Vmware player 15
--Ubuntu 18.04 LTS / 20.04 LTS /Debian-10

(1)Run these 2 commands to update software and system
# sudo apt-get update
# sudo apt-get upgrade
(2)Installing software packages for cross-compile linux BSP
# sudo apt-get install flex bison gperf build-essential zlib1g-dev
# sudo apt-get install lib32ncurses5-dev x11proto-core-dev
# sudo apt-get install libx11-dev lib32z1-dev libgl1-mesa-dev
# sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc
# sudo apt-get install uuid-dev:i386 liblzo2-dev:i386 gcc-multilib g++-multilib
[commnent]
For Debian-10 uuid-dev:i386 liblzo2-dev:i386---> uuid-dev liblzo2-dev
# sudo apt-get install subversion openssh-server openssh-client uuid uuid-dev zlib1g-dev
# sudo apt-get install liblz-dev lzop liblzo2-2 liblzo2-dev git-core curl
# sudo apt-get install python3 python3-pip python3-pexpect python3-git python3-jinja2 pylint3
# sudo apt-get install u-boot-tools mtd-utils android-tools-fsutils
[commnent]
For ubuntu 20.04 LTS, don’t need android-tools-fsutils. So remove it, please!
# sudo apt-get install openjdk-8-jdk device-tree-compiler aptitude
[commnent]
For Debian-10 openjdk-8-jdk --- > default-jdk
# sudo apt-get install libcurl4-openssl-dev nss-updatedb
# sudo apt-get install chrpath texinfo gawk cpio diffstat
# sudo apt-get install libncursesw5-dev libssl-dev libegl1-mesa libncurses5
# sudo apt-get install net-tools python libsdl1.2-dev xterm socat
# sudo apt-get install icedtea-netx-common icedtea-netx


What I built is imx-image-full.

 

Hope above information is helpful to you.

Have a nice day!

B.R,

weidong

0 Kudos

5,591 Views
Farsan_Baloo
Contributor II

I have the exact same problem.
Somehow FindPythonLibsNew.cmake finds (and uses) the host '/usr/lib/python3' (3.8.5) instead of python located in '${RECIPE_SYSROOT_NATIVE}/usr/lib/python3' (3.7.1).

My work around (for now, until yocto is verified on Ubuntu 20.04) were to tell CMake where the Phyton executable is located:
In python3-pybind11_2.5.0.bb recipe alter the EXTRA_OECMAKE variable like:

EXTRA_OECMAKE =  "-DPYBIND11_TEST=OFF \
		-DPYTHON_EXECUTABLE=${RECIPE_SYSROOT_NATIVE}/usr/bin/python3-native/python3.7 \
"

4,906 Views
fweller
Contributor V

I am grateful that you posted this fix and the explanation as to why it works.

This got Yocto working for me again in Ubuntu 20.04

 

0 Kudos

5,521 Views
shaohong352
Contributor I

Good!!  I have the same problem with 20.04. I do as what you said. Find "python3-pybind11_2.5.0.bb" and change it as above. It works! Thank you