论坛风格切换切换到宽版
  • 823阅读
  • 5回复

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

上一主题 下一主题
离线kgod.
 
发帖
1981
C币
-60648
威望
357
贡献值
1
银元
-3
铜钱
4485
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
各位大哥,今天编了个bu.sybox,源代码是在www.busybox.net/download网上下的b.usybox-1.10.1电影
make出现以下错.误,这些错误都怎么.改啊......域名
都怎么分析 呢?

root@localho.st busybox-1.10.1]# .make    外汇
  CC..      miscutils/taskset.o虚拟主机
miscutils/taskset.c:15: parse. error before '*' toke.n--------------彩票
miscutils/taskset.c:16: .warning: function de.claration isn't a prototype           鲜花
miscutils/taskset..c: In function `__f.rom_cpuset':.
miscutils/taskset.c:20: `CPU_SETSIZE' unde..clared .(first use in this function).
miscuti.ls/taskset.c:20: (Each undeclared id.entifier is reported only once
miscutils/tasks.et.c:20: for each function it .appears in.)虚拟主机
miscutils/taskset.c:24: .warning: implicit declaration of fun.ction `CPU._ISSET'.
miscutils/task.set.c:24: `mask' undeclared (first use i.n this function)投资
miscutils/tasks.et..c: In function `taskset_main':健康
miscutils/taskset.c:44: `cpu_set_t' undecl.ared .(first use in this function)--------------彩票
miscutils/taskset.c:44: parse error ..before "mask".
miscuti.ls/taskset.c:77: `mask' undeclared (first use in this .function)域名
miscut.ils/task.set.c:95: wa.rning: implicit declaration of function `CPU_ZERO'.
miscutils/t.askset.c:96: `CPU_SETSIZE' undeclared (f..irst use in this function)域名
miscutils/taskset.c:99: warning: implicit declaration of fu.nction. `CPU_SET'电脑
make[1]: *** [.miscutils/taskset.o] Error. 1健康
make: *** [m.is.cutils] Error 2             电子
[.root@local.host busybox-1.10.1]#.


taskset.c源.文件如下:.
/* vi: set. sw=4 ts=4: */              乙肝
/*
* taskset - retrieve or s.e.t a processes' CPU affinity.
* Copyright (c.) 2.006 Bernhard Fischer.
*
* Licensed und.er GPLv.2 or later, see file LICENSE in this tarbal.l for details.
*/
#include. <sched.h>教育
#in.clude <getopt.h> /.* optind */服务器
#include "libbb.h.".
#if ENABLE_FEA.TURE_TASK.SET_FANCY.
#define TASKSET_PRIN.T.F_MASK "%s"教育
#define fro.m_cpuset(x) __from_cpu.set(&x)           建材
/* craft a strin.g from the. mask */.
static c.har *__fro.m_cpuset(cpu_set_t *mask)             电子
{
        int i;
.       .char *ret = 0, *str = xzalloc(9);.

        for (i = CPU_SETSIZE - 4; i >=. .0; i -= 4) {投资
          .      c.har val = 0;    外汇
            .    int off;.
                for (off = 0; off .<= .3; ++off).
           .             if (CPU_ISSET(i+off, mas.k))服务器
      .                         . val |= 1<<off;电影

               . if (!ret && v.al)    外汇
          .       .       ret = str;    外汇
         .   .    *str++ = (val-'0'<=9) ? (val+48 )  : (val+87);[成人用品]
        }
     .   return ret;(        游戏          )
}
#else
#define T.A.SKSET_PRINTF_MASK "%x".
/* (voi.d*) cast is for battling gcc: *./(        游戏          )
/* "dereferenc.ing type-punned pointer will. break strict-aliasing rules" */投资
#define from_cp.uset(mask) (*(unsigned*)(vo.id*)&(mask))             电子
#endif


