Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains
@ 2015-10-19 21:02 Thomas Petazzoni
  2015-10-24 12:01 ` Bjørn Forsman
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-10-19 21:02 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=a8cc6eeec5a665db5689083312beef14a9afbafa
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Some toolchains used in Buildroot (x86-64 and mips64) have a problem to compile
a set of object files into one object file as it is done for the
`builtin-target` declared in swupdate's Kbuild Makefile.build. This target
collects all object files from every subdirectory declared in `objs-dir` and
compiles them into a single object file named `build-in.o` using the linker ld.

For the addressed toolchains the default emulation of ld is not the correct one
leading to different kind of relocation errors:

  /usr/bin/i686-pc-linux-gnu-ld: Relocatable linking with relocations from
  format elf64-x86-64 (core/swupdate.o) to format elf32-i386 (core/built-in.o)
  is not supported.

or

  /usr/bin/mips-linux-gnu-ld: handlers/raw_handler.o: endianness incompatible
  with that of the selected emulation

or

  /usr/bin/mips64el-linux-ld: core/swupdate.o: ABI is incompatible with that
  of the selected

As there is no need to have single object file `built-in.o` to be compiled for
the subdirectories core and handlers we can easily allow swupdate to be built
with these toolchains by compiling the source files from core and handlers with
the `lib-target` target by assigning them to the `libs-y` variable as it is done
for all other subdirectories. The `lib-target` compiles a set of object files
into one archive file. With this target we avoid using the ld linker and use the
ar archiver instead.

Add a patch from upstream to fix a whole bunch of autobuild errors.

Fixes:
http://autobuild.buildroot.net/results/de9/de920298075d32f3de83a0cfb7417846eb833425/
http://autobuild.buildroot.net/results/975/975915aa33005806e78260bae385cd4b3e359ca8/
http://autobuild.buildroot.net/results/c54/c54e7a2ea353d95d41a1e966de0dffa7b6ac432e/
http://autobuild.buildroot.net/results/019/0198596ebfed05ab86552b628da2274d55bf42ae/

and many more.

Signed-off-by: J??rg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/swupdate/swupdate.hash |    1 +
 package/swupdate/swupdate.mk   |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/swupdate/swupdate.hash b/package/swupdate/swupdate.hash
index 6d69d66..057cf84 100644
--- a/package/swupdate/swupdate.hash
+++ b/package/swupdate/swupdate.hash
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256	1410f8967aad0f4d3b4561110dbfb2c1f8e337bdc332f6b120f4995762c8bf6b  swupdate-2015.07.tar.gz
+sha256	ec633171e6a893506fad6b96fb2b258d60a023c03be5520b968a1d5cc6bafe6e  c3467290925b2a833a68d9db12c198fdca752e32.patch
diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 9338fc8..8a20193 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -8,6 +8,7 @@ SWUPDATE_VERSION = 2015.07
 SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION))
 SWUPDATE_LICENSE = GPLv2+, MIT, Public Domain
 SWUPDATE_LICENSE_FILES = COPYING
+SWUPDATE_PATCH = https://github.com/sbabic/swupdate/commit/c3467290925b2a833a68d9db12c198fdca752e32.patch
 
 # swupdate bundles its own version of mongoose (version 3.8) and
 # lsqlite3 (version 0.8)

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains
  2015-10-19 21:02 [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains Thomas Petazzoni
@ 2015-10-24 12:01 ` Bjørn Forsman
  2015-10-24 12:28   ` Yann E. MORIN
  2015-10-24 19:53   ` Jörg Krause
  0 siblings, 2 replies; 5+ messages in thread
From: Bjørn Forsman @ 2015-10-24 12:01 UTC (permalink / raw)
  To: buildroot

Hi,

This patch caused an unfortunate regression that prevents any handlers
from being registered (runtime issue).
This means it cannot perform any update. Upstream has reverted it.

See discussion:
https://groups.google.com/d/msg/swupdate/oVIhJmYPT8A/eq3uZvYVDQAJ

