Message ID | CAMo8BfLZzoRF0Q4zMRPcmwT0UErD7pGH_boMKrWQ07h09fiykw@mail.gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Hello, On Mon, 20 Mar 2017 16:30:53 -0700, Max Filippov wrote: > I can't reproduce it. > The python script makes the compilation super quiet, can we apply something > like the attached patch to see what happens? Build log is below. The issue is that the library being produced is named _libfdt.cpython-35m-x86_64-linux-gnu.so, but U-Boot build system assumes it's named _libfdt.so. However, let's take a step back: why the heck do we have this Python related stuff being built? uboot-tools is only meant to install the basic U-Boot tools like fw_printenv and fw_setenv to the target. Why do we bother about this Python libfdt thing? We're not even installing this stuff to the target: define UBOOT_TOOLS_INSTALL_TARGET_CMDS $(UBOOT_TOOLS_INSTALL_MKIMAGE) $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) $(UBOOT_TOOLS_INSTALL_FWPRINTENV) $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) endef Looking at tools/Makefile, it indeed automatically builds this Python stuff is swig is available, with no way to disable this stuff. Should we patch this out? Alternatively, changing: mv _libfdt.so $@ to: mv _libfdt.*so $@ does the trick. Build log of the Python extension: building '_libfdt' extension creating build creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/lib creating build/temp.linux-x86_64-3.5/lib/libfdt creating build/temp.linux-x86_64-3.5/tools /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE HOSTLD tools/fdtgrep /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_ro.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_ro.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE HOSTLD tools/dumpimage HOSTLD tools/mkimage /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_rw.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_rw.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_strerror.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_strerror.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_wip.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_wip.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_region.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_region.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c lib/libfdt/fdt_sw.c -o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_sw.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/include/python3.5m -c tools/libfdt_wrap.c -o build/temp.linux-x86_64-3.5/tools/libfdt_wrap.o -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch//include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE /usr/bin/gcc -pthread -shared -L/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/lib -L/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/lib -Wl,-rpath,/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/lib -Wl,--enable-new-dtags build/temp.linux-x86_64-3.5/lib/libfdt/fdt.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_ro.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_rw.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_strerror.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_wip.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_region.o build/temp.linux-x86_64-3.5/lib/libfdt/fdt_sw.o build/temp.linux-x86_64-3.5/tools/libfdt_wrap.o -L/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/host/usr/lib -lpython3.5m -o /home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/build/uboot-tools-2017.03/_libfdt.cpython-35m-x86_64-linux-gnu.so mv _libfdt.so tools/_libfdt.so mv: cannot stat `_libfdt.so': No such file or directory make[3]: *** [tools/_libfdt.so] Error 1 make[2]: *** [tools-only] Error 2 make[1]: *** [/home/test/outputs/995a1773efe982ed8443b2c5f9ea40a1ed106472/output/build/uboot-tools-2017.03/.stamp_built] Error 2 make: *** [_all] Error 2
Hi Thomas, On Wed, Mar 22, 2017 at 2:01 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > On Mon, 20 Mar 2017 16:30:53 -0700, Max Filippov wrote: > >> I can't reproduce it. >> The python script makes the compilation super quiet, can we apply something >> like the attached patch to see what happens? > > Build log is below. The issue is that the library being produced is > named _libfdt.cpython-35m-x86_64-linux-gnu.so, but U-Boot build system > assumes it's named _libfdt.so. > > However, let's take a step back: why the heck do we have this Python > related stuff being built? we probably don't. > uboot-tools is only meant to install the > basic U-Boot tools like fw_printenv and fw_setenv to the target. Why do > we bother about this Python libfdt thing? We're not even installing > this stuff to the target: > > define UBOOT_TOOLS_INSTALL_TARGET_CMDS > $(UBOOT_TOOLS_INSTALL_MKIMAGE) > $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) > $(UBOOT_TOOLS_INSTALL_FWPRINTENV) > $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) > endef > > Looking at tools/Makefile, it indeed automatically builds this Python > stuff is swig is available, with no way to disable this stuff. Should > we patch this out? Alternatively, changing: > > mv _libfdt.so $@ > > to: > > mv _libfdt.*so $@ > > does the trick. That looks like a nice small fix.
On 23-03-17 00:12, Max Filippov wrote: > Hi Thomas, > > On Wed, Mar 22, 2017 at 2:01 PM, Thomas Petazzoni > <thomas.petazzoni@free-electrons.com> wrote: >> On Mon, 20 Mar 2017 16:30:53 -0700, Max Filippov wrote: >> >>> I can't reproduce it. >>> The python script makes the compilation super quiet, can we apply something >>> like the attached patch to see what happens? >> >> Build log is below. The issue is that the library being produced is >> named _libfdt.cpython-35m-x86_64-linux-gnu.so, but U-Boot build system >> assumes it's named _libfdt.so. >> >> However, let's take a step back: why the heck do we have this Python >> related stuff being built? > > we probably don't. > >> uboot-tools is only meant to install the >> basic U-Boot tools like fw_printenv and fw_setenv to the target. Why do >> we bother about this Python libfdt thing? We're not even installing >> this stuff to the target: >> >> define UBOOT_TOOLS_INSTALL_TARGET_CMDS >> $(UBOOT_TOOLS_INSTALL_MKIMAGE) >> $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) >> $(UBOOT_TOOLS_INSTALL_FWPRINTENV) >> $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) >> endef >> >> Looking at tools/Makefile, it indeed automatically builds this Python >> stuff is swig is available, with no way to disable this stuff. Should >> we patch this out? I would very much prefer an upstreamable patch that makes it possible to disable this. Regards, Arnout >> Alternatively, changing: >> >> mv _libfdt.so $@ >> >> to: >> >> mv _libfdt.*so $@ >> >> does the trick. > > That looks like a nice small fix. >
From 304d2caf5c7c0210427ec93ebde24734cdef511f Mon Sep 17 00:00:00 2001 From: Max Filippov <jcmvbkbc@gmail.com> Date: Mon, 20 Mar 2017 23:27:35 +0000 Subject: [PATCH] uboot-tools: make _libfdt.so build verbose Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- package/uboot-tools/0005-WIP-debug.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 package/uboot-tools/0005-WIP-debug.patch diff --git a/package/uboot-tools/0005-WIP-debug.patch b/package/uboot-tools/0005-WIP-debug.patch new file mode 100644 index 0000000..e3da287 --- /dev/null +++ b/package/uboot-tools/0005-WIP-debug.patch @@ -0,0 +1,26 @@ +From d0942ab23ee0626bbd74c9bafc0ffc4d2a9f23ab Mon Sep 17 00:00:00 2001 +From: Max Filippov <jcmvbkbc@gmail.com> +Date: Mon, 20 Mar 2017 16:10:44 -0700 +Subject: [PATCH] WIP: debug + +Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> +--- + lib/libfdt/setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/libfdt/setup.py b/lib/libfdt/setup.py +index 62e7bcc..76b320a 100644 +--- a/lib/libfdt/setup.py ++++ b/lib/libfdt/setup.py +@@ -27,7 +27,7 @@ libfdt_module = Extension( + extra_compile_args = cflags + ) + +-sys.argv = [progname, '--quiet', 'build_ext', '--inplace'] ++sys.argv = [progname, 'build_ext', '--inplace'] + + setup (name = 'libfdt', + version = '0.1', +-- +2.1.4 + -- 2.1.4