2013-11-27 6 views
4

libcurl이 포함 된 ucLinux를 컴파일하려고했지만 libbzip2를 컴파일 할 때 barfs 구성에 컬을 포함시킬 때가 있습니다.ucLinux libbzip2 크로스 컴파일 할 때 reloc 유형 오류가 발생했습니다.

저는 coldfire 68K 프로세서에 대해 이것을 크로스 컴파일하고 있습니다.

재배치 유형이 PIC에 대해 지원되지 않지만이 문제를 해결할 방법이 없습니다. 어쨌든 모든 라이브러리를 PIC로 컴파일 할 필요가 있다는 인상하에있었습니다.

make[4]: Entering directory `/home/lantronix/linuxsdk/linux/lib/libbzip2' 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c blocksort.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c huffman.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c crctable.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c randtable.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c compress.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c decompress.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -O2 -g -fomit-frame-pointer -pipe -fno-common -fno-builtin -Wall -DEMBED -fno-dwarf2-cfi-asm -msep-data -Dlinux -D__linux__ -Dunix -D__uClinux__ -c bzlib.c 
ucfront-gcc m68k-uclinux-gcc -mcpu=5208 -DCONFIG_COLDFIRE -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.3 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
ERROR: reloc type R_68K_32 is not supported for PIC 
43 bad relocs 
/home/lantronix/linuxsdk/toolchains/freescale-coldfire-4.4/m68k-uclinux/bin/ld.real: warning: cannot find entry symbol _start; defaulting to 00000000 
collect2: ld returned 1 exit status 
make[4]: *** [all] Error 1 
make[4]: Leaving directory `/home/lantronix/linuxsdk/linux/lib/libbzip2' 
make[3]: *** [libbzip2] Error 2 
make[3]: Leaving directory `/home/lantronix/linuxsdk/linux/lib' 
make[2]: *** [all] Error 2 
make[2]: Leaving directory `/home/lantronix/linuxsdk/linux/lib' 
make[1]: *** [subdirs] Error 1 
make[1]: Leaving directory `/home/lantronix/linuxsdk/linux' 
make: *** [build] Error 2 
+0

'-fPIC'을 수동으로 시도해 보셨습니까? 전체 빌드가 필요하거나 필요없이 빌드가 필요합니다. 혼합 할 수 없습니다. – lynxlynxlynx

+0

-fPIC없이 다시 컴파일하십시오 ... (또한 수동으로 응답을 확인하지 않으므로 @ me에게 알려주십시오) – user2284570

답변

0

나는 -msep-data 플래그를 노크 (또는 후 -mno-sep-data 퍼팅)이 경고가 사라질 수 있음을 발견 : 여기

이 출력됩니다. GCC doc page에서 :

데이터 세그먼트가 텍스트 세그먼트에서 메모리의 다른 지역에 위치 할 수 있도록 코드를 생성합니다. 이를 통해 가상 메모리 관리 기능이없는 환경에서 실행을 제자리에서 실행할 수 있습니다. 이 옵션은 -fPIC을 의미합니다.

-fPIC 또는 -fno-PIC도 아무런 효과가 없다는 것을 알았습니다.