2013年9月15日星期日

/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)

I use the arm-none-linux-gnueabi-gcc cross compiler to do , you can always compile the past, an error message is as follows:

gcc-shared .libs/dev2gif.o .libs / dgif_lib.o .libs / egif_lib.o .libs / gif_err.o .libs / gif_font.o .libs / gif_hash . o .libs / gifalloc.o .libs / qprintf.o .libs / quantize.o-Wl,-soname-Wl, libgif.so.4-o .libs / libgif . so.4.1.6
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs/dev2gif.o: Relocations in generic ELF (EM: 40)
.libs/dev2gif.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make [2]: *** [libgif.la] Error 1
make [2]: Leaving directory `/ home/ema/lzq/giflib-qq4.1.6/lib '
make [1]: *** [all-recursive] Error 1
make [1]: Leaving directory `/ home/ema/lzq/giflib-qq4.1.6 '
make: *** [all] Error 2


I have tried so many ways , always unsuccessful , I hope explain, thank you ~ ~ ~
------ Solution -------------- ------------------------------
then try the following method it:
. / configure - host = host you want to run the program you used CC = cross compiler chain
------ For reference only ---------------------------------------
I use jepg9, as 6b do not know, I have encountered this problem :
CCLD libjpeg.la
/ usr / bin / ld: .libs / jaricom.o: Relocations in generic ELF (EM: 40)
/ usr / bin / ld: .libs / jaricom.o: Relocations in generic ELF (EM: 40)
.libs / jaricom.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make [1]: *** [libjpeg.la] Error 1
make [1]: Leaving directory `/ home/wangqi/jpeg-9 '
make: *** [all] Error 2
solution is . / configure when you want to configure :
. / configure CC = arm-fsl-linux-gnueabi-gcc LD = arm-fsl-linux-gnueabi-ld - prefix = / home / wangqi / lib-jpeg / - exec -prefix = / home / wangqi / lib-jpeg / - enable-shared - enable-static - host = arm-fsl-linux-gnueabi
CC compiler
LD to configure
- host is best set in addition to the CC and LD -ld -gcc and the front part , such as arm-fsl-linux-gnueabi, because the production of the makefile can automatically add arm-fsl-linux-gnueabi -ramlib the like, eliminating their own hand setting.
finally make when he is not using / usr / bin / ld , and you can compile

没有评论:

发表评论