- Bj?rn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains
  2015-10-24 12:01 ` Bjørn Forsman
@ 2015-10-24 12:28   ` Yann E. MORIN
  2015-10-24 13:16     ` Bjørn Forsman
  2015-10-24 19:53   ` Jörg Krause
  1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2015-10-24 12:28 UTC (permalink / raw)
  To: buildroot

Bj?rn, All,

On 2015-10-24 14:01 +0200, Bj?rn Forsman spake thusly:
> This patch caused an unfortunate regression that prevents any handlers
> from being registered (runtime issue).
> This means it cannot perform any update. Upstream has reverted it.
> 
> See discussion:
> https://groups.google.com/d/msg/swupdate/oVIhJmYPT8A/eq3uZvYVDQAJ

Care to send a rever for it, please?

Also, if you can disable the package for the affected toolchains and/or
architectures, that would be great as well.

Once upstream has a better patch, we can include it and drop the
dependencies on toolchain / archs.

Thanks for the report! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains
  2015-10-24 12:28   ` Yann E. MORIN
@ 2015-10-24 13:16     ` Bjørn Forsman
  0 siblings, 0 replies; 5+ messages in thread
From: Bjørn Forsman @ 2015-10-24 13:16 UTC (permalink / raw)
  To: buildroot

Hi Yann,

On 24 October 2015 at 14:28, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Bj?rn, All,
>
> On 2015-10-24 14:01 +0200, Bj?rn Forsman spake thusly:
>> This patch caused an unfortunate regression that prevents any handlers
>> from being registered (runtime issue).
>> This means it cannot perform any update. Upstream has reverted it.
>>
>> See discussion:
>> https://groups.google.com/d/msg/swupdate/oVIhJmYPT8A/eq3uZvYVDQAJ
>
> Care to send a rever for it, please?

Done.

> Also, if you can disable the package for the affected toolchains and/or
> architectures, that would be great as well.

That's more difficult: I'm not sure of the exact set is. I might
disable too much.

The original commit mentions these autobuild errors:

http://autobuild.buildroot.net/results/de9/de920298075d32f3de83a0cfb7417846eb833425/
http://autobuild.buildroot.net/results/975/975915aa33005806e78260bae385cd4b3e359ca8/
http://autobuild.buildroot.net/results/c54/c54e7a2ea353d95d41a1e966de0dffa7b6ac432e/
http://autobuild.buildroot.net/results/019/0198596ebfed05ab86552b628da2274d55bf42ae/

but also say that there are "many more". I _think_ the commonality is
BR2_MIPS_NABI64=y, but then again the commit message also mentions
issues on x86-64, but I didn't see that in the above autobuild
configs.

> Thanks for the report! :-)

No problem :-)

- Bj?rn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains
  2015-10-24 12:01 ` Bjørn Forsman
  2015-10-24 12:28   ` Yann E. MORIN
@ 2015-10-24 19:53   ` Jörg Krause
  1 sibling, 0 replies; 5+ messages in thread
From: Jörg Krause @ 2015-10-24 19:53 UTC (permalink / raw)
  To: buildroot

On Sa, 2015-10-24 at 14:01 +0200, Bj?rn Forsman wrote:
> Hi,
> 
> This patch caused an unfortunate regression that prevents any
> handlers
> from being registered (runtime issue).
> This means it cannot perform any update. Upstream has reverted it.
> 
> See discussion:
> https://groups.google.com/d/msg/swupdate/oVIhJmYPT8A/eq3uZvYVDQAJ
> 
> - Bj?rn

Confirmed! Problem is the linker does not care about constructor
functions. I'll check for another solution...

Best regards
J?rg Krause

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-24 19:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 21:02 [Buildroot] [git commit] package/swupdate: add patch to fix build issue with some toolchains Thomas Petazzoni
2015-10-24 12:01 ` Bjørn Forsman
2015-10-24 12:28   ` Yann E. MORIN
2015-10-24 13:16     ` Bjørn Forsman
2015-10-24 19:53   ` Jörg Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox