* [Buildroot] [PATCH 1/1] crda: fix build failure for nios2
@ 2014-02-16 22:16 Frank Bergmann
2014-02-16 22:28 ` Samuel Martin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Frank Bergmann @ 2014-02-16 22:16 UTC (permalink / raw)
To: buildroot
libgcrypt depends on libgpg-error and this isn't accounted for in
crda makefile, but it is in libgcrypt-config script (in the correct
order for linking), so set LDLIBS calling this script not only for
static linking.
Fixes http://autobuild.buildroot.org/results/156/15656ef0187b0a8db6c66fc7a7fcb58a99999fa1
Signed-off-by: Frank Bergmann <frank@frajasalo.de>
---
package/crda/crda.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/crda/crda.mk b/package/crda/crda.mk
index ce87d44..c7e9b2d 100644
--- a/package/crda/crda.mk
+++ b/package/crda/crda.mk
@@ -16,12 +16,12 @@ CRDA_LICENSE_FILES = LICENSE
# And library order matters hence stick -lnl-3 first since it's appended
# in the crda Makefiles as in NLLIBS+=-lnl-3 ... thus failing.
#
-# libgcrypt needs -lgpg-error if linking statically, which is correctly
-# set by the libgcrypt-config script (and in the right order).
ifeq ($(BR2_PREFER_STATIC_LIB),y)
CRDA_NLLIBS += -lnl-3 -lm -lpthread
-CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`
endif
+# libgcrypt needs -lgpg-error, which is correctly
+# set by the libgcrypt-config script (and in the right order).
+CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`
define CRDA_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/1] crda: fix build failure for nios2
2014-02-16 22:16 [Buildroot] [PATCH 1/1] crda: fix build failure for nios2 Frank Bergmann
@ 2014-02-16 22:28 ` Samuel Martin
2014-02-18 16:09 ` Thomas Petazzoni
2014-02-18 21:25 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Samuel Martin @ 2014-02-16 22:28 UTC (permalink / raw)
To: buildroot
On Sun, Feb 16, 2014 at 11:16 PM, Frank Bergmann <frank@frajasalo.de> wrote:
> libgcrypt depends on libgpg-error and this isn't accounted for in
> crda makefile, but it is in libgcrypt-config script (in the correct
> order for linking), so set LDLIBS calling this script not only for
> static linking.
>
> Fixes
> http://autobuild.buildroot.org/results/156/15656ef0187b0a8db6c66fc7a7fcb58a99999fa1
>
> Signed-off-by: Frank Bergmann <frank@frajasalo.de>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] crda: fix build failure for nios2
2014-02-16 22:16 [Buildroot] [PATCH 1/1] crda: fix build failure for nios2 Frank Bergmann
2014-02-16 22:28 ` Samuel Martin
@ 2014-02-18 16:09 ` Thomas Petazzoni
2014-02-18 21:25 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-02-18 16:09 UTC (permalink / raw)
To: buildroot
Dear Frank Bergmann,
On Sun, 16 Feb 2014 23:16:34 +0100, Frank Bergmann wrote:
> libgcrypt depends on libgpg-error and this isn't accounted for in
> crda makefile, but it is in libgcrypt-config script (in the correct
> order for linking), so set LDLIBS calling this script not only for
> static linking.
>
> Fixes http://autobuild.buildroot.org/results/156/15656ef0187b0a8db6c66fc7a7fcb58a99999fa1
>
> Signed-off-by: Frank Bergmann <frank@frajasalo.de>
> ---
> package/crda/crda.mk | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Note that the patch didn't apply for me on the latest master. It might
be caused by whitespace damage. Frank, please use "git send-email" to
send your patches the next time, because your e-mail client is doing
funky things with patches that render them unapplicable.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/1] crda: fix build failure for nios2
2014-02-16 22:16 [Buildroot] [PATCH 1/1] crda: fix build failure for nios2 Frank Bergmann
2014-02-16 22:28 ` Samuel Martin
2014-02-18 16:09 ` Thomas Petazzoni
@ 2014-02-18 21:25 ` Peter Korsgaard
2014-02-18 22:20 ` Frank Bergmann
2 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2014-02-18 21:25 UTC (permalink / raw)
To: buildroot
>>>>> "Frank" == Frank Bergmann <frank@frajasalo.de> writes:
> libgcrypt depends on libgpg-error and this isn't accounted for in
> crda makefile, but it is in libgcrypt-config script (in the correct
> order for linking), so set LDLIBS calling this script not only for
> static linking.
> Fixes http://autobuild.buildroot.org/results/156/15656ef0187b0a8db6c66fc7a7fcb58a99999fa1
I know both Samuel and Thomas added their acks, but I still don't get
how this can be a nios2 only thing.
On ARM, I don't see libgpg-error exporting such a symbol:
./output/host/usr/bin/arm-linux-nm -D output/target/usr/lib/libgpg-error.so
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w _Jv_RegisterClasses
0000abf8 A __bss_end__
0000abdc A __bss_start
0000abdc A __bss_start__
w __cxa_finalize
w __deregister_frame_info
0000abf8 A __end__
U __errno_location
U __glibc_strerror_r
w __register_frame_info
0000abf8 A _bss_end__
0000abdc A _edata
0000abf8 A _end
00000d20 T _fini
000005fc T _init
00000c14 T gpg_err_code_from_errno
00000c90 T gpg_err_code_from_syserror
00000bdc T gpg_err_code_to_errno
00000844 T gpg_err_deinit
0000068c T gpg_err_init
00000848 T gpg_err_set_errno
000008f8 T gpg_error_check_version
00000a6c T gpg_strerror
00000ac4 T gpg_strerror_r
000009b8 T gpg_strsource
U memcpy
U strerror
U strlen
I don't see crda explicitly accessing a _gp symbol:
grep -rls gp output/build/crda-1.1.3
And libgcrypt lists gpg-error as NEEDED, so the runtime linker should
pull it in automatically without us having to explicitly link with it:
./output/host/usr/bin/arm-linux-readelf -a output/target/usr/lib/libgcrypt.so|grep NEEDED
0x00000001 (NEEDED) Shared library: [libgpg-error.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
Are we sure we're not really just pampering over some kind of nios2
binutils / ld issue?
> Signed-off-by: Frank Bergmann <frank@frajasalo.de>
> ---
> package/crda/crda.mk | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> diff --git a/package/crda/crda.mk b/package/crda/crda.mk
> index ce87d44..c7e9b2d 100644
> --- a/package/crda/crda.mk
> +++ b/package/crda/crda.mk
> @@ -16,12 +16,12 @@ CRDA_LICENSE_FILES = LICENSE
> # And library order matters hence stick -lnl-3 first since it's appended
> # in the crda Makefiles as in NLLIBS+=-lnl-3 ... thus failing.
> #
> -# libgcrypt needs -lgpg-error if linking statically, which is correctly
> -# set by the libgcrypt-config script (and in the right order).
> ifeq ($(BR2_PREFER_STATIC_LIB),y)
> CRDA_NLLIBS += -lnl-3 -lm -lpthread
> -CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`
> endif
> +# libgcrypt needs -lgpg-error, which is correctly
> +# set by the libgcrypt-config script (and in the right order).
> +CRDA_LDLIBS += `$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`
> define CRDA_BUILD_CMDS
> $(TARGET_CONFIGURE_OPTS) \
> --
> 1.7.10.4
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/1] crda: fix build failure for nios2
2014-02-18 21:25 ` Peter Korsgaard
@ 2014-02-18 22:20 ` Frank Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Frank Bergmann @ 2014-02-18 22:20 UTC (permalink / raw)
To: buildroot
On 18.02.2014 22:25, Peter Korsgaard wrote:
>>>>>> "Frank" == Frank Bergmann <frank@frajasalo.de> writes:
>
> > libgcrypt depends on libgpg-error and this isn't accounted for in
> > crda makefile, but it is in libgcrypt-config script (in the correct
> > order for linking), so set LDLIBS calling this script not only for
> > static linking.
>
> > Fixes http://autobuild.buildroot.org/results/156/15656ef0187b0a8db6c66fc7a7fcb58a99999fa1
>
> I know both Samuel and Thomas added their acks, but I still don't get
> how this can be a nios2 only thing.
>
> On ARM, I don't see libgpg-error exporting such a symbol:
But on nios2:
./output/host/usr/bin/nios2-linux-gnu-nm -D output/target/usr/lib/libgpg-error.so
U bindtextdomain
00004278 S __bss_start
w __cxa_finalize
U dcgettext
00004278 G _edata
00004280 S _end
U __errno_location
000012a0 T _fini
0000c190 A _gp
000010ac T gpg_err_code_from_errno
00001154 T gpg_err_code_from_syserror
00001050 T gpg_err_code_to_errno
00000b40 T gpg_err_deinit
000008f4 T gpg_err_init
00000c88 T gpg_error_check_version
00000b44 T gpg_err_set_errno
00000e3c T gpg_strerror
00000ed0 T gpg_strerror_r
00000d54 T gpg_strsource
000007e8 T _init
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
w _Jv_RegisterClasses
U memcpy
U strerror
U strerror_r
U strlen
> I don't see crda explicitly accessing a _gp symbol:
>
> grep -rls gp output/build/crda-1.1.3
>
> And libgcrypt lists gpg-error as NEEDED, so the runtime linker should
> pull it in automatically without us having to explicitly link with it:
>
> ./output/host/usr/bin/arm-linux-readelf -a output/target/usr/lib/libgcrypt.so|grep NEEDED
> 0x00000001 (NEEDED) Shared library: [libgpg-error.so.0]
> 0x00000001 (NEEDED) Shared library: [libc.so.0]
>
> Are we sure we're not really just pampering over some kind of nios2
> binutils / ld issue?
Not really. The binary starts but I have no wireless device and infrastructure
to fully test it on a target.
So drop the patch and disable crda for nios2 ?
Frank.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-18 22:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-16 22:16 [Buildroot] [PATCH 1/1] crda: fix build failure for nios2 Frank Bergmann
2014-02-16 22:28 ` Samuel Martin
2014-02-18 16:09 ` Thomas Petazzoni
2014-02-18 21:25 ` Peter Korsgaard
2014-02-18 22:20 ` Frank Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox