2012-09-16 36 views
2

由于Killed: 9错误导致配置脚本的摘录失败,这就是说iOS 5只能运行签名的应用程序。所以我需要找到一种方法把ldid -s一些在这些测试中,只有问题是在哪里。配置脚本和ldid

任何???

失败

checking build system compiler gcc... no 
checking build system compiler gcc -g -O2 ... no 
checking build system compiler cc... no 
checking build system compiler gcc... no 
checking build system compiler c89... no 
checking build system compiler c99... no 
configure: error: Cannot find a build system compiler 

和的config.log

onfigure:15586: gcc -c -g -O2 conftest.c >&5 
configure:15586: $? = 0 
configure:15586: result: yes 
configure:15586: checking sys/time.h presence 
configure:15586: gcc -E conftest.c 
configure:15586: $? = 0 
configure:15586: result: yes 
configure:15586: checking for sys/time.h 
configure:15586: result: yes 
configure:15677: checking build system compiler gcc 
configure:15690: gcc conftest.c 
conftest.c: In function 'main': 
conftest.c:4: warning: incompatible implicit declaration of built-in function 'exit' 
configure:15693: $? = 0 
./configure: line 15675: 27218 Killed: 9    ./a.out 
./configure: line 15695: ./b.out: No such file or directory 
./configure: line 15695: ./a.exe: No such file or directory 
./configure: line 15695: ./a_out.exe: No such file or directory 
./configure: line 15695: ./conftest: No such file or directory 
configure:15700: result: no 
configure:15677: checking build system compiler gcc -g -O2 
configure:15690: gcc -g -O2 conftest.c 
conftest.c: In function 'main': 
conftest.c:4: warning: incompatible implicit declaration of built-in function 'exit' 
configure:15693: $? = 0 
./configure: line 15675: 27234 Killed: 9    ./a.out 
./configure: line 15695: ./b.out: No such file or directory 
./configure: line 15695: ./a.exe: No such file or directory 
./configure: line 15695: ./a_out.exe: No such file or directory 
./configure: line 15695: ./conftest: No such file or directory 
configure:15700: result: no 

最后./configure脚本..

if test -n "$CC_FOR_BUILD"; then 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $CC_FOR_BUILD" >&5 
    $as_echo_n "checking build system compiler $CC_FOR_BUILD... " >&6; } 
    # remove anything that might look like compiler output to our "||" expression 
    rm -f conftest* a.out b.out a.exe a_out.exe 
    cat >conftest.c <<EOF 
    int 
    main() 
    { 
     exit(0); 
    } 
    EOF 
    gmp_compile="$CC_FOR_BUILD conftest.c" 
    cc_for_build_works=no 
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 
     (eval $gmp_compile) 2>&5 
     ac_status=$? 
     $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
     test $ac_status = 0; }; then 
     if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then 
     cc_for_build_works=yes 
     fi 
    fi 
    rm -f conftest* a.out b.out a.exe a_out.exe 
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_for_build_works" >&5 
    $as_echo "$cc_for_build_works" >&6; } 
    if test "$cc_for_build_works" = yes; then 
     : 
    else 
     as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 
    fi 

    elif test -n "$HOST_CC"; then 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system compiler $HOST_CC" >&5 
    $as_echo_n "checking build system compiler $HOST_CC... " >&6; } 
    # remove anything that might look like compiler output to our "||" expression 
    rm -f conftest* a.out b.out a.exe a_out.exe 
    cat >conftest.c <<EOF 
    int 
    main() 
    { 
     exit(0); 
    } 
+1

此外,它是一个大写'-S' - 小写's' *删除*伪代码。 – 2012-09-16 21:01:31

回答

1

我不得不承认,我的能力,读什么但最简单的shell脚本很差,但基本上,您需要在运行之前伪造可执行代码。它看起来像你想运行的可执行文件被称为conftest,对吧?所以,尽量在这一块上面签名:

if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gmp_compile\""; } >&5 
    (eval $gmp_compile) 2>&5 
    ac_status=$? 
    $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 
    test $ac_status = 0; }; then 

    #begin added code 
    ldid -S ./conftest 
    #end added code 

    if (./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest) >&5 2>&1; then 
    cc_for_build_works=yes 
    fi 
fi 

显然,你可能需要提供完整的路径ldid(例如/usr/bin/ldid),如果它不是在现有PATH找到。

更新:按照下面的海报的评论,a.out实际上是需要进行签名,而不是conftest可执行文件。

+0

仍然不好'' –

+0

@JohnBruseliusJensen,你能给我们一些比这更多的信息吗?你在看什么?控制台输出?错误讯息? “仍然没有好处”不是很有用。 – Nate

+0

对不起,5分钟前,我发现'test $ ac_status = 0; };然后ldid -S ./a.out'正在工作,但现在我再次被卡住了... with configure:error:无法确定可执行文件后缀 –