glib交叉编译错误

装载自 http://zhxt.blogbus.com/logs/67636635.html

 

configure: error: cannot run test program while cross compiling
See `config.log' for more details.

vi config.log

configure:21848: checking for growing stack pointer
configure:21855: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure:21858: error: cannot run test program while cross compiling

vi configure +21848

21848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for growing stack pointer" >&5
21849 $as_echo_n "checking for growing stack pointer... " >&6; }
21850 if test "${glib_cv_stack_grows+set}" = set; then :
21851   $as_echo_n "(cached) " >&6
21852 else
21853
21854         if test "$cross_compiling" = yes; then :
21855   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21856 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21857 as_fn_error "cannot run test program while cross compiling
21858 See \`config.log' for more details." "$LINENO" 5; }
21859 else
21860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21861 /* end confdefs.h.  */
21862
21863         volatile int *a = 0, *b = 0;
21864         void foo (void);
21865         int main () { volatile int y = 7; a = &y; foo (); return b > a; }
21866         void foo (void) { volatile int x = 5; b = &x; }
21867
21868 _ACEOF
21869 if ac_fn_c_try_run "$LINENO"; then :
21870   glib_cv_stack_grows=no
21871
21872 else
21873   glib_cv_stack_grows=yes
21874
21875 fi

add  line 21870 or line 21873 follow the ./configure

error 2.

checking for preceeding underscore in symbols... configure: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

vi config.log

configure:24734: checking for preceeding underscore in symbols
configure:24741: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure:24744: error: cannot run test program while cross compiling
See `config.log' for more details.

vi configure +24734

24734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preceeding underscore in symbols" >&5
24735 $as_echo_n "checking for preceeding underscore in symbols... " >&6; }
24736 if test "${glib_cv_uscore+set}" = set; then :
24737   $as_echo_n "(cached) " >&6
24738 else
24739
24740                 if test "$cross_compiling" = yes; then :
24741   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24743 as_fn_error "cannot run test program while cross compiling
24744 See \`config.log' for more details." "$LINENO" 5; }
24745 else
24746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24747 /* end confdefs.h.  */
24748 #include <dlfcn.h>
24749                 int glib_underscore_test (void) { return 42; }
24750                 int main() {
24751                   void *f1 = (void*)0, *f2 = (void*)0, *handle;
24752                   handle = dlopen ((void*)0, 0);
24753                   if (handle) {
24754                     f1 = dlsym (handle, "glib_underscore_test");
24755                     f2 = dlsym (handle, "_glib_underscore_test");
24756                   } return (!f2 || f1);
24757                 }
24758 _ACEOF
24759 if ac_fn_c_try_run "$LINENO"; then :
24760   glib_cv_uscore=yes
24761 else
24762   glib_cv_uscore=no
24763 fi

error 3.

checking for posix getpwuid_r... configure: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

vi config.log

configure:25952: checking for posix getpwuid_r
configure:25958: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure:25961: error: cannot run test program while cross compiling
See `config.log' for more details.

vi configure +25952

25952                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix getpwuid_r" >&5
25953 $as_echo_n "checking for posix getpwuid_r... " >&6; }
25954 if test "${ac_cv_func_posix_getpwuid_r+set}" = set; then :
25955   $as_echo_n "(cached) " >&6
25956 else
25957   if test "$cross_compiling" = yes; then :
25958   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25960 as_fn_error "cannot run test program while cross compiling
25961 See \`config.log' for more details." "$LINENO" 5; }
25962 else
25963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25964 /* end confdefs.h.  */
25965
25966 #include <errno.h>
25967 #include <pwd.h>
25968 int main () {
25969     char buffer[10000];
25970     struct passwd pwd, *pwptr = &pwd;
25971     int error;
25972     errno = 0;
25973     error = getpwuid_r (0, &pwd, buffer,
25974                         sizeof (buffer), &pwptr);
25975    return (error < 0 && errno == ENOSYS)
25976            || error == ENOSYS;
25977 }
25978 _ACEOF
25979 if ac_fn_c_try_run "$LINENO"; then :
25980   ac_cv_func_posix_getpwuid_r=yes
25981 else
25982   ac_cv_func_posix_getpwuid_r=no
25983 fi

error 4.

checking for posix getgrgid_r... configure: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

vi config.log

configure:26041: checking for posix getgrgid_r
configure:26047: error: in `/home/zhxt/Download/qt-environment-libs/glib-2.24.0':
configure:26050: error: cannot run test program while cross compiling
See `config.log' for more details.

vi configure +26041

26041                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix getgrgid_r" >&5
26042 $as_echo_n "checking for posix getgrgid_r... " >&6; }
26043 if test "${ac_cv_func_posix_getgrgid_r+set}" = set; then :
26044   $as_echo_n "(cached) " >&6
26045 else
26046   if test "$cross_compiling" = yes; then :
26047   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26049 as_fn_error "cannot run test program while cross compiling
26050 See \`config.log' for more details." "$LINENO" 5; }
26051 else
26052   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26053 /* end confdefs.h.  */
26054
26055 #include <errno.h>
26056 #include <grp.h>
26057 int main () {
26058     char buffer[10000];
26059     struct group grp, *grpptr = &grp;
26060     int error;
26061     errno = 0;
26062     error = getgrgid_r (0, &grp, buffer,
26063                         sizeof (buffer), &grpptr);
26064    return (error < 0 && errno == ENOSYS)
26065            || error == ENOSYS;
26066 }
26067 _ACEOF
26068 if ac_fn_c_try_run "$LINENO"; then :
26069   ac_cv_func_posix_getgrgid_r=yes
26070 else
26071   ac_cv_func_posix_getgrgid_r=no
26072 fi

so the configure command :

./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes

all the command here:

 1009  cd glib-2.24.0/
 1010  ls
 1011  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux
 1012  vi config.log
 1013  vi configure + 21848
 1014  vi configure +21848
 1015  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no
 1016  ls
 1017  vi config.log
 1018  ls
 1019  vi configure +24734
 1020  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no glib_cv_uscore=yes
 1021  vi config.log
 1022  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no
 1023  vi config.log
 1024  vi configure +24734
 1025  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no glib_cv_uscore=yes
 1026  vi config.log
 1027  vi configure +25952
 1028  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes
 1029  vi config.log
 1030  vi configure +26041
 1031  ./configure  --prefix=/home/zhxt/toolchain/usr/ --host=arm-linux glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes
 1032  make -j3
 1033  make install

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值