论坛风格切换切换到宽版
  • 1781阅读
  • 6回复

[问题求助][RedHat] busybox出错了..... [复制链接]

上一主题 下一主题
离线kevin0426.
 
发帖
2245
C币
-192909
威望
427
贡献值
1
银元
-3
铜钱
5091
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
各位大哥,今天编了个..busybox,源代码是在www.busybox.net/download网上下的busybox-1.10.1           建材
make出现以下错误,.这些错误都怎么.改啊......服务器
都怎么分析 呢?

root@localho.st busybox-1.10.1].# make           鲜花
  CC      misc.utils/task.set.o           女人
miscutils/taskset..c:15: parse error before '*' to.ken电脑
miscutils/taskset.c:16: war.ning: function d.eclaration isn't a prototype.
miscutils/taskset.c: In function .`__fr.om_cpuset':.
miscutils/taskset.c:20: `CPU_SET.SIZE' undeclared (.fi.rst use in this function)<性病>
miscutils/taskset.c:20: (Each undeclared i.dentifier is rep.orted only once          婚庆
miscutils/taskset..c:20: for each funct.ion it appears in.).
miscutils/ta.skset.c:24: warning: implici.t declaration of .function `CPU_ISSET'           女人
miscuti.ls/taskset.c:24: .`mask' undeclared (first use in this function).
miscutils/taskset.c: In f..unction `taskset_main':电影
miscutils/taskset.c.:44: `cpu_set_t' undeclared (fir.st use in this function)             电子
miscutils/taskset.c:44: par.se error before ."mask"[成人用品]
miscutils/taskset.c:77: `.mask' undeclared (first use .in this function).
miscutils/taskset...c:95: warning: implicit declarati.on of function `CPU_ZERO'.
miscutils/taskset.c:96.: `CPU_SETSIZE' undeclared (first use in t.h.is function)           女人
miscutils/taskset.c:99: warning: implicit d.eclaration of function `CPU_SE.T'
m.ake[1].: *** [miscutils/taskset.o] Error 1           女人
make: *** [miscutils] Er.r.or 2虚拟主机
[root@lo.calho.st busybox-1.10.1]#学习


taskset.c源文件如下.:.
/* vi: set sw=4 ts=4: *./.
/*
* taskset - retrieve or set a processe.s' CPU affinit.y    健康
* Copyri.ght. (c) 2006 Bernhard Fischer电影
*
* License.d under GPLv2 or later, see file LICENSE in this ta.rbal.l for details.(        游戏          )
*/
#include <.sched.h>投资
#incl.ude <getopt.h> /* optind. */[成人用品]
#include ."libbb.h"电影
#if ENABLE_FEATURE_T.AS.KSET_FANCY虚拟主机
#define TASKSET_PRIN.TF_MASK ".%s"    外汇
#define from_cpuset(x) __from._cpuset(&x).(广告)
/* craft a. string from the. mask */投资
static char *__from_cpus.et(cpu._set_t *mask)域名
{
        int i;
        char *ret = 0, *str. = x.zalloc(9);    美容

        for (i = CPU_SETSIZE - 4; i >= 0; i. -.= 4) {              乙肝
                ch.ar val = .0;(        游戏          )
    .            int off;           建材
                for (off. =. 0; off <= 3; ++off)    外汇
                      .  if (CPU_ISSET(i+off, ma.sk)).
          .                      va.l |= 1<<off;外贸

           .     if (!re.t && val)(        游戏          )
   .                    . ret = str;[成人用品]
        .  .      *str++ = (val-'0'<=9) ? (val+48 )  : (val+87);             汽车
        }
  .      return ret;    外汇
}
#else
#.define TASKSET_P.RINTF_MASK "%x"--------------彩票
/* (void*) cast. is for battlin.g gcc: */外贸
/* "derefe.rencing type-punned pointer wi.ll break strict-aliasing rules" */          婚庆
#.define from_cpuset(mask) (*(unsign.ed*)(void*)&(mask))(        游戏          )
#endif


