zlgopen / awtk-linux-fb

awtk port for linux framebuffer
108 stars 49 forks source link

在野火i.MX6ULL Pro板嵌入式ARM开发板中使用arm-linux-gnueabihf-gcc交叉编译工具提示“awtk-port/tslib_thread.c:25:19: fatal error: tslib.h: No such file or directory” #39

Closed unflypig closed 4 years ago

unflypig commented 4 years ago

zt@ubuntu:~/work/code/awtk-linux-fb$ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... /home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -o awtk-port/tslib_thread.o -c -std=gnu99 -Wall -Os -DHAS_STD_MALLOC -DHAS_STDIO -DWITH_VGCANVAS -DWITH_UNICODE_BREAK -DLINUX -DWITH_ASSET_LOADER -DWITH_FS_RES -DSTBTT_STATIC -DSTB_IMAGE_STATIC -DWITH_STB_IMAGE -DWITH_STB_FONT -DWITH_NANOVG_AGGE -DWITH_WIDGET_TYPE_CHECK -DWITH_IME_PINYIN -DLINUX -DHAS_PTHREAD -DENABLE_CURSOR -fPIC -DWITH_WIDGET_TYPE_CHECK=1 -DHAS_TSLIB -I/home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/include -I/home/zt/work/code/awtk -I/home/zt/work/code/awtk/src -I/home/zt/work/code/awtk/3rd -I/home/zt/work/code/awtk/src/ext_widgets -I/home/zt/work/code/awtk/tools -I/home/zt/work/code/awtk/3rd/agge -I/home/zt/work/code/awtk/3rd/agg/include -I/home/zt/work/code/awtk/3rd/nanovg -I/home/zt/work/code/awtk/3rd/nanovg/base -I/home/zt/work/code/awtk/3rd/libunibreak -I/home/zt/work/code/awtk/3rd/gpinyin/include -I/home/zt/work/code/awtk/3rd/gtest/googletest -I/home/zt/work/code/awtk/3rd/gtest/googletest/include awtk-port/tslib_thread.c awtk-port/tslib_thread.c:25:19: fatal error: tslib.h: No such file or directory compilation terminated. scons: *** [awtk-port/tslib_thread.o] Error 1 scons: building terminated because of errors.

xianjimli commented 4 years ago

不需要tslib就在awtk_config.py中把下面两个变量置为空:

TSLIB_LIB_DIR=''
TSLIB_INC_DIR=''
unflypig commented 4 years ago

不需要tslib就在awtk_config.py中把下面两个变量置为空:

TSLIB_LIB_DIR=''
TSLIB_INC_DIR=''

又出现出现错误,libgcc_s库中确实没有报错的几个函数


scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -o awtk-port/fb_test.o -c -std=gnu99 -Wall -Os -DHAS_STD_MALLOC -DHAS_STDIO -DWITH_VGCANVAS -DWITH_UNICODE_BREAK -DLINUX -DWITH_ASSET_LOADER -DWITH_FS_RES -DSTBTT_STATIC -DSTB_IMAGE_STATIC -DWITH_STB_IMAGE -DWITH_STB_FONT -DWITH_NANOVG_AGGE -DWITH_WIDGET_TYPE_CHECK -DWITH_IME_PINYIN -DLINUX -DHAS_PTHREAD -DENABLE_CURSOR -fPIC -DWITH_WIDGET_TYPE_CHECK=1 -L/home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/lib/ -I/home/zt/work/code/awtk -I/home/zt/work/code/awtk/src -I/home/zt/work/code/awtk/3rd -I/home/zt/work/code/awtk/src/ext_widgets -I/home/zt/work/code/awtk/tools -I/home/zt/work/code/awtk/3rd/agge -I/home/zt/work/code/awtk/3rd/agg/include -I/home/zt/work/code/awtk/3rd/nanovg -I/home/zt/work/code/awtk/3rd/nanovg/base -I/home/zt/work/code/awtk/3rd/libunibreak -I/home/zt/work/code/awtk/3rd/gpinyin/include -I/home/zt/work/code/awtk/3rd/gtest/googletest -I/home/zt/work/code/awtk/3rd/gtest/googletest/include awtk-port/fb_test.c
/home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc -o build/bin/demo1 build/var/awtk/demos/demo1_app.o -Lbuild/lib -Lbuild/bin -lassets -lawtk_global -lextwidgets -lwidgets -lawtk_linux_fb -lbase -lgpinyin -lstreams -lcompressors -lminiz -lubjson -ltkc -lnanovg-agge -lagge -lnanovg -llinebreak -lstdc++ -lpthread -lrt -lm -ldl
build/lib/libtkc.a(fs_os.o): In function `fs_os_get_user_storage_path':
fs_os.c:(.text+0x284): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/zt/work/tools/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libc.so.6, needed by build/lib/libgcc_s.so.1, not found (try using -rpath or -rpath-link)
build/lib/libgcc_s.so.1: undefined reference to `memset@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `realloc@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `calloc@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `abort@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `free@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `memcpy@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `raise@GLIBC_2.4'
build/lib/libgcc_s.so.1: undefined reference to `malloc@GLIBC_2.4'
collect2: error: ld returned 1 exit status
scons: *** [build/bin/demo1] Error 1
scons: building terminated because of errors.
xianjimli commented 4 years ago

libc没找到。感觉是工具链的问题。

unflypig commented 4 years ago

libc没找到。感觉是工具链的问题。

是的,感谢指导,确实是工具链出了问题