All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold
@ 2016-09-21  5:30 Andreas Müller
  2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andreas Müller @ 2016-09-21  5:30 UTC (permalink / raw)
  To: openembedded-core

works around:
<native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1038: recipe for target 'Gperf-simple' failed
make[1]: *** [Gperf-simple] Error 1
make[1]: *** Waiting for unfinished jobs....
<...>
<native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1094: recipe for target 'Lperf-simple' failed
make[1]: *** [Lperf-simple] Error 1
<...>
ERROR: oe_runmake failed
<native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
collect2: error: ld returned 1 exit status
Makefile:1042: recipe for target 'Gperf-trace' failed
make[1]: *** [Gperf-trace] Error 1
<native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
collect2: error: ld returned 1 exit status
Makefile:1098: recipe for target 'Lperf-trace' failed
make[1]: *** [Lperf-trace] Error 1
<...>
<native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
collect2: error: ld returned 1 exit status
Makefile:1186: recipe for target 'test-coredump-unwind' failed

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta/recipes-support/libunwind/libunwind_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
index cd4cb89..4249430 100644
--- a/meta/recipes-support/libunwind/libunwind_git.bb
+++ b/meta/recipes-support/libunwind/libunwind_git.bb
@@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
 
 S = "${WORKDIR}/git"
 
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
-- 
2.5.5



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