int taskset_.main(int argc, char **argv) MAIN_EXTERNALLY._VISIBLE;域名
int t.askset_main(int argc ATTRIBUTE_.UNUSED, char **argv)    外汇
{
        cpu_set_t ma.sk;外贸
        pid_t. pid = 0;.
        unsig.ned opt_p;              乙肝
        const char *c.urr.ent_new;             电子
        char *pid_s.tr;(广告)
        c.har *af.f = aff; /* for compiler */电影

.       /.* NB: we mimic util-linux's taskset: -p does not take.
         * an argument, i.e., ".-pN" is NO.T valid, only "-p N"!    健康
         * Ind.eed, util-.linux-2.13-pre7 uses:.
         * getopt_long(argc, arg.v, "+pch.V", ...), not "...p:..." */          婚庆

        opt_complementary =. "-1"; /* at lea.st 1 arg */教育
        o.pt_p = g.etopt32(argv, "+p");.
.       argv += optind;(广告)

.       if (opt_p) {.
.               pid_str = *argv+.+;.
                if (*argv) { /* "-p <.aff> <pid> ...rest.is..ignored..." */[成人用品]
        .   .             aff = pid_str;              乙肝
                        pid_str = .*argv; /* N.B: *argv != NULL. in this case */(广告)
    .            }健康
.               /* else it was just "-.p <pid>", and *argv == NULL */健康
                .pid = xatoul_r.ange(pid_str, 1, ((unsigned)(pid_t).ULONG_MAX) >> 1);           鲜花
       . } else {           建材
           .   .  aff = *argv++; /* <aff> <cmd...> */(        游戏          )
     .           i.f (!*argv)             电子
       .                 bb_show_.usage();    健康
        }

.       curren.t_new = "current\0new";    健康
        if (o.pt_p) {电影
print_aff:
             .   if (sched_getaffinity(pid, .sizeof(mask), &mask) < 0).
                        bb._perror_msg_and_die("can't %cet pid %d'.s affinity", 'g', p.id);.
                printf.("pid %d's %s. affinity ma.sk: "TASKSET_PRINTF_MASK"\n",           鲜花
  .       .                       pid, current_new, from_cpuset(mask));.
       .         if (!*argv) {..
                .        /* Either it was just "-.p <pid>",健康
        .                 * .or it was "-p <aff> <pid>" and we came here           鲜花
                         * for the second time.. (see goto below) */    外汇
               .         re.turn EXIT_SUCCESS;.
    .            }<性病>
  .              *argv .= NULL;           女人
                current_new .+.= 8; /* "new" */电影
        }

        { /* Affinity was spec.ified, tran.slate it into cpu_set_t */            杀毒
      .   .       unsigned i;    美容
                /* D.o not allow zero mask: */.虚拟主机
   .             unsigned long long m = xstrtoull_range(.aff, 0, 1, ULLONG_MA.X);           女人
              ..  CPU_ZERO(&mask);           女人
         .       fo.r (i = 0; i < CPU_SETSIZE; i++) {电影
                        unsigned long. long bit = (1.ULL << i);.
           .             if (bit & .m)    外汇
     .       .                    CPU_SET(i, &mask);.
       .         }投资
        }

        /* S.et pid's or our own (pid==0) affi.nity */.
        if. (sched_setaffinity(pid, sizeof(ma.sk), &mask))虚拟主机
.  .             bb_perror_msg_and_die("can't %cet pid %d's affinity", 's'., pid);健康

        if (!*argv) /* "-p. <aff> <pid> [...i.gnored...]" */电脑
                .goto print_aff; /* print new a.ffinity and exit */.

.       BB_EXECVP.(*argv, argv);服务器
        bb_simple_perror_msg_a.nd_die(*argv.);电影
}

[ 本帖最后由 waveson-linux. 于 2009-4-.26 20:46 编辑 ].

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线期他待~~.
发帖
1934
C币
-235561
威望
376
贡献值
1
银元
-2
铜钱
4359
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-14
Re:[RedHat]
buysbox应该没有问题吧,应该是你的环境变量或者路径没有配对吧。

发帖
2065
C币
-235577
威望
384
贡献值
1
银元
-1
铜钱
4528
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-14
Re:[RedHat]
谢谢emmoblin 。
那这些错误都怎么检查呢???
你能提供分析方法最好了,我是新手,需要你们的帮助啊......

离线dfberry.
发帖
2014
C币
-235712
威望
341
贡献值
1
银元
-5
铜钱
4446
人人网人气币
0
只看该作者 地板  发表于: 2010-04-14
Re:[RedHat]
把configure信息贴出来看看。

离线malawenwen.
发帖
2019
C币
-60527
威望
364
贡献值
1
银元
-1
铜钱
4523
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-14
Re:[RedHat]
贴出的信息不多啊,编译环境也要介绍介绍吧?您编译的busybox是作用途的呢?嵌入式呢?还是其他?

发帖
1902
C币
-235584
威望
405
贡献值
6
银元
2
铜钱
4414
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-14
Re:[RedHat]
我没有configure啊,好象没configure吧,你是怎么弄的.?

离线chinablue.
发帖
2151
C币
-235260
威望
390
贡献值
1
银元
-3
铜钱
4734
人人网人气币
0
只看该作者 6楼 发表于: 2010-04-14
Re:[RedHat]
我在上面的网站下载下来的busybox,然后解压,再make menucofig,选 了些东西,保存,然后make就出问题了.....
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个