使用以下命令配置glib:
./configure --prefix="$PWD/../release/bluez_libs" --host=arm-linux CC="arm-linux-gcc -I/home/sp/Bluez/release/bluez_libs/include -L/home/sp/Bluez/release/bluez_libs/lib" PKG_CONFIG_PATH="$PWD/../release/bluez_libs/lib/pkgconfig" ac_cv_type_long_long=yes glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getgrgid_r=yes ac_cv_func_posix_getpwuid_r=yes
使用make编译时,出现以下错误,实在是不知道该怎么解决了。
/usr/local/arm/4.4.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libgmodule-2.0.so.0, needed by ./.libs/libgio-2.0.so, not found (try using -rpath or -rpath-link)
./.libs/libgio-2.0.so: undefined reference to `g_module_close'
./.libs/libgio-2.0.so: undefined reference to `g_module_symbol'
./.libs/libgio-2.0.so: undefined reference to `g_module_supported'
./.libs/libgio-2.0.so: undefined reference to `g_module_open'
./.libs/libgio-2.0.so: undefined reference to `g_module_error'
在ubuntu下编译正常,指定host为arm-linux后,才出现的错误。我水平太低,搜了好久也没找到合适的解决办法,也不知道是哪个依赖库出了问题。
./configure --prefix=/usr
在ubuntu12.10 amd64上交叉编译运行于arm上的glib2.35.8,求大侠看看编译错误。
-
- 帖子: 15
- 注册时间: 2008-08-19 9:25
Re: 在ubuntu12.10 amd64上交叉编译运行于arm上的glib2.35.8,求大侠看看编译错误。
各位大侠,有没有人知道我该去哪提问呢?国外的论坛也行啊。
-
- 帖子: 15
- 注册时间: 2008-08-19 9:25
Re: 在ubuntu12.10 amd64上交叉编译运行于arm上的glib2.35.8,求大侠看看编译错误。
之前使用的arm-linux-4.4.3
现在使用了arm-linux-4.3.2
又出现了其他的编译错误
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_xor_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_sub_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_add_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_bool_compare_and_swap_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_or_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_and_4'
collect2: ld returned 1 exit status
make[4]: *** [gtester] 错误 1
意思是在找不到这些函数的定义吗?
我使用 find . | xargs grep -nH "sync_fetch_" 搜索整个目录,只有./glib/gatomic.h使用过这些函数,没发现这些函数的定义在哪边?
现在使用了arm-linux-4.3.2
又出现了其他的编译错误
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_xor_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_sub_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_add_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_bool_compare_and_swap_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_or_4'
./.libs/libglib-2.0.so: undefined reference to `__sync_fetch_and_and_4'
collect2: ld returned 1 exit status
make[4]: *** [gtester] 错误 1
意思是在找不到这些函数的定义吗?
我使用 find . | xargs grep -nH "sync_fetch_" 搜索整个目录,只有./glib/gatomic.h使用过这些函数,没发现这些函数的定义在哪边?