编译239版本的一些问题:
1.编译到 SDL_ttf 库时报错
armv4t-maxwit-linux-gnueabi-gcc -g -O2 -I/maxwit/sysroot/usr/include/freetype2 -I/maxwit/sysroot/usr/include -I/maxwit/sysroot/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -DHAVE_OPENGL -o .libs/showfont showfont.o -Wl,-rpath -Wl,/maxwit/sysroot/usr/lib ./.libs/libSDL_ttf.so -L/maxwit/sysroot/usr/lib /maxwit/sysroot/usr/lib/libfreetype.so -lz /maxwit/sysroot/usr/lib/libSDL.so -lm -ldl -lpthread -Wl,--rpath -Wl,/maxwit/sysroot/usr/lib
creating showfont
if armv4t-maxwit-linux-gnueabi-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_ttf\" -DVERSION=\"2.0.9\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -I. -I. -g -O2 -I/maxwit/sysroot/usr/include/freetype2 -I/maxwit/sysroot/usr/include -I/maxwit/sysroot/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -DHAVE_OPENGL -MT glfont.o -MD -MP -MF ".deps/glfont.Tpo" -c -o glfont.o glfont.c; \
then mv -f ".deps/glfont.Tpo" ".deps/glfont.Po"; else rm -f ".deps/glfont.Tpo"; exit 1; fi
/bin/bash ./libtool --tag=CC --mode=link armv4t-maxwit-linux-gnueabi-gcc -g -O2 -I/maxwit/sysroot/usr/include/freetype2 -I/maxwit/sysroot/usr/include -I/maxwit/sysroot/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -DHAVE_OPENGL -o glfont glfont.o libSDL_ttf.la -L/usr/lib -lGL -lm -L/maxwit/sysroot/usr/lib -lfreetype -lz -L/maxwit/sysroot/usr/lib -Wl,-rpath,/maxwit/sysroot/usr/lib -lSDL -lpthread
armv4t-maxwit-linux-gnueabi-gcc -g -O2 -I/maxwit/sysroot/usr/include/freetype2 -I/maxwit/sysroot/usr/include -I/maxwit/sysroot/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include -DHAVE_OPENGL -o .libs/glfont glfont.o -Wl,-rpath -Wl,/maxwit/sysroot/usr/lib ./.libs/libSDL_ttf.so -L/maxwit/sysroot/usr/lib /maxwit/sysroot/usr/lib/libfreetype.so /maxwit/sysroot/usr/lib/libSDL.so -ldl -L/usr/lib -lGL -lm /usr/lib/libfreetype.so -lz /usr/lib/libSDL.so -lpthread -Wl,--rpath -Wl,/maxwit/sysroot/usr/lib
/maxwit/sysroot/usr/bin/../lib/gcc/armv4t-maxwit-linux-gnueabi/4.2.1/../../../../armv4t-maxwit-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libGL.so when searching for -lGL
/maxwit/sysroot/usr/bin/../lib/gcc/armv4t-maxwit-linux-gnueabi/4.2.1/../../../../armv4t-maxwit-linux-gnueabi/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [glfont] Error 1
个人的解决方法:
修改了sdl_tff.sh 脚本,为 congfigure 添加了 --without-x 选项.
在局部make通过
记得在旧版本里好像是有 --without-x 选项的,新版本里特意去掉的么?
不知道这样修改是否合理
2.编译toolchain时报错(未解决)
编译前将 build.sh 中的
TARGET_CPU 修改成 arm926ej-s
另外将 SRC_PATH 和 BUILD_PATH 修改为其他路径
在编译到 toolchain 的 gcc一次编译时报错:
objext='.o' \
LIB1ASMFUNCS='_udivsi3 _divsi3 _umodsi3 _modsi3 _bb_init_func _call_via_rX _interwork_call_via_rX _lshrdi3 _ashrdi3 _ashldi3 _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundidf _floatundisf _aeabi_lcmp _aeabi_ulcmp _aeabi_ldivmod _aeabi_uldivmod _dvmd_lnx' \
LIB2FUNCS_ST='_eprintf __gcc_bcmp' \
LIB2FUNCS_EXCLUDE='' \
LIBGCOV='_gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_fork _gcov_execl _gcov_execlp _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler' \
LIB2ADD='../../gcc-4.2.1/gcc/config/arm/bpabi.c ../../gcc-4.2.1/gcc/config/arm/unaligned-funcs.c' \
LIB2ADD_ST='' \
LIB2ADDEH='../../gcc-4.2.1/gcc/config/arm/unwind-arm.c ../../gcc-4.2.1/gcc/config/arm/libunwind.S ../../gcc-4.2.1/gcc/config/arm/pr-support.c ../../gcc-4.2.1/gcc/unwind-c.c' \
LIB2ADDEHSTATIC='../../gcc-4.2.1/gcc/config/arm/unwind-arm.c ../../gcc-4.2.1/gcc/config/arm/libunwind.S ../../gcc-4.2.1/gcc/config/arm/pr-support.c ../../gcc-4.2.1/gcc/unwind-c.c' \
LIB2ADDEHSHARED='../../gcc-4.2.1/gcc/config/arm/unwind-arm.c ../../gcc-4.2.1/gcc/config/arm/libunwind.S ../../gcc-4.2.1/gcc/config/arm/pr-support.c ../../gcc-4.2.1/gcc/unwind-c.c' \
LIB2ADDEHDEP='../../gcc-4.2.1/gcc/config/arm/unwind-arm.h ../../gcc-4.2.1/gcc/config/arm/lib1funcs.asm' \
LIB2_SIDITI_CONV_FUNCS='' \
LIBUNWIND='' \
LIBUNWINDDEP='' \
SHLIBUNWIND_LINK='' \
SHLIBUNWIND_INSTALL='' \
FPBIT='' \
FPBIT_FUNCS='_pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf' \
LIB2_DIVMOD_FUNCS='_divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4' \
DPBIT='' \
DPBIT_FUNCS='_pack_df _unpack_df _addsub_df _mul_df _div_df _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df' \
TPBIT='' \
TPBIT_FUNCS='_pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf' \
DFP_ENABLE='' \
DFP_CFLAGS='' \
D32PBIT='' \
D32PBIT_FUNCS='_addsub_sd _div_sd _mul_sd _plus_sd _minus_sd _eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd _sd_to_si _sd_to_di _sd_to_usi _sd_to_udi _si_to_sd _di_to_sd _usi_to_sd _udi_to_sd _sd_to_sf _sd_to_df _sd_to_xf _sf_to_sd _df_to_sd _xf_to_sd _sd_to_dd _sd_to_td _unord_sd _conv_sd' \
D64PBIT='' \
D64PBIT_FUNCS='_addsub_dd _div_dd _mul_dd _plus_dd _minus_dd _eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd _dd_to_si _dd_to_di _dd_to_usi _dd_to_udi _si_to_dd _di_to_dd _usi_to_dd _udi_to_dd _dd_to_sf _dd_to_df _dd_to_xf _sf_to_dd _df_to_dd _xf_to_dd _dd_to_sd _dd_to_td _unord_dd _conv_dd' \
D128PBIT='' \
D128PBIT_FUNCS='_addsub_td _div_td _mul_td _plus_td _minus_td _eq_td _ne_td _lt_td _gt_td _le_td _ge_td _td_to_si _td_to_di _td_to_usi _td_to_udi _si_to_td _di_to_td _usi_to_td _udi_to_td _td_to_sf _td_to_df _td_to_xf _sf_to_td _df_to_td _xf_to_td _td_to_sd _td_to_dd _unord_td _conv_td' \
MULTILIBS=`/tmp/build/gcc-build-1/./gcc/xgcc -B/tmp/build/gcc-build-1/./gcc/ -B/usr/armv5te-maxwit-linux-gnueabi/bin/ -B/usr/armv5te-maxwit-linux-gnueabi/lib/ -isystem /usr/armv5te-maxwit-linux-gnueabi/include -isystem /usr/armv5te-maxwit-linux-gnueabi/sys-include --print-multi-lib` \
EXTRA_MULTILIB_PARTS='crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o' \
SHLIB_LINK='/tmp/build/gcc-build-1/./gcc/xgcc -B/tmp/build/gcc-build-1/./gcc/ -B/usr/armv5te-maxwit-linux-gnueabi/bin/ -B/usr/armv5te-maxwit-linux-gnueabi/lib/ -isystem /usr/armv5te-maxwit-linux-gnueabi/include -isystem /usr/armv5te-maxwit-linux-gnueabi/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,--soname=@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] -Wl,--version-script=@shlib_map_file@ -o @multilib_dir@/@[email=shlib_base_name@.so.1.tmp]shlib_base_name@.so.1.tmp[/email] @multilib_flags@ @shlib_objs@ -lc && rm -f @multilib_dir@/@shlib_base_name@.so && if [ -f @multilib_dir@/@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] ]; then mv -f @multilib_dir@/@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] @multilib_dir@/@[email=shlib_base_name@.so.1.backup]shlib_base_name@.so.1.backup[/email]; else true; fi && mv @multilib_dir@/@[email=shlib_base_name@.so.1.tmp]shlib_base_name@.so.1.tmp[/email] @multilib_dir@/@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] && ln -s @[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] @multilib_dir@/@shlib_base_name@.so' \
SHLIB_INSTALL='$(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; /usr/bin/install -c -m 644 @multilib_dir@/@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email]; rm -f $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; ln -s @[email=shlib_base_name@.so.1]shlib_base_name@.so.1[/email] $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so' \
SHLIB_EXT='.so' \
SHLIB_MULTILIB='' \
SHLIB_MKMAP='../../gcc-4.2.1/gcc/mkmap-symver.awk' \
SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='../../gcc-4.2.1/gcc/libgcc-std.ver ../../gcc-4.2.1/gcc/config/libgcc-glibc.ver ../../gcc-4.2.1/gcc/config/libgcc-glibc.ver ../../gcc-4.2.1/gcc/config/arm/libgcc-bpabi.ver' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
ASM_HIDDEN_OP='' \
GCC_FOR_TARGET='/tmp/build/gcc-build-1/./gcc/xgcc -B/tmp/build/gcc-build-1/./gcc/ -B/usr/armv5te-maxwit-linux-gnueabi/bin/ -B/usr/armv5te-maxwit-linux-gnueabi/lib/ -isystem /usr/armv5te-maxwit-linux-gnueabi/include -isystem /usr/armv5te-maxwit-linux-gnueabi/sys-include' \
mkinstalldirs='/bin/sh ../../gcc-4.2.1/gcc/../mkinstalldirs' \
/bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \
/bin/sh ../../gcc-4.2.1/gcc/mkconfig.sh tconfig.h
/tmp/build/gcc-build-1/./gcc/xgcc -B/tmp/build/gcc-build-1/./gcc/ -B/usr/armv5te-maxwit-linux-gnueabi/bin/ -B/usr/armv5te-maxwit-linux-gnueabi/lib/ -isystem /usr/armv5te-maxwit-linux-gnueabi/include -isystem /usr/armv5te-maxwit-linux-gnueabi/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-4.2.1/gcc -I../../gcc-4.2.1/gcc/. -I../../gcc-4.2.1/gcc/../include -I../../gcc-4.2.1/gcc/../libcpp/include -I../../gcc-4.2.1/gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder \
-c ../../gcc-4.2.1/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
exec: 2: -mcpu=arm926ej-s: not found
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/tmp/build/gcc-build-1/gcc'
make: *** [all-gcc] Error 2
目前还没解决...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
第一个问题:错误是由于链接了opengl的库造成的,如果能让其不链接此库,我想这个错误也许就不会出现了。
第二个问题:以前我也碰到过,不过是-mcpu=arm920t时出的错。同样的脚本,host端环境不一样可能会出错。请检查输入字符是否为英文的。
有问题可随时发贴讨论。
“请检查输入字符是否为英文的” 什么意思? 检查哪里的输入字符?