| Summary: | binman (U-boot tool) cannot find libfdt "binman: No module named _libfdt" if python3 selected | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | safyannikov |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot, safyannikov |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
safyannikov
2019-02-27 08:07:57 UTC
Sorry for the late answer. I'm taking this bug. Is this report still valid? If yes, please attach a copy your defconfig. You can create it with: $ make sevedefconfig BR2_DEFCONFIG=/tmp/defconfig Then attach the generated /tmp/defconfig to this case. I can indeed reproduce the issue with the following defconfig: BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2019.05.1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_LIBVIPS=y # BR2_TARGET_ROOTFS_TAR is not set The problem is that binman has the following shebang: #!/usr/bin/env python2 When python3 is selected for the target, we build host-python3, and we install all host-Python modules for host-python3. So when binman uses python2, it uses the system-provided python2, which does not have those additional Python modules installed. binman uses python3 since version 2020.01 and https://github.com/u-boot/u-boot/commit/388560134b99dc4cc752627d3a7e9f8c8c2a89a7. uboot-tools has been bumped to 2020.01 on January 24th with https://git.buildroot.net/buildroot/commit/?id=8258a60ad403d8e2637bd1226ec43863e4160726 so perhaps this issue has been "fixed". I indeed think this issue is resolved now that binman uses python3 in more recent versions of U-Boot. Also Buildroot has been enhanced to be able to describe U-Boot configurations that depend on python2 or python3. Let's assume this is fixed. |