* [PATCH v1] dtc: Add set-ldshared.patch [not found] ` <20180727110728.300c06e2@windsurf> @ 2018-07-27 22:23 ` Geoff Levand [not found] ` <f1e71e0d-6728-78d1-0431-c1e2846ab885-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Geoff Levand @ 2018-07-27 22:23 UTC (permalink / raw) To: Thomas Petazzoni Cc: buildroot-9GAsQqxh4YTR7s880joybQ, Simon Glass, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA Fixes pylibfdt cross compile errors. http://autobuild.buildroot.net/?reason=%dtc-1.4.7 Signed-off-by: Geoff Levand <geoff-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.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 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) -- 2.14.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <f1e71e0d-6728-78d1-0431-c1e2846ab885-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>]
* Re: [PATCH v1] dtc: Add set-ldshared.patch [not found] ` <f1e71e0d-6728-78d1-0431-c1e2846ab885-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> @ 2018-07-28 12:56 ` Thomas Petazzoni 2018-07-28 13:43 ` Thomas Petazzoni 0 siblings, 1 reply; 4+ messages in thread From: Thomas Petazzoni @ 2018-07-28 12:56 UTC (permalink / raw) To: Geoff Levand Cc: buildroot-9GAsQqxh4YTR7s880joybQ, Simon Glass, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA 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 -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] dtc: Add set-ldshared.patch 2018-07-28 12:56 ` Thomas Petazzoni @ 2018-07-28 13:43 ` Thomas Petazzoni 2018-07-30 14:46 ` Geoff Levand 0 siblings, 1 reply; 4+ messages in thread From: Thomas Petazzoni @ 2018-07-28 13:43 UTC (permalink / raw) To: Geoff Levand Cc: buildroot-9GAsQqxh4YTR7s880joybQ, Simon Glass, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA 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 -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] dtc: Add set-ldshared.patch 2018-07-28 13:43 ` Thomas Petazzoni @ 2018-07-30 14:46 ` Geoff Levand 0 siblings, 0 replies; 4+ messages in thread From: Geoff Levand @ 2018-07-30 14:46 UTC (permalink / raw) To: Thomas Petazzoni Cc: buildroot-9GAsQqxh4YTR7s880joybQ, Simon Glass, devicetree-compiler-u79uwXL29TY76Z2rM5mHXA 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-30 14:46 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <28d7fee033a5e5ef512c02d5291d20b1d19fdbbf.1532460521.git.geoff@infradead.org> [not found] ` <20180727110728.300c06e2@windsurf> 2018-07-27 22:23 ` [PATCH v1] dtc: Add set-ldshared.patch Geoff Levand [not found] ` <f1e71e0d-6728-78d1-0431-c1e2846ab885-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> 2018-07-28 12:56 ` Thomas Petazzoni 2018-07-28 13:43 ` Thomas Petazzoni 2018-07-30 14:46 ` Geoff Levand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).