[yocto] arm-*-linux-gnueabi : unrecognized option -Wl, -soname

Khem Raj raj.khem at gmail.com
Tue Sep 6 10:28:32 PDT 2016


> On Sep 5, 2016, at 6:00 AM, Pietro <pulsarpietro at posteo.net> wrote:
> 
> Well,
> 
> I am cross-compiling the gRPC using the Yocto build system, I have
> created a recipe for a new package which generates the gRPC
> library(ies).
> 
> The error comes from here *guess* :
> ifeq ($(SYSTEM),Darwin)
>     $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name
>     $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o
>     $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT)
>     $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
>     else
>        $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared
>        -Wl,-soname,libgpr.so.1 -o
>        $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT)
>        $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS)
>                       $(Q) ln -sf
>                       $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)
>                       $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so.1
>                        $(Q) ln -sf
>                        $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT)
>                        $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so
>                        endif
> 
> What's puzzles me is that the same source code builds without problem on
> my machine (not cross compiled).
> 
> It might be a question for gRPC developers though


that option -Wl,-soname,xxxx assumes LD = “gcc driver”
however when using OE, that may not be case LD variable may point to
bare ld. So in your recipe you should take care of the assumption
your makefile is making and set LD = CC

> 
> "Daniel." <danielhilst at gmail.com> writes:
> 
>> I *guess* that it should be -Wl,-soname=libgpr.so.1 intead of
>> -Wl,-soname,libgpr.so.1. Now from where this flags are comming is a
>> good question..
>> 
>> 2016-09-05 9:17 GMT-03:00 Pietro <pulsarpietro at posteo.net>:
>>> 
>>> Hi all,
>>> 
>>> I want to cross compile the gRPC library for ARM and I am using the
>>> Yocto build system.
>>> 
>>> The build fails for the following error, which I am suspicious has
>>> something to do with the compiler being used:
>>> 
>>> 
>>> [LD]      Linking
>>> /export/arm/xxx/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/libs/opt/libgpr.so.1.0.0-pre1
>>> 
>>> arm-phytec-linux-gnueabi-ld
>>> : unrecognized option '
>>> -Wl,-soname,libgpr.so.1
>>> 
>>> 
>>> arm-phytec-linux-gnueabi-ld
>>> : use the --help option for usage information
>>> 
>>> 
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>> 
>> 
>> 
>> --
>> "Do or do not. There is no try"
>>  Yoda Master
> 
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160906/1894b419/attachment.pgp>


More information about the yocto mailing list