* [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params
  2016-09-21  5:30 [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Andreas Müller
@ 2016-09-21  5:30 ` Andreas Müller
  2016-09-21  9:03   ` Burton, Ross
  2016-09-21  9:06   ` Burton, Ross
  2016-09-22 17:45 ` [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Martin Jansa
  2016-09-23  1:24 ` Khem Raj
  2 siblings, 2 replies; 8+ messages in thread
From: Andreas Müller @ 2016-09-21  5:30 UTC (permalink / raw)
  To: openembedded-core

During install all files are recompiled. This should be investigated further
later. Currently only one file is recompiled at the same time. Reduce install
time significantly by setting PARALLEL_MAKEINST option in do_install task.

Measured with recipes inheriting scons (gpsd do_compile broken for me) by
the following sequence:

without this patch:
bitbake pingus mongodb mixxx
bitbake -ccleansstate pingus mongodb mixxx
time bitbake pingus mongodb mixxx
...
real	48m5.467s
user	138m47.763s
sys	11m9.423s

with this patch
bitbake -ccleansstate pingus mongodb mixxx
time bitbake pingus mongodb mixxx
...
real	27m28.521s
user	146m59.951s
sys	10m56.218s

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 meta/classes/scons.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
index 1579b05..4f84ec0 100644
--- a/meta/classes/scons.bbclass
+++ b/meta/classes/scons.bbclass
@@ -10,7 +10,7 @@ scons_do_compile() {
 }
 
 scons_do_install() {
-        ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} prefix=${D}${prefix} install ${EXTRA_OESCONS}|| \
+        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKEINST} PREFIX=${D}${prefix} prefix=${D}${prefix} install ${EXTRA_OESCONS}|| \
         die "scons install execution failed."
 }
 
-- 
2.5.5



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

* Re: [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params
  2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
@ 2016-09-21  9:03   ` Burton, Ross
  2016-09-21  9:06   ` Burton, Ross
  1 sibling, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2016-09-21  9:03 UTC (permalink / raw)
  To: Andreas Müller; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On 21 September 2016 at 06:30, Andreas Müller <schnitzeltony@googlemail.com>
wrote:

> During install all files are recompiled. This should be investigated
> further
> later. Currently only one file is recompiled at the same time. Reduce
> install
> time significantly by setting PARALLEL_MAKEINST option in do_install task.
>

Have you verified this happens for all scons recipes?  If we're hacking the
class in lieu of fixing whatever is causing scons to do this, then why not
just not invoke scons in do_compile?

Ross

[-- Attachment #2: Type: text/html, Size: 952 bytes --]

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

* Re: [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params
  2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
  2016-09-21  9:03   ` Burton, Ross
@ 2016-09-21  9:06   ` Burton, Ross
  2016-09-21  9:18     ` Andreas Müller
  2016-09-22 20:05     ` Andreas Müller
  1 sibling, 2 replies; 8+ messages in thread
From: Burton, Ross @ 2016-09-21  9:06 UTC (permalink / raw)
  To: Andreas Müller; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

On 21 September 2016 at 06:30, Andreas Müller <schnitzeltony@googlemail.com>
wrote:

> During install all files are recompiled. This should be investigated
> further
> later
>

I'd put (pretend) money on it being because PREFIX/prefix change between
compile and install, so it needs to rebuild.  Looks like this class is
doing something wrong.

Ross

[-- Attachment #2: Type: text/html, Size: 775 bytes --]

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

* Re: [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params
  2016-09-21  9:06   ` Burton, Ross
@ 2016-09-21  9:18     ` Andreas Müller
  2016-09-22 20:05     ` Andreas Müller
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Müller @ 2016-09-21  9:18 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Wed, Sep 21, 2016 at 11:06 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 21 September 2016 at 06:30, Andreas Müller <schnitzeltony@googlemail.com>
> wrote:
>>
>> During install all files are recompiled. This should be investigated
>> further
>> later
>
>
> I'd put (pretend) money on it being because PREFIX/prefix change between
> compile and install, so it needs to rebuild.  Looks like this class is doing
> something wrong.
>
> Ross
Answering your 1st email:
Recipes inheriting scons I found in my meta's were:

pingus mongodb mixxx gpsd

* gpsd do_compile is broken for me without this patch (not findinig
math lib although -lm is in ld's command line)
* all others I tested here

Answering your 2nd email:
All files are recompiled without actually doing something. If somebody
has the time for it - it might be useful to see what happens

* if we skip do_compile completely or
* what causes scons to force a recompile although it is told to install

To be honest: Scons is yet another build system doing same thing as
others and creating it's own bugs (e.g pkg-config variables). I
wouldn't want to spend too much time on because there are fortunately
only few packets using it.

Andreas


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

* Re: [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold
  2016-09-21  5:30 [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Andreas Müller
  2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
@ 2016-09-22 17:45 ` Martin Jansa
  2016-09-23  1:24 ` Khem Raj
  2 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2016-09-22 17:45 UTC (permalink / raw)
  To: Andreas Müller; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3242 bytes --]

On Wed, Sep 21, 2016 at 07:30:43AM +0200, Andreas Müller wrote:
> works around:
> <native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1038: recipe for target 'Gperf-simple' failed
> make[1]: *** [Gperf-simple] Error 1
> make[1]: *** Waiting for unfinished jobs....
> <...>
> <native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1094: recipe for target 'Lperf-simple' failed
> make[1]: *** [Lperf-simple] Error 1
> <...>
> ERROR: oe_runmake failed
> <native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1042: recipe for target 'Gperf-trace' failed
> make[1]: *** [Gperf-trace] Error 1
> <native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1098: recipe for target 'Lperf-trace' failed
> make[1]: *** [Lperf-trace] Error 1
> <...>
> <native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
> collect2: error: ld returned 1 exit status
> Makefile:1186: recipe for target 'test-coredump-unwind' failed

Acked-by: Martin Jansa <Martin.Jansa@gmail.com>

I've verified that this fixes the issue I was reporting in "bitbake
wordl status" e-mails since last binutils upgrade to 2.27

It's basically complement to this oe-core change which went in together
with binutils:

commit 0092a076adb11cac411c86389af84bb96169730f
Author: Khem Raj <raj.khem@gmail.com>
Date:   Mon Aug 8 15:51:01 2016 -0700

    libunwind: Do not use gold for linking

Which only stopped gold being used when bfd is the default linker, but
which left libunwind broken for people with ld-is-gold in
DISTRO_FEATURES to use gold by default.

Thanks!

> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  meta/recipes-support/libunwind/libunwind_git.bb | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
> index cd4cb89..4249430 100644
> --- a/meta/recipes-support/libunwind/libunwind_git.bb
> +++ b/meta/recipes-support/libunwind/libunwind_git.bb
> @@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
>  
>  S = "${WORKDIR}/git"
>  
> +LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
> -- 
> 2.5.5
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 169 bytes --]

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

* Re: [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params
  2016-09-21  9:06   ` Burton, Ross
  2016-09-21  9:18     ` Andreas Müller
@ 2016-09-22 20:05     ` Andreas Müller
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Müller @ 2016-09-22 20:05 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

On Wed, Sep 21, 2016 at 11:06 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 21 September 2016 at 06:30, Andreas Müller <schnitzeltony@googlemail.com>
> wrote:
>>
>> During install all files are recompiled. This should be investigated
>> further
>> later
>
>
> I'd put (pretend) money on it being because PREFIX/prefix change between
> compile and install, so it needs to rebuild.  Looks like this class is doing
> something wrong.
>
You are right! Need some further build tests but for mixxx I got good
results by keeping prefix same for compile/install and setting
install_root= properly. Before this modification starting mixxx
complained with links to build install dir and finally crashed. Now it
runs fine. See what the other recipes say...

Andreas


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

* Re: [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold
  2016-09-21  5:30 [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Andreas Müller
  2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
  2016-09-22 17:45 ` [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Martin Jansa
@ 2016-09-23  1:24 ` Khem Raj
  2 siblings, 0 replies; 8+ messages in thread
From: Khem Raj @ 2016-09-23  1:24 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer

On Tue, Sep 20, 2016 at 10:30 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> works around:
> <native-sysroot>/ld: error: Gperf-simple.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1038: recipe for target 'Gperf-simple' failed
> make[1]: *** [Gperf-simple] Error 1
> make[1]: *** Waiting for unfinished jobs....
> <...>
> <native-sysroot>/ld: error: Lperf-simple.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1094: recipe for target 'Lperf-simple' failed
> make[1]: *** [Lperf-simple] Error 1
> <...>
> ERROR: oe_runmake failed
> <native-sysroot>/ld: error: Gperf-trace.o: cannot make copy relocation for protected symbol '_Uarm_local_addr_space', defined in ../src/.libs/libunwind-arm.so
> collect2: error: ld returned 1 exit status
> Makefile:1042: recipe for target 'Gperf-trace' failed
> make[1]: *** [Gperf-trace] Error 1
> <native-sysroot>/ld: error: Lperf-trace.o: cannot make copy relocation for protected symbol '_ULarm_local_addr_space', defined in ../src/.libs/libunwind.so
> collect2: error: ld returned 1 exit status
> Makefile:1098: recipe for target 'Lperf-trace' failed
> make[1]: *** [Lperf-trace] Error 1
> <...>
> <native-sysroot>/ld: error: test-coredump-unwind.o: cannot make copy relocation for protected symbol '_UCD_accessors', defined in ../src/.libs/libunwind-coredump.so
> collect2: error: ld returned 1 exit status
> Makefile:1186: recipe for target 'test-coredump-unwind' failed
>
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
>  meta/recipes-support/libunwind/libunwind_git.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-support/libunwind/libunwind_git.bb b/meta/recipes-support/libunwind/libunwind_git.bb
> index cd4cb89..4249430 100644
> --- a/meta/recipes-support/libunwind/libunwind_git.bb
> +++ b/meta/recipes-support/libunwind/libunwind_git.bb
> @@ -26,3 +26,4 @@ SECURITY_CFLAGS_append_aarch64 = " -fPIE"
>
>  S = "${WORKDIR}/git"
>
> +LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"

I dont think we need to check for DISTRO_FEATURE here. Since we want
to always use BFD linker using -fuse-ld=bfd unconditionally is fine
always.

> --
> 2.5.5
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

end of thread, other threads:[~2016-09-23  1:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21  5:30 [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Andreas Müller
2016-09-21  5:30 ` [PATCH 2/2] scons.bbclass: reduce build time by adding PARALLEL_MAKEINST to scons install params Andreas Müller
2016-09-21  9:03   ` Burton, Ross
2016-09-21  9:06   ` Burton, Ross
2016-09-21  9:18     ` Andreas Müller
2016-09-22 20:05     ` Andreas Müller
2016-09-22 17:45 ` [PATCH 1/2] libunwind: fix build by linking with bfd instead of gold Martin Jansa
2016-09-23  1:24 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.