int tasks.et_main(int .argc, char **argv) MAIN_EXTERNALLY_VISIBLE;投资
in.t taskset_main(int argc ATTRIBUTE_UNUSED, char **arg.v).
{
        cp.u_set_t mask;电脑
        pid_.t pid = 0;          婚庆
.       unsigned opt_p;学习
..       const char *current_new;外贸
        .char *pid_str;<性病>
.       .char *aff = aff; /* for compiler */--- 印刷

        /* NB: we mimic util.-linux.'s taskset: -p does not take    健康
         * .an argument, i.e., "-p.N" is NOT valid, only "-p N"!(广告)
.        * .Indeed, util-linux-2.13-pre7 uses:教育
         * getopt_long(argc, argv,. "+pchV", ...),. not "...p:..." */--------------彩票

        opt_complemen.tary = "-1"; /* at leas.t 1 arg */[成人用品]
        op.t_p = getopt32(argv, ."+p");健康
        argv +=. optind;<性病>

        if (opt_.p) {    外汇
      .          pid_st.r = *argv++;虚拟主机
                if (*argv) { /* "-.p <aff> <pid> ...re.st.is.ignored..." */学习
             .       .    aff = pid_str;--- 印刷
                        pid_str =. *argv;. /* NB: *argv != NU.LL in this case */          婚庆
          .      }虚拟主机
                /* else it was jus.t "-p <pid>", and *argv == NULL *./.
               . pid = xatoul_range(.pid_str, 1, ((unsigned)(pid_t)ULONG_MAX.) >> 1);.
      .  } else {.
                a.ff = *argv++; /*. <aff> <cmd...> */.
     .           if (!*argv.)--------------彩票
       .                 b.b_show_usage();.
        }

        current_new = "current\0new..";              乙肝
        if (opt_.p) {服务器
print_aff:
     .           if (sched_getaf.finity(pid, sizeof(mask), &mask) < 0)(        游戏          )
                .        bb_perror_msg_and._die("ca.n't %cet pid %d's affinity", 'g', pid);           建材
   .             pr.intf("pid %d's %s affinity mask: "TASKSET_PRINTF._MASK"\n",             电子
   .      .                       pid, current_new, from_cpuset(mask));--- 印刷
                if. (!*argv). {             电子
               .         /* Eithe.r it was just "-p <pid>",           建材
                         * or it was "-p <aff> <pid>" and we came. he.re          婚庆
                         * for the second time .(see. goto below) */虚拟主机
                        return EXIT_.SUCCES.S;              乙肝
         .       }服务器
  .              *argv .= NULL;.
                current_new .+= 8; /* ."new" */           女人
        }

        { /* Affinity was sp.ecified, translate it into c.pu_set_t */教育
                ..unsigned i;.
    .            /* Do not allow ze.ro mask: */
       .         .unsigned long long m = xstrt.oull_range(aff, 0, 1, ULLONG_MAX);.
           .     CPU_ZERO(&m.ask);           女人
           .     for (i = 0; i < CPU_SETS.IZE; i++) {(        游戏          )
                        unsigned. l.ong long bit = (1ULL << i);--- 印刷
                        if. (bi.t & m)<性病>
    .                   .         CPU_SET(i, &mask);.
      .          }             汽车
        }

        /* Set pid's or our own (pid==0) af.finity .*/           鲜花
.  .     if (sched_setaffinity(pid, sizeof(mask), &mask))健康
              .  bb_.p.error_msg_and_die("can't %cet pid %d's affinity", 's', pid);             汽车

      .  if (!*argv) /* "-p <aff> <pid> [...ign.ored...]" */    健康
          .      goto print_aff; /* print new affinity. and exit */电影

.       BB_.EXECVP(*argv, argv);学习
      .  bb_simp.le_perror_msg_and_die(*argv);.
}

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

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

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线ijyq.
发帖
1958
C币
-60891
威望
373
贡献值
1
银元
-4
铜钱
4535
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:[RedHat]
buysbox应该没有问题吧,应该是你的环境变量或者路径没有配对吧。

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

离线fishleong.
发帖
1929
C币
-61154
威望
331
贡献值
1
银元
-1
铜钱
4179
人人网人气币
0
只看该作者 地板  发表于: 2010-04-13
Re:[RedHat]
把configure信息贴出来看看。

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

离线5842136.
发帖
2262
C币
-192932
威望
414
贡献值
1
银元
-2
铜钱
5064
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-13
Re:[RedHat]
我没有configure啊,好象没configure吧,你是怎么弄的.?

快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个