Message ID | f1e71e0d-6728-78d1-0431-c1e2846ab885@infradead.org |
---|---|
State | Rejected |
Headers | show |
Series | [v1] dtc: Add set-ldshared.patch | expand |
Hello, On Fri, 27 Jul 2018 15:23:28 -0700, Geoff Levand wrote: > Fixes pylibfdt cross compile errors. > > http://autobuild.buildroot.net/?reason=%dtc-1.4.7 Are you sure your patch is fixing the host-dtc build issues ? I am seeing two different build issues: - One for host-dtc, which looks like this: INSTALL-PYLIB pylibfdt/libfdt_wrap.c: In function 'SWIG_Python_NewShadowInstance': pylibfdt/libfdt_wrap.c:2483:65: error: declaration of 'swig_this' shadows a global declaration [-Werror=shadow] SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ^ pylibfdt/libfdt_wrap.c:2224:18: error: shadowed declaration is here [-Werror=shadow] static PyObject *swig_this = NULL; - One for dtc, which looks like this: LD fdtoverlay /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) /usr/bin/ld: build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: Relocations in generic ELF (EM: 8) build/temp.linux-x86_64-2.7/usr/lfs/v0/rc-buildroot-test/scripts/instance-2/output/build/dtc-1.4.7/libfdt/fdt.o: error adding symbols: File in wrong format Your patch probably fixes the "dtc" issue, but I'm not sure it fixes the host-dtc issue. > diff --git a/package/dtc/set-ldshared.patch b/package/dtc/set-ldshared.patch > new file mode 100644 > index 0000000000..09220da359 > --- /dev/null > +++ b/package/dtc/set-ldshared.patch > @@ -0,0 +1,13 @@ Patches should be Git formatted, have a description and a Signed-off-by. > +diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt > +index 9507d3d..c2ac8e9 100644 > +--- a/pylibfdt/Makefile.pylibfdt > ++++ b/pylibfdt/Makefile.pylibfdt > +@@ -8,7 +8,7 @@ PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so > + define run_setup > + SOURCES="$(1)" CPPFLAGS="$(CPPFLAGS)" OBJDIR="$(PYLIBFDT_objdir)" > + VERSION="$(dtc_version)" > +- $(PYLIBFDT_objdir)/setup.py --quiet $(2) > ++ LDSHARED="$(CC) -shared" $(PYLIBFDT_objdir)/setup.py --quiet $(2) Do we know why it was working before, and why it fails since the dtc update ? Best regards, Thomas
Hello, On Sat, 28 Jul 2018 14:56:47 +0200, Thomas Petazzoni wrote: > Are you sure your patch is fixing the host-dtc build issues ? > > I am seeing two different build issues: > > - One for host-dtc, which looks like this: [...] > - One for dtc, which looks like this: Since all those problems are due to pylibfdt, which is new since 1.4.5, and that we don't use in Buildroot, I applied a simpler fix: pass NO_PYTHON=1 so that we don't build the Python support, even if the necessary dependencies are found. See: https://git.buildroot.org/buildroot/commit/?id=b50c95e914c6366e30145378fa82f286d4412c51 Best regards, Thomas
On 07/28/2018 06:43 AM, Thomas Petazzoni wrote: > I applied a simpler fix: pass > NO_PYTHON=1 so that we don't build the Python support, even if the > necessary dependencies are found. OK, great. Thanks for looking into it. -Geoff
diff --git a/package/dtc/set-ldshared.patch b/package/dtc/set-ldshared.patch new file mode 100644 index 0000000000..09220da359 --- /dev/null +++ b/package/dtc/set-ldshared.patch @@ -0,0 +1,13 @@ +diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt +index 9507d3d..c2ac8e9 100644 +--- a/pylibfdt/Makefile.pylibfdt ++++ b/pylibfdt/Makefile.pylibfdt +@@ -8,7 +8,7 @@ PYMODULE = $(PYLIBFDT_objdir)/_libfdt.so + define run_setup + SOURCES="$(1)" CPPFLAGS="$(CPPFLAGS)" OBJDIR="$(PYLIBFDT_objdir)" + VERSION="$(dtc_version)" +- $(PYLIBFDT_objdir)/setup.py --quiet $(2) ++ LDSHARED="$(CC) -shared" $(PYLIBFDT_objdir)/setup.py --quiet $(2) + endef + + $(PYMODULE): $(PYLIBFDT_srcs)
Fixes pylibfdt cross compile errors. http://autobuild.buildroot.net/?reason=%dtc-1.4.7 Signed-off-by: Geoff Levand <geoff@infradead.org> --- Hi Thomas, This gets the dtc package to build with python support, but it seems the real problem is that python distutils doesn't set LDSHARED correctly, which should default to CC. -Geoff package/dtc/set-ldshared.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 package/dtc/set-ldshared.patch