arm-*-linux-gnueabi : unrecognized option -Wl, -soname
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
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 <[email protected]>:
Quoted 27 lines
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-pre1arm-phytec-linux-gnueabi-ld
: unrecognized option '
-Wl,-soname,libgpr.so.1arm-phytec-linux-gnueabi-ld
: use the --help option for usage information--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 2 lines
"Do or do not. There is no try" Yoda Master
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
endifWhat'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
Quoted 38 lines · Daniel.
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 <[email protected]>:
Quoted 27 lines
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-pre1arm-phytec-linux-gnueabi-ld
: unrecognized option '
-Wl,-soname,libgpr.so.1arm-phytec-linux-gnueabi-ld
: use the --help option for usage information--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctoSignature · 2 lines
"Do or do not. There is no try" Yoda Master
Try to crosscompile "by hand" using Yocto toolschains. then try to crosscompile it inside Yocto. Does gRPC uses autotools? If so you may be interested in $CONFIGURE_FLAGS setted by Yocto' environment setup script. Here is an example of how I did compile libfprint using Yocto's toolchain: http://pastebin.com/hyzrd3up
Regards :)
2016-09-05 10:00 GMT-03:00 Pietro <[email protected]>:
Quoted 76 lines
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 endifWhat'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
Quoted 35 lines · Daniel.
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 <[email protected]>:
Quoted 22 lines
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-pre1arm-phytec-linux-gnueabi-ld
: unrecognized option '
-Wl,-soname,libgpr.so.1arm-phytec-linux-gnueabi-ld
: use the --help option for usage informationQuoted 5 lines
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctoQuoted 3 lines
--
"Do or do not. There is no try"
Yoda Master--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Signature · 2 lines
"Do or do not. There is no try" Yoda Master
Quoted 3 lines · Daniel.
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..
No that is correct, I double checked.
I would love to build the library "by hand" - namely without using bitbake - from the build directory, the build log tells :
+ bbnote make -j 4
CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git
+ echo NOTE: make -j 4 CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a
-marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git
Of course jumping in the build directory and issuing the command does not work as the make tool does not recognize options such as -marm and companions as they are gcc's options.
I have manually added the cross compiler folder to my local PATH but and I have quoted all the gcc's options under the CC variable:
CC='arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork ...'
Is there a standard/better way to do it ? That results in an error as some header files could not be found
[C] Compiling src/core/lib/profiling/basic_timers.c
In file included from /export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/features.h:389:0, from include/grpc/impl/codegen/port_platform.h:193,
frominclude/grpc/support/port_platform.h:37,
fromsrc/core/lib/profiling/basic_timers.c:34:
/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/gnu/stubs.h:7:29:
fatal error:gnu/stubs-soft.h: No
such file or
directory
# include <gnu/stubs-soft.h>
I am not getting this error when building using bitbake therefore I am pretty sure I am missing some include paths or .. what ?
Quoted 35 lines
2016-09-05 9:17 GMT-03:00 Pietro <[email protected]>:
Quoted 27 lines
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-pre1arm-phytec-linux-gnueabi-ld
: unrecognized option '
-Wl,-soname,libgpr.so.1arm-phytec-linux-gnueabi-ld
: use the --help option for usage information--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctoSignature · 2 lines
"Do or do not. There is no try" Yoda Master
Quoted 55 lines · Pietro
Quoted 3 lines · Daniel.
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..
No that is correct, I double checked.
I would love to build the library "by hand" - namely without using bitbake - from the build directory, the build log tells :
+ bbnote make -j 4
CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git
+ echo NOTE: make -j 4 CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a
-marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/gitOf course jumping in the build directory and issuing the command does not work as the make tool does not recognize options such as -marm and companions as they are gcc's options.
I have manually added the cross compiler folder to my local PATH but and I have quoted all the gcc's options under the CC variable:
CC='arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork ...'
Is there a standard/better way to do it ? That results in an error as some header files could not be found
[C] Compiling
src/core/lib/profiling/basic_timers.c
In file included from /export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/features.h:389:0, frominclude/grpc/impl/codegen/port_platform.h:193,
frominclude/grpc/support/port_platform.h:37,
fromsrc/core/lib/profiling/basic_timers.c:34:
/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/gnu/stubs.h:7:29:
fatal error:gnu/stubs-soft.h: No
such file or
directory
Quoted 5 lines
# include <gnu/stubs-soft.h>I am not getting this error when building using bitbake therefore I am pretty sure I am missing some include paths or .. what ?
Maybe the Makefile they have is just not up to the task of cross compilation. I see that gRPC comes with a cmake setup as well, why not use that? You'll need inherit cmake in your recipe and try with default build scripts first.
Cheers,
Signature · 2 lines
Maciej Borzecki RnDity
Maciej Borzęcki
Quoted 62 lines · <[email protected]> writes:
Quoted 55 lines · Pietro
Quoted 3 lines · Daniel.
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..
No that is correct, I double checked.
I would love to build the library "by hand" - namely without using bitbake - from the build directory, the build log tells :
+ bbnote make -j 4
CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork
-mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git
+ echo NOTE: make -j 4 CC=arm-phytec-linux-gnueabi-gcc -march=armv7-a
-marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1
LDFLAGS="" -I/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/git/include BUILDDIR=/export/arm/pietro/PD15.1/build/tmp-glibc/work/cortexa8t2hf-vfp-neon-phytec-linux-gnueabi/libgrpc/1.0.0-r0/gitOf course jumping in the build directory and issuing the command does not work as the make tool does not recognize options such as -marm and companions as they are gcc's options.
I have manually added the cross compiler folder to my local PATH but and I have quoted all the gcc's options under the CC variable:
CC='arm-phytec-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork ...'
Is there a standard/better way to do it ? That results in an error as some header files could not be found
[C] Compiling
src/core/lib/profiling/basic_timers.c
In file included from /export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/features.h:389:0, frominclude/grpc/impl/codegen/port_platform.h:193,
frominclude/grpc/support/port_platform.h:37,
fromsrc/core/lib/profiling/basic_timers.c:34:
/export/arm/pietro/PD15.1/build/tmp-glibc/sysroots/phycore-am335x-1/usr/include/gnu/stubs.h:7:29:
fatal error:gnu/stubs-soft.h: No
such file or
directoryQuoted 5 lines
# include <gnu/stubs-soft.h>I am not getting this error when building using bitbake therefore I am pretty sure I am missing some include paths or .. what ?
Quoted 9 lines
Maybe the
Makefilethey have is just not up to the task of cross compilation. I see that gRPC comes with a cmake setup as well, why not use that? You'll needinherit cmakein your recipe and try with default build scripts first.Cheers,
Signature · 2 lines
Maciej Borzecki RnDity
I did try but I am getting errors, cmake results in error when compiling from my machine as well and in fact the gRPC webpage tells CMake is in experimental state:
Quoted 28 lines · Pietro
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
Quoted 4 lines
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
Quoted 47 lines
Quoted 35 lines · Daniel.
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 <[email protected]>:
Quoted 22 lines
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-pre1arm-phytec-linux-gnueabi-ld
: unrecognized option '
-Wl,-soname,libgpr.so.1arm-phytec-linux-gnueabi-ld
: use the --help option for usage informationQuoted 5 lines
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yoctoQuoted 3 lines
--
"Do or do not. There is no try"
Yoda Master--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto